Created
September 26, 2012 18:57
-
-
Save xcommerce-gists/3789848 to your computer and use it in GitHub Desktop.
How to Make Parallel Payments Using Express Checkout.curl
This file contains hidden or 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
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d | |
"USER=<Caller_ID> | |
&PWD=<Caller_Pswd> | |
&SIGNATURE=<Caller_Sig> | |
&METHOD=DoExpressCheckoutPayment | |
&VERSION=93 | |
&TOKEN=<Token> # TOKEN value returned from SetExpressCheckout | |
&PAYERID=<PayerID> # PAYERID value returned from GetExpressCheckoutDetails | |
&PAYMENTREQUEST_0_AMT=250 # first payment details | |
&PAYMENTREQUEST_0_CURRENCYCODE=USD | |
&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=<Receiver_1> | |
&PAYMENTREQUEST_0_PAYMENTREQUESTID=CART286-PAYMENT0 | |
&PAYMENTREQUEST_1_AMT=75 # second payment details | |
&PAYMENTREQUEST_1_CURRENCYCODE=USD | |
&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=<Receiver_2> | |
&PAYMENTREQUEST_1_PAYMENTREQUESTID=CART286-PAYMENT1" |
This file contains hidden or 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
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d | |
"USER=<Caller_ID> | |
&PWD=<Caller_Pswd> | |
&SIGNATURE=<Caller_Sig> | |
&METHOD=GetExpressCheckoutDetails | |
&VERSION=93 | |
&TOKEN=<Token>" # TOKEN value returned from SetExpressCheckout |
This file contains hidden or 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
&PAYMENTREQUEST_0_CURRENCYCODE=USD | |
&PAYMENTREQUEST_0_AMT=250 # total amount of first payment | |
&PAYMENTREQUEST_0_ITEMAMT=225 | |
&PAYMENTREQUEST_0_TAXAMT=25 | |
&PAYMENTREQUEST_0_PAYMENTACTION=Order | |
&PAYMENTREQUEST_0_DESC=Sunset Sail for Two | |
&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=<Receiver_1> # PayPal e-mail of 1st receiver | |
&PAYMENTREQUEST_0_PAYMENTREQUESTID=CART286-PAYMENT0 # unique ID for 1st payment | |
&PAYMENTREQUEST_1_CURRENCYCODE=USD | |
&PAYMENTREQUEST_1_AMT=75 # total amount of second payment | |
&PAYMENTREQUEST_1_ITEMAMT=65 | |
&PAYMENTREQUEST_1_TAXAMT=10 | |
&PAYMENTREQUEST_1_PAYMENTACTION=Order | |
&PAYMENTREQUEST_1_DESC=Sunset Wine and Cheese Plate for Two | |
&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=<Receiver_2> # PayPal e-mail of 2nd receiver | |
&PAYMENTREQUEST_1_PAYMENTREQUESTID=CART286-PAYMENT1 # unique ID for 1st payment |
This file contains hidden or 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
# begin secondary information | |
&L_PAYMENTREQUEST_0_NAME0=Departs Santa Cruz Harbor Sunday at 3:10 PM | |
&L_PAYMENTREQUEST_0_NAME1=Returns Santa Cruz Harbor 7:30 PM | |
&L_PAYMENTREQUEST_0_NUMBER0=Sunset Sail 22 | |
&L_PAYMENTREQUEST_0_QTY0=1 # first ticket | |
&L_PAYMENTREQUEST_0_QTY1=1 # second ticket | |
&L_PAYMENTREQUEST_0_AMT0=125 # amount of first ticket | |
&L_PAYMENTREQUEST_0_AMT1=100 | |
&L_PAYMENTREQUEST_0_TAXAMT0=15 # tax on first ticket | |
&L_PAYMENTREQUEST_0_TAXAMT1=10 | |
&L_PAYMENTREQUEST_0_DESC0=An amazing sail on the Monterey Bay. | |
&L_PAYMENTREQUEST_1_DESC0=Five cheeses, fruit, bread, and Pinot Noir" |
This file contains hidden or 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
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d | |
"USER=<Caller_ID> # the PayPal User ID of the caller account | |
&PWD=<Caller_Pswd> # the caller account Password | |
&SIGNATURE=<Caller_Sig> # the caller account Signature | |
&METHOD=SetExpressCheckout # API operation | |
&RETURNURL=http://example.com/success.html # URL displayed to buyer after authorizing transaction | |
&CANCELURL=http://example.com/canceled.html # URL displayed to buyer after canceling transaction | |
&VERSION=93 # API version |
This file contains hidden or 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
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d | |
"USER=<Caller_ID> # the PayPal User ID of the caller account | |
&PWD=<Caller_Pswd> # the caller account Password | |
&SIGNATURE=<Caller_Sig> # the caller account Signature | |
&METHOD=SetExpressCheckout # API operation | |
&RETURNURL=http://example.com/success.html # URL displayed to buyer after authorizing transaction | |
&CANCELURL=http://example.com/canceled.html # URL displayed to buyer after canceling transaction | |
&VERSION=93 # API version | |
&PAYMENTREQUEST_0_CURRENCYCODE=USD | |
&PAYMENTREQUEST_0_AMT=250 # total amount of first payment | |
&PAYMENTREQUEST_0_ITEMAMT=225 | |
&PAYMENTREQUEST_0_TAXAMT=25 | |
&PAYMENTREQUEST_0_PAYMENTACTION=Order | |
&PAYMENTREQUEST_0_DESC=Sunset Sail for Two | |
&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=<Receiver_1> # PayPal e-mail of 1st receiver | |
&PAYMENTREQUEST_0_PAYMENTREQUESTID=CART286-PAYMENT0 # unique ID for 1st payment | |
&PAYMENTREQUEST_1_CURRENCYCODE=USD | |
&PAYMENTREQUEST_1_AMT=75 # total amount of second payment | |
&PAYMENTREQUEST_1_ITEMAMT=65 | |
&PAYMENTREQUEST_1_TAXAMT=10 | |
&PAYMENTREQUEST_1_PAYMENTACTION=Order | |
&PAYMENTREQUEST_1_DESC=Sunset Wine and Cheese Plate for Two | |
&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=<Receiver_2> # PayPal e-mail of 2nd receiver | |
&PAYMENTREQUEST_1_PAYMENTREQUESTID=CART286-PAYMENT1 # unique ID for 1st payment | |
&L_PAYMENTREQUEST_0_NAME0=Departs Santa Cruz Harbor Sunday at 3:10 PM | |
&L_PAYMENTREQUEST_0_NAME1=Returns Santa Cruz Harbor 7:30 PM # begin secondary information | |
&L_PAYMENTREQUEST_0_NUMBER0=Sunset Sail 22 | |
&L_PAYMENTREQUEST_0_QTY0=1 # first ticket | |
&L_PAYMENTREQUEST_0_QTY1=1 # second ticket | |
&L_PAYMENTREQUEST_0_AMT0=125 # amount of first ticket | |
&L_PAYMENTREQUEST_0_AMT1=100 | |
&L_PAYMENTREQUEST_0_TAXAMT0=15 # tax on first ticket | |
&L_PAYMENTREQUEST_0_TAXAMT1=10 | |
&L_PAYMENTREQUEST_0_DESC0=An amazing sail on the Monterey Bay. | |
&L_PAYMENTREQUEST_1_DESC0=Five cheeses, fruit, bread, and Pinot Noir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cURL command to create a parallel payment using PayPal's Express Checkout.