cancel
Showing results for 
Search instead for 
Did you mean: 

How to call GetHostedProfilePage from .NET CIM

The authnet .net SDK does not include any examples of how to call CIM's GetHostedProfilePage. Does anyone have a working code sample of how to call this? I would even take a PHP or Java sample if that's all you have. I have been emailing developer@authorize.net for 1.5 weeks and cannot get a response.

 

Thanks.

ZeroGravPro
Contributor
2 REPLIES 2

I use this vb.net function passing the authet profile id  to get the authorization token required.

 

PublicSharedFunction EditCustomerPaymentProfile(ByVal profile_id AsLong) AsString 

Dim hostedprofilesetting AsNewSettingType 

Dim hostedpage As GetHostedProfilePageResponseType = SoapAPIUtilities.Service.GetHostedProfilePage(SoapAPIUtilities.MerchantAuthentication, profile_id, Nothing) 

Dim page_token AsString

page_token = hostedpage.token

Return page_token 

EndFunction

 

I also downloaded the popup forms in the CIM section from http://developer.authorize.net/downloads/samplecode/

 

In the examplepage.html provided you need to place the token received in the html section

 

  <input type="hidden" name="Token" value="tbyS9qm+0CotK8XMQh+SOlIswsY8Vu1MBA8ZRMy2LGxye0D5ePc4DzzSV+d/8r0rG1NVMAYLo3wIzNnpVC7NhMBVY2hInDrqH1gmqwWy1ihQey/EYh/LXRs2GPshqTETePO6+kC1zylkQXshgnnxUN2WxeFUttPfMpiAaN+me9abJiChnML9rtaaI3C8aTb/2NOgiz61EA6VaVE4fKvL716O2pgQEo5jJZQH04Ee2KvUxQJSAyZvyF+1hWDWHIwwE35kdaYWfnH2dIzqGcZnVQ4cHgiA5pEQtywm9X2qF7SPiSk8/uqJ6mWrxm3mK9tKoPnuwQwNVoIe3cROReW+i5j//383Jkx0PpGT8trEOCbPH2cXrxmfRQ40DNvRgHOg" />
</form>

 

Hope this helps.

 

Nic

nic73
Member

Also,

This is what my soapapituilities class looks like for my test account:

 

Public Class SoapAPIUtilities

 


    'TEST SETTINGS
    Public Const MERCHANT_NAME As String = "mymerchantkey"
    Public Const TRANSACTION_KEY As String = "mytranskey"
    Public Const API_URL As [String] = "https://apitest.authorize.net/soap/v1/Service.asmx"
    Public Const POST_URL As [String] = "https://test.authorize.net/gateway/transact.dll"

 

 

    Private Shared m_auth As MerchantAuthenticationType = Nothing
    Private Shared m_service As Service = Nothing


       Public Shared ReadOnly Property MerchantAuthentication() As MerchantAuthenticationType
        Get
            If m_auth Is Nothing Then
                m_auth = New MerchantAuthenticationType()
                m_auth.name = MERCHANT_NAME
                m_auth.transactionKey = TRANSACTION_KEY
            End If
            Return m_auth
        End Get
    End Property

    Public Shared ReadOnly Property Service() As Service
        Get
            If m_service Is Nothing Then
                m_service = New Service()
                m_service.Url = API_URL
            End If
            Return m_service
        End Get
    End Property

End Class