cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with API integration into MS Access

Developer Gateway in Sandbox - 809501

 
I am attempting to integrate Credit Card processing into the MS Access application that drives my customer's Hose and Tool Rental business.  I have run into issues with the following procedure:
 
Public Sub CCPriorAuthChg()
    Dim Post_Url
        'Post_Url = "https://test.authorize.net/gateway/transact.dll"; ' SANDBOX Environment
        Post_Url = GetPostURL(CCEnvironment)
    
    Dim post_string         As String
    Dim post_response       As String
    Dim MerchLogin          As String
    Dim MerchTransKey       As String
        
    MerchLogin = CCMerchantLogin(CCEnvironment)
    MerchTransKey = CCMerchantKey(CCEnvironment)
       
 
    'the API Login ID and Transaction Key must be replaced with valid values
    post_string = ""
    post_string = post_string & "x_login=" & UrlEncode(MerchLogin) & "&"
    post_string = post_string & "x_tran_key=" & UrlEncode(MerchTransKey) & "&"
    post_string = post_string & "x_delim_data=" & UrlEncode("TRUE") & "&"
    post_string = post_string & "x_delim_char=" & UrlEncode("|") & "&"
    post_string = post_string & "x_relay_response=" & UrlEncode("FALSE") & "&"
    post_string = post_string & "x_type=" & UrlEncode("PRIOR_AUTH_CAPTURE") & "&"
    post_string = post_string & "x_method=" & UrlEncode("CC") & "&"
    post_string = post_string & "x_TransId=" & UrlEncode(Me.CCTransCode) & "&"
    post_string = post_string & "x_refTransId=" & UrlEncode(Me.CCNetworkTransCode) & "&"
    post_string = post_string & "x_amount=" & UrlEncode(Me.PmtAmount) & "&" ''''''
    post_string = post_string & "x_currencyCode=" & UrlEncode("USD") & "&"
 
    ' Additional fields can be added here as outlined in the AIM integration
    
    post_string = post_string & "x_originalNetworkTransId=" & UrlEncode(Me.CCNetworkTransCode) & "&"
    post_string = post_string & "x_originalAuthAmount=" & UrlEncode(Me.PmtAmount) & "&"
    
    post_string = Left(post_string, Len(post_string) - 1)
    ' We use xmlHTTP to submit the input values and record the response
    'Dim objRequest As New ActiveXObject("Msxml2.DOMDocument.6.
    Dim objRequest As MSXML2.XMLHTTP
    Set objRequest = New MSXML2.XMLHTTP
    objRequest.Open "POST", Post_Url, False
    objRequest.send post_string
    post_response = objRequest.responseText
    Set objRequest = Nothing
    
    ' the response string is broken into an array using the specified delimiting character
    Dim response_array '(100) As Variant
    response_array = Split(post_response, "|", -1)
    Me.CCResultCode = response_array(3)
    Me.CCAuthCode = response_array(4)
    Me.CCTransCode = response_array(7)
    Me.CCNetworkTransCode = response_array(68)
    Me.CCResultParseCode = post_response
    
    Me.Notes = "The previous Authorization Only record was converted to a charge"
     
    SaveRecord
    
End Sub
 
I have 2 issues:
1. I have compiled the C# SDK into a COM visible TLB files (AuthorizeNet.tlb) which I tried to reference from the Access application.  However the Reference Name was incorrect.  The reference to C# Assembly instead of AuthorizeNet doesn't provide the class intellisense that I need to understand how I can use the Class.
 
 
Any assistance that you can provide is appreciated, including how to convert the AIM x_.... references to the current API call.
eeasley1946
Member
0 REPLIES 0