cancel
Showing results for 
Search instead for 
Did you mean: 

Intuit code not working...need help with integration

Hello,

 

We are a small, family operated business that has successfully processed with Echo/Intuit for 18 years.

 

Intuit bought Echo and then stopped processing for us, so we are now processing with Authorize.net.

 

However, when we used Echo, then Intuit, we successfully processed online with a custom built database: Access 2007 using SQL Server 2008 on a Dell Server in our office.  

 

The programmer who put this together is no longer available, so we have to figure this out for ourselves.

 

Thanks for taking a look and any help you can offer.

 

Emily

support@b610.com

 

This is the code from SQL2008:

 

 

 

Option Compare Database

Private Sub Command2_Click()

TransCounter = 0

DoCmd.RunCommand acCmdSaveRecord

 

' Set the recordset to current recordset

Dim rst As ADODB.Recordset
Set rst = Me.Recordset.Clone

rst.MoveFirst

' start a loop to go through payment records
Do

' Start Instance of Echo

Dim order_submit As Boolean
Dim EGateway As ECHOCom.Echo

Set EGateway = New ECHOCom.Echo

EGateway.ECHOCom_Initialize

' Enter merchant account information

 

EGateway.merchant_echo_id = "*********" 'fill this in
EGateway.merchant_pin = "******************" 'fill this in


EGateway.transaction_type = "EV"
EGateway.order_type = "S"


EGateway.ConnectTimeout = 6000
EGateway.SendTimeOut = 10000


'Get Fields from Payment Table
Dim vAddress As String
Dim vAddress2 As String
Dim vZip As String
Dim vCountry As String
Dim vphone As String
Dim vCreditcard As String
Dim vCCyr As String
Dim vCCM As String
Dim vOrderID

'On Error Resume Next

 

vOrderID = rst.Fields("OrderID")
vAddress = rst.Fields("BAddress")
'vAddress2 = rst.Fields("BAddress2")
vZip = rst.Fields("BZip")
vphone = rst.Fields("bPhone")
vCreditcard = rst.Fields("CCNumber")
vCCyr = rst.Fields("CCExpM")
vCCM = rst.Fields("CCExpY")
vOrderID = rst.Fields("OrderID")
vPaymentID = rst.Fields("PaymentID")
vFirstName = rst.Fields("FirstName")
vLastName = rst.Fields("LastName")
vTotalAmount = rst.Fields("TotalAmount")
vCountry = rst.Fields("Country")
vCSV = rst.Fields("EnteredBy")


'BackOrder Fields
vBO = rst.Fields("BO")
vBOID = rst.Fields("BackOrderID")
vBOProductID = rst.Fields("BOProductID")
countdig = Len(vTotalAmount)

 

' Checks the amount and put it in currency format
' *********************************************************************************

If countdig <= 3 Then
vTotalAmount = vTotalAmount & ".00"


Else


Dim HMN
Dim words() As String
words() = Split(vTotalAmount, ".")
HMN = Len(words(1))



If HMN = "" Then
vTotalAmount = vTotalAmount & ".00"
Else

If HMN = 1 Then
vTotalAmount = vTotalAmount & "0"
Else

If HMN > 1 Then
PercentValue = Right(words(1), 2)
vTotalAmount = words(0) & "." & PercentValue
Else

vTotalAmount = vTotalAmount



End If
End If
End If


End If

'*******************************************************************************


On Error Resume Next


'Enables counter
TransCounter = TransCounter + 1
EGateway.Counter = TransCounter


' Assign payment details to the echo varibles


EGateway.billing_address1 = vAddress
EGateway.billing_address2 = vAddress2
EGateway.billing_zip = vZip
EGateway.billing_phone = vphone
EGateway.cc_number = vCreditcard
EGateway.ccexp_month = vCCyr
EGateway.ccexp_year = vCCM
EGateway.cnp_security = vCSV
EGateway.DebugEcho = "F"
EGateway.EchoServer = "https://secure.authorize.net/gateway/transact.dll"

 

'Get The Total Of The order

EGateway.grand_total = vTotalAmount
EGateway.merchant_email = "support@b610.com"
EGateway.product_description = "Sale"

order_submit = EGateway.Submit

If order_submit = True Then

vdate1 = Date
a = Split(vdate1, "/")
vMonth = a(0)
vDay = a(1)
vYear = a(2)


OrgAmount = vTotalAmount
OrgTDmm = vMonth
OrgTDdd = vDay
OrgTDyyyy = vYear
OrderNumber = EGateway.order_number
CCNumber = EGateway.cc_number
CCExpM = EGateway.ccexp_month
CCExpY = EGateway.ccexp_year
CPhone = vphone
ORef = EGateway.original_reference
vvCSV = EGateway.cnp_security


'If payment was accepted
'set cleared to true

Cleared = "True"
' Get auto number
AuthoNum = EGateway.authorization




' Display Auto info

MsgBox (" The OrderNumber " & vOrderID & " for " & vFirstName & " " & vLastName & " of " & vCountry & " in the amount of " & vTotalAmount & " and has been accepted. The Authorization number is: " & AuthoNum)

'Insert to paymentStatus Table
DoCmd.RunSQL "INSERT INTO tblPaymentStatus (OrderID,PaymentID,Cleared,Authonum,OrgAmount,OrgTDmm,OrderNumber,CCNumber,CCExpM,CCExpY,OrgTDdd,OrgTDyyyy,CPhone,ORef) Values (" & "'" & vOrderID & "','" & vPaymentID & "','" & Cleared & "','" & AuthoNum & "'," & OrgAmount & ",'" & OrgTDmm & "','" & OrderNumber & "','" & CCNumber & "','" & CCExpM & "','" & CCExpY & "','" & OrgTDdd & "','" & OrgTDyyyy & "','" & CPhone & "','" & vvCSV & "')"


PrintInvoiceYN = MsgBox("Do you want to print the invoice?", vbYesNo)
PrintLabelYN = MsgBox("Do you want to add this order to the Label Que?", vbYesNo)
DoCmd.RunSQL "Update tblOrders set CCProcessed = 1 where OrderID=" & vOrderID



If PrintInvoiceYN = 6 Then


Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAskToPrint"
stLinkCriteria = "[OrderID]=" & vOrderID
DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

If PrintLabelYN = 6 Then

DoCmd.RunSQL "Update tblOrders set PrintLabel = 1 where OrderID=" & vOrderID


End If

'-------------------------------------------BACKORDER


If vBO = True Then

Dim cnn3 As ADODB.Connection
Set cnn3 = CurrentProject.Connection
Dim rs3 As New ADODB.Recordset
rs3.ActiveConnection = cnn3
rs3.CursorType = adOpenDynamic
rs3.LockType = adLockOptimistic
SQL3 = "Select grandtotal from tblOrders Where OrderID=" & vOrderID
rs3.Open SQL3, cnn3
rs3.MoveFirst

vGrandTotalValue = rs3.Fields("GrandTotal")
rs3.Close
cnn3.Close

 

 

 




DoCmd.RunSQL "Update tblProductsOrdered set BackOrder = 0, SubTotal=" & vTotalAmount & " where POID = " & vBOProductID & " and OrderID=" & vOrderID
DoCmd.RunSQL "Update tblBackOrder set CCDone = 1 where BackOrderID=" & vBOID
DoCmd.RunSQL "Update tblOrders set BackOrder = 0 where OrderID=" & vOrderID
vGrandTotalValue = vGrandTotalValue + vTotalAmount
DoCmd.RunSQL "Update tblOrders set GrandTotal = " & vGrandTotalValue & " where OrderID=" & vOrderID
DoCmd.RunSQL "INSERT INTO tblPaymentStatus (OrderID,PaymentID,Cleared,Authonum,OrgAmount,OrgTDmm,OrderNumber,CCNumber,CCExpM,CCExpY,OrgTDdd,OrgTDyyyy,CPhone,ORef) Values (" & "'" & vOrderID & "','" & vPaymentID & "','" & Cleared & "','" & AuthoNum & "'," & OrgAmount & ",'" & OrgTDmm & "','" & OrderNumber & "','" & CCNumber & "','" & CCExpM & "','" & CCExpY & "','" & OrgTDdd & "','" & OrgTDyyyy & "','" & CPhone & "','" & ORef & "')"



End If


'--------------------------------------------End BackOrder









Else

' Declined codes

If EGateway.EchoDeclineCode = "0001" Then
Reason = "Refer to card issuer."

Else
If EGateway.EchoDeclineCode = "0002" Then
Reason = "Refer to card issuer, special condition."

Else
If EGateway.EchoDeclineCode = "0003" Then
Reason = "Invalid merchant number."

Else
If EGateway.EchoDeclineCode = "0004" Then
Reason = "Pick-up card. Capture for reward."


Else
If EGateway.EchoDeclineCode = "0005" Then
Reason = "Do not honor."
'5______________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0006" Then
Reason = "Error."

Else
If EGateway.EchoDeclineCode = "0007" Then
Reason = "Pick-up card, special condition."

Else
If EGateway.EchoDeclineCode = "0008" Then
Reason = "Honor with identification."

Else
If EGateway.EchoDeclineCode = "0009" Then
Reason = "Request in progress."

Else
If EGateway.EchoDeclineCode = "0010" Then
Reason = "Approved for partial amount."

'10________________________________________________________________________________________________________


Else
If EGateway.EchoDeclineCode = "0011" Then
Reason = "Approved, VIP."

Else
If EGateway.EchoDeclineCode = "0012" Then
Reason = "Invalid transaction."

Else
If EGateway.EchoDeclineCode = "0013" Then
Reason = "Invalid amount."


Else
If EGateway.EchoDeclineCode = "0014" Then
Reason = "Invalid card #"


Else
If EGateway.EchoDeclineCode = "0015" Then
Reason = "No such issuer"

' 15_________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0016" Then
Reason = "Approved, update track 3"


Else
If EGateway.EchoDeclineCode = "0017" Then
Reason = "Customer cancellation"

Else
If EGateway.EchoDeclineCode = "0018" Then
Reason = "Customer dispute"

Else
If EGateway.EchoDeclineCode = "0019" Then
Reason = "Re enter transaction"

Else
If EGateway.EchoDeclineCode = "0020" Then
Reason = "Invalid response"

'20_________________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "0021" Then
Reason = "No action taken"


Else
If EGateway.EchoDeclineCode = "0022" Then
Reason = "Suspected malfunction"


Else
If EGateway.EchoDeclineCode = "0023" Then
Reason = "Unacceptable transaction fee"

Else
If EGateway.EchoDeclineCode = "0024" Then
Reason = "File update not supported"


Else
If EGateway.EchoDeclineCode = "0025" Then
Reason = "Unable to locate record"

'25__________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0026" Then
Reason = " Duplicate record"

Else
If EGateway.EchoDeclineCode = "0027" Then
Reason = "File update edit error"

Else
If EGateway.EchoDeclineCode = "0028" Then
Reason = "File update file locked"

Else
If EGateway.EchoDeclineCode = "0029" Then
Reason = "File update file locked"

Else
If EGateway.EchoDeclineCode = "0030" Then
Reason = "Format error, call ECHO"

'30________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0031" Then
Reason = " Bank not supported"

Else
If EGateway.EchoDeclineCode = "0032" Then
Reason = " Completed partially"


Else
If EGateway.EchoDeclineCode = "0033" Then
Reason = " Expired card, pick-up"

Else
If EGateway.EchoDeclineCode = "0034" Then
Reason = "Issuer suspects fraud, pick-up card"

Else
If EGateway.EchoDeclineCode = "0035" Then
Reason = "Contact acquirer, pick-up"

'35_______________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0036" Then
Reason = " Restricted card, pick-up"

Else
If EGateway.EchoDeclineCode = "0037" Then
Reason = " Call ECHO security, pick-up"

Else
If EGateway.EchoDeclineCode = "0038" Then
Reason = " PIN tries exceeded, pick-up"

Else
If EGateway.EchoDeclineCode = "0039" Then
Reason = " No credit account"

Else
If EGateway.EchoDeclineCode = "0040" Then
Reason = " Function not supported"

'40________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0041" Then
Reason = " Lost Card, capture for reward"

Else
If EGateway.EchoDeclineCode = "0042" Then
Reason = " No universal account"


Else
If EGateway.EchoDeclineCode = "0043" Then
Reason = "Stolen Card, capture for reward"

Else
If EGateway.EchoDeclineCode = "0044" Then
Reason = "No investment account"


Else
If EGateway.EchoDeclineCode = "0045" Then
Reason = "not used"

'45______________________________________________________________________________________________________-


Else
If EGateway.EchoDeclineCode = "0046" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0047" Then
Reason = " Remote function unknown"


Else
If EGateway.EchoDeclineCode = "0048" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0049" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "0050" Then
Reason = "not used"

'50________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0051" Then
Reason = " Not sufficient funds"


Else
If EGateway.EchoDeclineCode = "0052" Then
Reason = " No check account"

Else
If EGateway.EchoDeclineCode = "0053" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "0054" Then
Reason = " Expired card"

Else
If EGateway.EchoDeclineCode = "0055" Then
Reason = "Incorrect PIN"

'55__________________________________________________________________________________________________


Else
If EGateway.EchoDeclineCode = "0056" Then
Reason = " No card record"


Else
If EGateway.EchoDeclineCode = "0057" Then
Reason = " Transaction not permitted to cardholder"

Else
If EGateway.EchoDeclineCode = "0058" Then
Reason = " Transaction not permitted on terminal"


Else
If EGateway.EchoDeclineCode = "0059" Then
Reason = " Suspected fraud"

Else
If EGateway.EchoDeclineCode = "0060" Then
Reason = " Contact ECHO"

'60________________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "0061" Then
Reason = " Exceeds withdrawal limit"


Else
If EGateway.EchoDeclineCode = "0062" Then
Reason = " Restricted card"

Else
If EGateway.EchoDeclineCode = "0063" Then
Reason = " Security violation."


Else
If EGateway.EchoDeclineCode = "0064" Then
Reason = " Original amount incorrect"

Else
If EGateway.EchoDeclineCode = "0065" Then
Reason = " Exceeds withdrawal frequency"

'65________________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0066" Then
Reason = " Call acquirer security, call ECHO"


Else
If EGateway.EchoDeclineCode = "0067" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0068" Then
Reason = " Response received too late"


Else
If EGateway.EchoDeclineCode = "0069" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0070" Then
Reason = " not used"

'70_______________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0071" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "0072" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0073" Then
Reason = " Late reversal"


Else
If EGateway.EchoDeclineCode = "0074" Then
Reason = " Reversal does not match original transaction"

Else
If EGateway.EchoDeclineCode = "0075" Then
Reason = " PIN tries exceeded"

'75_______________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0076" Then
Reason = " Invalid to account"


Else
If EGateway.EchoDeclineCode = "0077" Then
Reason = " Invalid from account"

Else
If EGateway.EchoDeclineCode = "0078" Then
Reason = " Invalid account specified (general)"


Else
If EGateway.EchoDeclineCode = "0079" Then
Reason = " Already reversed"

Else
If EGateway.EchoDeclineCode = "0080" Then
Reason = " not used"

'80____________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0081" Then
Reason = " Cryptographic error found in PIN"


Else
If EGateway.EchoDeclineCode = "0082" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "0083" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "0084" Then
Reason = " Invalid authorization life cycle"

Else
If EGateway.EchoDeclineCode = "0085" Then
Reason = " not used"

'85______________________________________________________________________________________________________



Else
If EGateway.EchoDeclineCode = "0086" Then
Reason = " Cannot verify PIN"


Else
If EGateway.EchoDeclineCode = "0087" Then
Reason = " Network Unavailable"

Else
If EGateway.EchoDeclineCode = "0088" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "0089" Then
Reason = " Ineligible to receive financial position information"

Else
If EGateway.EchoDeclineCode = "0090" Then
Reason = " Cut-off in progress"

'90____________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "0091" Then
Reason = " Issuer or switch inoperative"


Else
If EGateway.EchoDeclineCode = "0092" Then
Reason = " Routing error"

Else
If EGateway.EchoDeclineCode = "0093" Then
Reason = " Violation of law"


Else
If EGateway.EchoDeclineCode = "0094" Then
Reason = " Duplicate transaction"

Else
If EGateway.EchoDeclineCode = "0095" Then
Reason = " Cut-off in progress"

'95______________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "0096" Then
Reason = " Violation of law"


Else
If EGateway.EchoDeclineCode = "0097" Then
Reason = " Duplicate transaction"

Else
If EGateway.EchoDeclineCode = "0098" Then
Reason = " Cut-off in progress"


'Error Codes

Else
If EGateway.EchoDeclineCode = "1000" Then
Reason = " Unrecoverable error."

Else
If EGateway.EchoDeclineCode = "1001" Then
Reason = " Account closed"

'100________________________________________________________________________________________________


Else
If EGateway.EchoDeclineCode = "1002" Then
Reason = " System closed"


Else
If EGateway.EchoDeclineCode = "1003" Then
Reason = " E-Mail Down"

Else
If EGateway.EchoDeclineCode = "1004" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "1005" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "1006" Then
Reason = " not used"

'105___________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "1007" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "1008" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "1009" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "1010" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "1011" Then
Reason = " not used"

'110_______________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "1012" Then
Reason = " Invalid trans code"


Else
If EGateway.EchoDeclineCode = "1013" Then
Reason = " Invalid term id"


Else
If EGateway.EchoDeclineCode = "1014" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "1015" Then
Reason = " Invalid card number"

Else
If EGateway.EchoDeclineCode = "1016" Then
Reason = " Invalid expiry date"

'115__________________________________________________________________________________________________



Else
If EGateway.EchoDeclineCode = "1017" Then
Reason = " Invalid amount"


Else
If EGateway.EchoDeclineCode = "1018" Then
Reason = " not used"


Else
If EGateway.EchoDeclineCode = "1019" Then
Reason = " Invalid state"

Else
If EGateway.EchoDeclineCode = "1020" Then
Reason = " not used"

Else
If EGateway.EchoDeclineCode = "1021" Then
Reason = " Invalid service"

'120__________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "1022" Then
Reason = "not used"


Else
If EGateway.EchoDeclineCode = "1022" Then
Reason = "not used"


Else
If EGateway.EchoDeclineCode = "1023" Then
Reason = "not used"


Else
If EGateway.EchoDeclineCode = "1024" Then
Reason = " Invalid auth code"


Else
If EGateway.EchoDeclineCode = "1025" Then
Reason = " Invalid reference number"

'125________________________________________________________________________________________________________



Else
If EGateway.EchoDeclineCode = "1026" Then
Reason = " not used"



Else
If EGateway.EchoDeclineCode = "1027" Then
Reason = " not used"




Else
If EGateway.EchoDeclineCode = "1028" Then
Reason = " not used"



Else
If EGateway.EchoDeclineCode = "1029" Then
Reason = " Invalid contract number"


Else
If EGateway.EchoDeclineCode = "1030" Then
Reason = " Invalid inventory data"

'130_______________________________________________________________________________________


'Error Codes 1501 through 1599 are generated by ECHONLINE after
'validating the merchant but before presenting the transaction to
'the host computers for processing.

'1501-1507 Not used

Else
If EGateway.EchoDeclineCode = "1508" Then
Reason = " Invalid or missing order_type"

Else
If EGateway.EchoDeclineCode = "1509" Then
Reason = " The merchant is not approved to submit this order_type."

Else
If EGateway.EchoDeclineCode = "1510" Then
Reason = " The merchant is not approved to submit this transaction_type."


Else
If EGateway.EchoDeclineCode = "1511" Then
Reason = " Same CC Number; Same $ Amount; Same Date; DUPLICATE TRANSACTION ATTEMPT!"


Else
If EGateway.EchoDeclineCode = "1599" Then
Reason = " An system error occurred while validating the transaction input."

'135______________________________________________________________________________________________--


'1600-1800 Not used

Else
If EGateway.EchoDeclineCode = "1801" Then
Reason = " Address matches; ZIP does not match."

Else
If EGateway.EchoDeclineCode = "1802" Then
Reason = "9-digit ZIP matches; Address does not match."


Else
If EGateway.EchoDeclineCode = "1803" Then
Reason = " 5-digit ZIP matches; Address does not match."


Else
If EGateway.EchoDeclineCode = "1804" Then
Reason = " Issuer unavailable; cannot verify."


Else
If EGateway.EchoDeclineCode = "1805" Then
Reason = " Retry; system is currently unable to process."

'140________________________________________________________________________________________________

Else
If EGateway.EchoDeclineCode = "1806" Then
Reason = " Issuer does not support AVS."

Else
If EGateway.EchoDeclineCode = "1807" Then
Reason = " Nothing matches."


Else
If EGateway.EchoDeclineCode = "1808" Then
Reason = " Invalid AVS only response."

Else
If EGateway.EchoDeclineCode = "1809" Then
Reason = " Street address match. Postal code not verified because of incompatible formats."

Else
If EGateway.EchoDeclineCode = "1810" Then
Reason = " Street address and Postal code not verified because of incompatible formats."


'145__________________________________________________________________________________________________-

Else
If EGateway.EchoDeclineCode = "1811" Then
Reason = " Street address match and Postal code match."


Else
If EGateway.EchoDeclineCode = "1812" Then
Reason = " Address information not verified for international transaction."

Else
If EGateway.EchoDeclineCode = "1813" Then
Reason = "Street address match and Postal code match."

Else
If EGateway.EchoDeclineCode = "1814" Then
Reason = " Postal code match. Street address not verified because of incompatible formats."

'1815-1896 not is use


Else
If EGateway.EchoDeclineCode = "1897" Then
Reason = " The host returned an invalid response."

'150__________________________________________________________________________________________________


Else
If EGateway.EchoDeclineCode = "1898" Then
Reason = " The host unexpectedly disconnected."

Else
If EGateway.EchoDeclineCode = "1899" Then
Reason = " Timeout waiting for host response."

'1900-2070 not in use

Else
If EGateway.EchoDeclineCode = "2071" Then
Reason = " An authorization number from the VISA Voice Center is required to approve this transaction."

Else
If EGateway.EchoDeclineCode = "2072" Then
Reason = " An authorization number from the Master Card Voice Center is required to approve this transaction."

Else
If EGateway.EchoDeclineCode = "2073" Then
Reason = " An authorization number from the Carte Blanche Voice Center is required to approve this transaction."


'155____________________________________________________________________________________________________


Else
If EGateway.EchoDeclineCode = "2074" Then
Reason = " An authorization number from the Diners' Club Voice Center is required to approve this transaction."

Else
If EGateway.EchoDeclineCode = "2075" Then
Reason = " An authorization number from the American Express Voice Center is required to approve this transaction."


Else
If EGateway.EchoDeclineCode = "2076" Then
Reason = " An authorization number from the Discover Voice Center is required to approve this transaction."

'2077 not used

Else
If EGateway.EchoDeclineCode = "2078" Then
Reason = " The merchant must call ECHO Customer Support for approval.or because there is a problem with the merchant's account."

Else
If EGateway.EchoDeclineCode = "2079" Then
Reason = " The merchant must call ECHO Customer Support for approval.or because there is a problem with the merchant's account."


'160____________________________________________________________________________________________________________

 


End If
End If
End If
End If
End If

End If
End If
End If
End If
End If


End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If


End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If

End If
End If
End If
End If
End If







MsgBox ("This is the Declined Code " & EGateway.EchoDeclineCode)
' set not cleared to true
NotCleared = "True"
'get Reason why declined
'Reason = EGateway.EchoDeclineCode
MsgBox (" The OrderNumber " & vOrderID & " for " & vFirstName & " " & vLastName & " in the amount of " & vTotalAmount & " and has been declined. The error Code is: " & Reason)

'DoCmd.RunSQL "INSERT INTO tblPaymentStatus(OrderID,PaymentID,NotCleared,Reason) Values (" & "'" & vOrderID & "','" & vPaymentID & "','" & NotCleared & "','" & Reason & "')"
DoCmd.RunSQL "INSERT INTO tblPaymentStatus(OrderID,PaymentID,NotCleared,ReasonNotCleared) Values (" & "'" & vOrderID & "','" & vPaymentID & "','" & NotCleared & "','" & Reason & "')"


End If

Set EGateway = Nothing

 

' Loop through records


rst.MoveNext
Loop Until rst.EOF

 

DoCmd.RunSQL "UpDate tblPayments set Processed = 1"
TransCounter = 0
'Me.Text0 = 0
DoCmd.Close acForm, "frmRunCCBatch"

 


End Sub


Private Sub Command3_Click()
On Error GoTo Err_Command3_Click



DoCmd.Close



Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.description
Resume Exit_Command3_Click

End Sub
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click

 

Exit_Command4_Click:
Exit Sub

Err_Command4_Click:
MsgBox Err.description
Resume Exit_Command4_Click

End Sub
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

 

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.description
Resume Exit_Command5_Click

End Sub

Private Sub Form_Load()

 

 

 


End Sub
Private Sub Command19_Click()
On Error GoTo Err_Command19_Click


DoCmd.GoToRecord , , acFirst

Exit_Command19_Click:
Exit Sub

Err_Command19_Click:
MsgBox Err.description
Resume Exit_Command19_Click

End Sub
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click


DoCmd.GoToRecord , , acPrevious

Exit_Command20_Click:
Exit Sub

Err_Command20_Click:
MsgBox Err.description
Resume Exit_Command20_Click

End Sub
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click


DoCmd.GoToRecord , , acNext

Exit_Command21_Click:
Exit Sub

Err_Command21_Click:
MsgBox Err.description
Resume Exit_Command21_Click

End Sub
Private Sub Command22_Click()
On Error GoTo Err_Command22_Click


DoCmd.GoToRecord , , acLast

Exit_Command22_Click:
Exit Sub

Err_Command22_Click:
MsgBox Err.description
Resume Exit_Command22_Click

End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click

 


Exit_Command25_Click:
Exit Sub

Err_Command25_Click:
MsgBox Err.description
Resume Exit_Command25_Click

End Sub

1 REPLY 1

The look more like vb then sql2008? did you figure out which api to use? look like you might be using AIM

 

There VB.net sample code here.

http://developer.authorize.net/downloads/samplecode/

 

You can also hire certified developer

http://www.authorize.net/solutions/merchantsolutions/merchantservices/certifieddeveloperdirectory/

RaynorC1emen7
Expert