-
-
Save xcommerce-gists/4075559 to your computer and use it in GitHub Desktop.
How to Make a Parallel Payment Using Adaptive Payments.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
HTTP Headers | |
------------ | |
-H "X-PAYPAL-SECURITY-USERID: insert_developer_user_name_here" | |
-H "X-PAYPAL-SECURITY-PASSWORD: insert_developer_password_here" | |
-H "X-PAYPAL-SECURITY-SIGNATURE: insert_developer_signature_here" | |
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" | |
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" | |
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" #Standard Sandbox App ID | |
Endpoint | |
-------- | |
https://svcs.sandbox.paypal.com/AdaptivePayments/Pay | |
Input Parameters | |
---------------- | |
actionType=PAY #The action taken in the Pay request (that is, the PAY action) | |
&clientDetails.applicationId=APP-80W284485P519543T #Standard Sandbox App ID | |
&clientDetails.ipAddress=127.0.0.1 #Address from which request is sent | |
&senderEmail=sender_email | |
¤cyCode=USD #The currency, e.g. US dollars | |
&receiverList.receiver(0).amount=3.00 #The payment amount for the first receiver | |
&receiverList.receiver(0).email=first_receiver_email | |
&receiverList.receiver(1).amount=4.00 #The payment amount for the second receiver | |
&receiverList.receiver(1).email=second_receiver_email | |
&requestEnvelope.errorLanguage=en_US | |
&returnUrl=http://www.yourdomain.com/success.html #For use if the consumer proceeds with payment | |
&cancelUrl=http://www.yourdomain.com/cancel.html #For use if the consumer decides not to proceed with payment | |
Response | |
-------- | |
responseEnvelope.ack=Success | |
&payKey=AP-70S20255150981234 #Value of the pay key, for use in a redirect to the PayPal site | |
&paymentExecStatus=CREATED #Indicates that a payment is set up, ready for a sender to click Pay on the PayPal site | |
... |
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
HTTP Headers | |
------------ | |
-H "X-PAYPAL-SECURITY-USERID: insert_developer_user_name" | |
-H "X-PAYPAL-SECURITY-PASSWORD: insert_developer_password" | |
-H "X-PAYPAL-SECURITY-SIGNATURE: insert_developer_signature" | |
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" | |
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" | |
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" #Standard Sandbox App ID | |
Endpoint | |
-------- | |
https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails | |
Input Parameters | |
---------------- | |
payKey=AP-70S20255150981234 #Value of the pay key, received in the Pay call above | |
&requestEnvelope.errorLanguage=en_US | |
Response | |
-------- | |
responseEnvelope.ack=Success | |
&cancelUrl=http%3A%2F%2Fwww.yourdomain.com%2Fcancel.html | |
¤cyCode=USD | |
&paymentInfoList.paymentInfo(0).transactionId=5XC63659TW0721234 | |
&paymentInfoList.paymentInfo(0).transactionStatus=COMPLETED | |
&paymentInfoList.paymentInfo(0).receiver.amount=3.00 | |
&paymentInfoList.paymentInfo(0).receiver.email=first_receiver_email | |
&paymentInfoList.paymentInfo(0).receiver.primary=false | |
&paymentInfoList.paymentInfo(0).receiver.paymentType=SERVICE | |
&paymentInfoList.paymentInfo(0).refundedAmount=0.00 | |
&paymentInfoList.paymentInfo(0).pendingRefund=false | |
&paymentInfoList.paymentInfo(0).senderTransactionId=22K52234553191234 | |
&paymentInfoList.paymentInfo(0).senderTransactionStatus=COMPLETED | |
&paymentInfoList.paymentInfo(1).transactionId=6B499255JW1421234 | |
&paymentInfoList.paymentInfo(1).transactionStatus=COMPLETED | |
&paymentInfoList.paymentInfo(1).receiver.amount=4.00 | |
&paymentInfoList.paymentInfo(1).receiver.email=second_receiver_email | |
&paymentInfoList.paymentInfo(1).receiver.primary=false | |
&paymentInfoList.paymentInfo(1).receiver.paymentType=SERVICE | |
&paymentInfoList.paymentInfo(1).refundedAmount=0.00 | |
&paymentInfoList.paymentInfo(1).pendingRefund=false | |
&paymentInfoList.paymentInfo(1).senderTransactionId=85M38157M2541234 | |
&paymentInfoList.paymentInfo(1).senderTransactionStatus=COMPLETED | |
&returnUrl=http%3A%2F%2Fwww.yourdomain.com%2Fsuccess.html | |
&senderEmail=sender_email | |
&status=COMPLETED | |
&payKey=AP-70S20255150981234 | |
&actionType=PAY | |
&feesPayer=EACHRECEIVER | |
&reverseAllParallelPaymentsOnError=false | |
&sender.email=sender_email | |
&sender.useCredentials=false | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment