Hello,
I have code within my DB application to process credit cards through
authorize.net. Ive been using the same code for several years without a
problem.
I have an order entry computer and after reinstalling Win XP, we used
Office/Access 2003.
When we try to process CC's we get a debug screen and Access itself
crashes.
However, the code still runs fine on Access/Office XP. The debug screen
says: Method 'doSSLPost' of object 'ISSLPost' Failed
Here is the area that seems to be causing the problem:
'Create a new Auth object
Set AuthNetPost = New AuthNetSSLConnect.SSLPost
Here is more of the code from the beginning:
Private Sub btnUpload_Click()
Dim AuthNetPost As AuthNetSSLConnect.SSLPost
Dim Connection As ADODB.Connection
Dim RecordSet As ADODB.RecordSet
Dim UpdateRS As ADODB.RecordSet
Dim PostString As Variant
Dim AuthCode As Variant
Dim ResponseReasonText As Variant
Dim ApprovalCode As Variant
Dim ccID As Long
Dim sQuery As String
Dim BatchDate As Date
Dim mcrDeclineUpdate As String
Dim MacroUpdate As String
Dim Count As Integer
Dim mcrCCCustRefUpdate As String
DoCmd.Hourglass True
'Update CC Table with Cust Ref Numbers
DoCmd.RunMacro "mcrCCCustRefUpdate"
'Execute the stored procedure
Set RecordSet = New ADODB.RecordSet
RecordSet.Open "EXEC qryCCUpload", CurrentProject.Connection
'Create a new Auth object
Set AuthNetPost = New AuthNetSSLConnect.SSLPost
'loop through the record set
Do Until RecordSet.EOF
'Build query string
PostString = "x_Login=" & RecordSet!coCCLogin & ", "
PostString = PostString & "x_Password=" &
RecordSet!coCCPassword & ", "
PostString = PostString & "x_Invoice_Num=" & RecordSet!ccID &
", "
PostString = PostString & "x_Description=" &
RecordSet!Description & ", "
PostString = PostString & "x_Amount=" &
Format(RecordSet!Amount, "0.00") & ", "
PostString = PostString & "x_Method=" & RecordSet!PaymentMethod
& ", "
PostString = PostString & "x_Type=" & RecordSet!TransType & ",
"
PostString = PostString & "x_Card_Num=" & RecordSet!ccNumber &
", "
PostString = PostString & "x_Exp_Date=" & RecordSet!ccExpDate &
", "
PostString = PostString & "x_Cust_Id=" &
RecordSet!custReferenceNo & ", "
PostString = PostString & "x_First_Name=" & RecordSet!custName
& ", "
PostString = PostString & "x_Last_Name=" & RecordSet!LastName &
", "
PostString = PostString & "x_Company=" & RecordSet!Company & ",
"
PostString = PostString & "x_Address=" & RecordSet!Address & ",
"
PostString = PostString & "x_City=" & RecordSet!CCCity & ", "
PostString = PostString & "x_State=" & RecordSet!CCState & ", "
PostString = PostString & "x_Zip=" & RecordSet!CCZip & ", "
PostString = PostString & "x_Country=" & RecordSet!Country & ",
"
PostString = PostString & "x_Email=" & RecordSet!Email & ", "
PostString = PostString & "x_Phone=" & RecordSet!Phone & ", "
PostString = PostString & "x_Fax=" & RecordSet!Fax
'PostString = PostString & ", x_Test_Request=TRUE"
DoCmd.Hourglass True
'Post the data
AuthNetPost.doSSLPost PostString
'Set return values from authnet
ApprovalCode = AuthNetPost.GetField(1)
ResponseReasonText = AuthNetPost.GetField(4)
AuthCode = AuthNetPost.GetField(5)
ccID = RecordSet!ccID
BatchDate = Date
'Build update SQL
sQuery = "UPDATE tblCCInfo "
sQuery = sQuery & "SET ccBatch1 = Yes, "
sQuery = sQuery & "ccApprovalCode1 = " & ApprovalCode & ", "
sQuery = sQuery & "ccResponseReason1 = '" & ResponseReasonText
& "', "
'************************************************* ***********************************
If (ApprovalCode = 1) Then
sQuery = sQuery & "ccAuthorizationCode1 = '" & AuthCode &
"', "
Else
sQuery = sQuery & "ccAuthorizationCode1 = 0, "
End If
'************************************************* ***********************************
sQuery = sQuery & "ccBatchDate = ' " & BatchDate & "'"
sQuery = sQuery & " WHERE ccID = " & ccID
'Execute the update statement
Set UpdateRS = New RecordSet
UpdateRS.Open sQuery, CurrentProject.Connection
Set UpdateRS = Nothing
RecordSet.MoveNext
Loop
RecordSet.Close
'Destroy the AuthNetPost object and recordset
Set AuthNetPost = Nothing
Set RecordSet = Nothing
'**********************End Processing Original Orders ***********
Is there anything obvious that allow this to run in Access Xp and not
in Access 2003?
Thanks,
Jay