Handling Silent Post Response

Keep in mind that the PayTrace API Secure Checkout will send the silent post transaction responses to the URL that is specified in the “Manage API Checkout” section of your PayTrace account or the Return URL that is provided when the order is validated. The Return URL should be pointed to a page that has the code from the below example. Silent Posts come back as POST and each Silent Post is logged in the PayTrace account under the Integration menu and API Logs. You can select Silent Post from the drop down and search for silent posts made for any completed Secure Checkout items.

This is an example of a silent post back on a sale completed through the Secure Checkout.

parmList=ORDERID%7E123456%7CTRANSACTIONID%7E62279788%7CAPPCODE%7ETAS456%7CAPPMSG%7E++NO++MATCH++++++%2D+Approved+and+completed%7CAVSRESPONSE%7ENo+Match%7CCSCRESPONSE%7EMatch%7CEMAIL%7Etest%40test%2Ecom%7C
  • Please note that Requests where TRANXTYPE is set to “CreateCustomer” or “UpdateCustomer” will only return the OrderID and CustomerID. If the customer profile was created, the CustomerID value will be the same as OrderID. However, updated customer profiles will return the existing CustomerID as the CustomerID.
‘declare tools to loop through the response and store the current name / value pair
Dim arrResponse() as String
Dim arrPair() as String
Dim Counter as Integer

‘declare the tools to store the values of the appropriate responses
Dim strResponseMessage As String
Dim strTransactionID As String
Dim strAppCode As String
Dim strAppMsg As String
Dim strAVSResponse As String
Dim strCSCResponse As String

‘check to make sure the response was not empty/invalid
if strResponse <> “” and inStr(strResponse,”|”) > 0 and inStr(strResponse,”~”) > 0 then
    arrResponse = split(strResponse, “|”) ‘split the response into an array of name/value pairs

    for Counter = 0 to uBound(arrResponse)-1
        arrPair = split(arrResponse(Counter), “~”)
        If UCase(arrPair(0)) = "RESPONSE" Then
            strResponseMessage = arrPair(1)
        ElseIf UCase(arrPair(0)) = "TRANSACTIONID" Then
            strTransactionID = arrPair(1)
        ElseIf UCase(arrPair(0)) = "APPCODE" Then
            strAppCode = arrPair(1)
ElseIf UCase(arrPair(0)) = "APPMSG" Then
            strAppMsg = arrPair(1)    
        ElseIf UCase(arrPair(0)) = "AVSRESPONSE" Then
            strAVSResponse = arrPair(1)    
        ElseIf UCase(arrPair(0)) = "CSCRESPONSE" Then
            strCSCResponse = arrPair(1)
        End If 
    next
Else 
    StrError = StrError  & “The response from the PayTrace API was invalid."
End if 
If strAppCode <> “” then
    MsgBox “Transaction was APPROVED: ” & strResponseMessage    
Else
    MsgBox “Transaction was NOT approved: ” & strResponseMessage
End if