Processing a store & forward through the PayTrace API will request that the transaction is stored for future authorization for specified amount. Please note that the authorization of the store & forward may be scheduled by provided a StrFwdDate value or manually via the Virtual Terminal. Note that swiped account numbers and CSC values are not stored. Only the card number and expiration dates are stored from the swipe.
Swiped StrFwd Sale
Required Name Value Pairs
UN, PSWD, TERMS, METHOD, TRANXTYPE, AMOUNT, SWIPE
Key Entered StrFwd Sale
Required Name Value Pairs
UN, PSWD, TERMS, METHOD, TRANXTYPE, AMOUNT, CC, EXPMNTH, EXPYR
Customer ID (Token) StrFwd Processing
Required Name Value Pairs
UN, PSWD, TERMS, METHOD, TRANXTYPE, AMOUNT, CUSTID
Optional Name Value Pairs For Any StrFwd Request
BNAME, BADDRESS, BADDRESS2, BCITY, BSTATE, BZIP, BCOUNTRY, SNAME, SADDRESS, SADDRESS2, SCITY, SCOUNTY, SSTATE, SZIP, SCOUNTRY, EMAIL, CSC, INVOICE, DESCRIPTION, TAX, CUSTREF, RETURNCLR, CUSTOMDBA, ENABLEPARTIALAUTH, DISCRETIONARY DATA, STRFWDDATE
Sample of a StrFwd Request
‘format the request string to process an authorization for $1.00
strRequest = “UN~demo123|PSWD~demo123|TERMS~Y|METHOD~ProcessTranx|”
strRequest = strRequest & “TRANXTYPE~Str/FWD|CC~4012881888818888|EXPMNTH~12|”
strRequest = strRequest & “EXPYR~12|AMOUNT~1.00|BADDRESS~1234|BZIP~83852|”
strRequest = strRequest & “INVOICE~8888|STRFWDDATE~09/09/2012|”
strResponse = SendPayTraceAPIRequest(strRequest) ‘defined in Referencing the API Page
Request Response
Returned Name Value Pairs
RESPONSE, TRANSACTIONID
Example of Parsing a Store and Forward Response
‘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 strError As String
Dim strResponseMessage As String
Dim strTransactionID 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)) = "ERROR" Then
StrError = strError & arrPair(1)
ElseIf UCase(arrPair(0)) = "RESPONSE" Then
strResponseMessage = arrPair(1)
ElseIf UCase(arrPair(0)) = "TRANSACTIONID" Then
strTransactionID = arrPair(1)
End If
next
Else
StrError = StrError & “The response from the PayTrace API was invalid."
End if
If StrError <> “” then
MsgBox “Transaction was not successful per the following error: ” & StrError
Else
MsgBox “Transaction was successful: ” & strResponseMessage
End if