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 AuthNetSSLConne ct.SSLPost
Here is more of the code from the beginning:
Private Sub btnUpload_Click ()
Dim AuthNetPost As AuthNetSSLConne ct.SSLPost
Dim Connection As ADODB.Connectio n
Dim RecordSet As ADODB.RecordSet
Dim UpdateRS As ADODB.RecordSet
Dim PostString As Variant
Dim AuthCode As Variant
Dim ResponseReasonT ext As Variant
Dim ApprovalCode As Variant
Dim ccID As Long
Dim sQuery As String
Dim BatchDate As Date
Dim mcrDeclineUpdat e As String
Dim MacroUpdate As String
Dim Count As Integer
Dim mcrCCCustRefUpd ate As String
DoCmd.Hourglass True
'Update CC Table with Cust Ref Numbers
DoCmd.RunMacro "mcrCCCustRefUp date"
'Execute the stored procedure
Set RecordSet = New ADODB.RecordSet
RecordSet.Open "EXEC qryCCUpload", CurrentProject. Connection
'Create a new Auth object
Set AuthNetPost = New AuthNetSSLConne ct.SSLPost
'loop through the record set
Do Until RecordSet.EOF
'Build query string
PostString = "x_Login=" & RecordSet!coCCL ogin & ", "
PostString = PostString & "x_Password =" &
RecordSet!coCCP assword & ", "
PostString = PostString & "x_Invoice_Num= " & RecordSet!ccID &
", "
PostString = PostString & "x_Description= " &
RecordSet!Descr iption & ", "
PostString = PostString & "x_Amount=" &
Format(RecordSe t!Amount, "0.00") & ", "
PostString = PostString & "x_Method=" & RecordSet!Payme ntMethod
& ", "
PostString = PostString & "x_Type=" & RecordSet!Trans Type & ",
"
PostString = PostString & "x_Card_Num =" & RecordSet!ccNum ber &
", "
PostString = PostString & "x_Exp_Date =" & RecordSet!ccExp Date &
", "
PostString = PostString & "x_Cust_Id= " &
RecordSet!custR eferenceNo & ", "
PostString = PostString & "x_First_Na me=" & RecordSet!custN ame
& ", "
PostString = PostString & "x_Last_Nam e=" & RecordSet!LastN ame &
", "
PostString = PostString & "x_Company= " & RecordSet!Compa ny & ",
"
PostString = PostString & "x_Address= " & RecordSet!Addre ss & ",
"
PostString = PostString & "x_City=" & RecordSet!CCCit y & ", "
PostString = PostString & "x_State=" & RecordSet!CCSta te & ", "
PostString = PostString & "x_Zip=" & RecordSet!CCZip & ", "
PostString = PostString & "x_Country= " & RecordSet!Count ry & ",
"
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.doS SLPost PostString
'Set return values from authnet
ApprovalCode = AuthNetPost.Get Field(1)
ResponseReasonT ext = AuthNetPost.Get Field(4)
AuthCode = AuthNetPost.Get Field(5)
ccID = RecordSet!ccID
BatchDate = Date
'Build update SQL
sQuery = "UPDATE tblCCInfo "
sQuery = sQuery & "SET ccBatch1 = Yes, "
sQuery = sQuery & "ccApprovalCode 1 = " & ApprovalCode & ", "
sQuery = sQuery & "ccResponseReas on1 = '" & ResponseReasonT ext
& "', "
'************** *************** *************** *************** *************** **********
If (ApprovalCode = 1) Then
sQuery = sQuery & "ccAuthorizatio nCode1 = '" & AuthCode &
"', "
Else
sQuery = sQuery & "ccAuthorizatio nCode1 = 0, "
End If
'************** *************** *************** *************** *************** **********
sQuery = sQuery & "ccBatchDat e = ' " & BatchDate & "'"
sQuery = sQuery & " WHERE ccID = " & ccID
'Execute the update statement
Set UpdateRS = New RecordSet
UpdateRS.Open sQuery, CurrentProject. Connection
Set UpdateRS = Nothing
RecordSet.MoveN ext
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