Created
September 11, 2012 21:07
-
-
Save xcommerce-gists/3702058 to your computer and use it in GitHub Desktop.
How to Run a Reference Transaction Using Direct Payment.curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
------- | |
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp | |
HTTP method: POST | |
POST data: | |
USER=insert_merchant_user_name_here | |
&PWD=insert_merchant_password_here | |
&SIGNATURE=insert_merchant_signature_value_here | |
&METHOD=DoDirectPayment | |
&VERSION=86 | |
&PAYMENTACTION=Sale #Indicates that a payment will be processed | |
&AMT=10 #The amount of payment | |
&ACCT=4641631486853053 #The credit card number | |
&CREDITCARDTYPE=VISA #The type of credit card | |
&CVV2=123 #The CVV2 number | |
&FIRSTNAME=James | |
&LASTNAME=Smith | |
&STREET=FirstStreet | |
&CITY=SanJose | |
&STATE=CA | |
&ZIP=95131 | |
&COUNTRYCODE=US | |
&CURRENCYCODE=USD #The currency, e.g. US dollars | |
&EXPDATE=052015 #Expiration date of the credit card | |
Response | |
-------- | |
&ACK=Success | |
&AMT=10%2e00 | |
&CURRENCYCODE=USD | |
&AVSCODE=X | |
&CVV2MATCH=M | |
&TRANSACTIONID=9KK85084958471234 #An ID on which to base a DoReferenceTransaction call | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
------- | |
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp | |
HTTP method: POST | |
POST data: | |
USER=insert_merchant_user_name_here | |
&PWD=insert_merchant_password_here | |
&SIGNATURE=insert_merchant_signature_value_here | |
&METHOD=DoReferenceTransaction | |
&VERSION=86 | |
&AMT=2 #The amount of payment | |
&CURRENCYCODE=USD #The currency, e.g. US dollars | |
&PAYMENTACTION=SALE #Indicates that a payment will be processed | |
&REFERENCEID=9KK85084958471234 #Use a transaction ID from a DoDirectPayment response | |
Response | |
-------- | |
AVSCODE=X | |
&CVV2MATCH=M | |
&ACK=Success | |
&TRANSACTIONID=7TX32596U93391234 #Transaction ID created in this new DoReferenceTransaction call | |
&AMT=2%2e00 | |
&CURRENCYCODE=USD | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment