
Sending a Simple Transaction to the Server
Sale Transaction Example
5
54 07 February 2013 Gateway Developer Guide and Reference
Sale Transaction Example
In addition to the required connection and user parameters, each transaction type may require
other parameters and can include a number of optional parameters.
To perform a sale transaction involving a credit card, for example, pass the following
parameters:
TRXTYPE - The type of the transaction, such as S for Sale
TENDER - The method of payment, such as C for credit card
ACCT - The buyer’s credit card number
AMT - The amount of the sale with two decimal places
EXPDATE - The expiration date of the credit card
Typical Sale Transaction
The following is a typical name-value pair string for a sale transaction.
TRXTYPE=S&TENDER=C&USER=MerchantUserID&PWD=Pwd4Gateway&PARTNER=PayPal&ACCT=
5105105105105100&EXPDATE=1215&AMT=23.45&COMMENT1=Airport Shuttle&BILLTOFIRS
TNAME=Jamie&BILLTOLASTNAME=Miller&BILLTOSTREET=123 Main St.&BILLTOCITY=San
Jose&BILLTOSTATE=CA&BILLTOZIP=951311234&BILLTOCOUNTRY=US&CVV2=123&CUSTIP=0.
0.0.0&VERBOSITY=HIGH
Besides the required sale transaction parameters, the string includes other Payflow parameters
typically included in a sale transaction.
When the transaction completes, the Gateway server returns a response string made up of NVP
response parameters. If the transaction is successful, the Gateway server returns RESULT value
0. The value of PNREF identifies the transaction in future requests, and RESPMSG is a string
indicating whether the transaction was approved.
The following is an example response:
RESULT=0&PNREF=VXYZ01234567&RESPMSG=APPROVED&AVSADDR=Y&AVSZIP=N&IAVS=Y&CVV2
MATCH=Y
Formatting Payflow Gateway Transactions
For details on how to format a Payflow transaction, see the examples and the supporting
documentation provided with your SDK or see Submitting Credit Card Transactions.
Commentaires sur ces manuels