How to use both feature of Paypal - SetExpressCheckoutPaymentAuthorization and Chained Payment in Paypal. I want to authorize buyer and seller. when buyer gives payment it will remain on hold to paypal when transaction is completed then payment goes to seller account and 20% amount will goes into admin account and 80% in seller account Using Paypal. Please Understand this process step by step. I want to implement this process in my asp.net project.
0
votes
1 Answers
0
votes
You can use the concept of PreApproval in Adaptive payments where you can get the permission from the buyer to charge him any time in the future and once he agrees you will get a preapproval key which you can use in your Adaptive chain Payment API call to disburse the payment to Primary and the Secondary Receiver . This way the buyer will not be charged instantly and you will have the enough time to disburse it .
Flow will be something like this :
1.Preapproval:
NVP Request:
requestEnvelope.errorLanguage=en_US&startingDate=2014-10-19Z&endingDate=2015-10-19Z¤cyCode=USD&cancelUrl=XXXXXXX&returnUrl=XXXXXX&ipnNotificationUrl=XXXXXXXX&maxAmountPerPayment=10.00&maxNumberOfPayments=50&maxNumberOfPaymentsPerPeriod=10&maxTotalAmountOfAllPayments=500.00&memo=This is Preapproval memo&paymentPeriod=DAILY
NVP Response:
responseEnvelope.timestamp=2014-10-18T14:31:26.577-07:00
responseEnvelope.ack=Success
responseEnvelope.correlationId=51317322d3c7d
responseEnvelope.build=13085071
preapprovalKey=PA-6D174595N6325214K
2.Redirect the buyer to PayPal page to agree it :
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-preapproval&preapprovalkey=PA-6D174595N6325214K
3.Charge the buyer at later time using the PreApproval Key received above :
NVP Request:
actionType=PAY&requestEnvelope.errorLanguage=en_US&cancelUrl=XXXXX&returnUrl=XXXXXX&ipnNotificationUrl=XXXXXX&applicationId=XXXXXXX&memo=Chain Payment via PreApproval¤cyCode=USD&receiverList.receiver(0).email=XXXXX.co.in&receiverList.receiver(0).amount=5.00&receiverList.receiver(0).primary=true&receiverList.receiver(1).email=EXXXXX.co.in.pro&receiverList.receiver(1).amount=2.00&receiverList.receiver(1).primary=false&feesPayer=EACHRECEIVER&preapprovalKey=PA-6D174595N6325214K&pin=123456&detailLevel.DetailLevelCode=ReturnAll
NVP Response:
responseEnvelope.timestamp=2014-10-18T16:01:47.549-07:00
responseEnvelope.ack=Success
responseEnvelope.correlationId=bcf3c446f3a44
responseEnvelope.build=13085071
payKey=AP-4FF76080D3699590F
paymentExecStatus=COMPLETED
paymentInfoList.paymentInfo(0).transactionId=3F2484079H7759838
paymentInfoList.paymentInfo(0).transactionStatus=COMPLETED
paymentInfoList.paymentInfo(0).receiver.amount=5.00
paymentInfoList.paymentInfo(0).receiver.email=XXXXX.co.in
paymentInfoList.paymentInfo(0).receiver.primary=true
paymentInfoList.paymentInfo(0).receiver.accountId=XXXXXXX
paymentInfoList.paymentInfo(0).pendingRefund=false
paymentInfoList.paymentInfo(0).senderTransactionId=332451441L881611C
paymentInfoList.paymentInfo(0).senderTransactionStatus=COMPLETED
paymentInfoList.paymentInfo(1).transactionId=2XX52568GK846100U
paymentInfoList.paymentInfo(1).transactionStatus=COMPLETED
paymentInfoList.paymentInfo(1).receiver.amount=2.00
paymentInfoList.paymentInfo(1).receiver.email=XXXXX.co.in
paymentInfoList.paymentInfo(1).receiver.primary=false
paymentInfoList.paymentInfo(1).receiver.accountId=7VZLVB9FB2EZJ
paymentInfoList.paymentInfo(1).pendingRefund=false
paymentInfoList.paymentInfo(1).senderTransactionId=34R54203C0679535E
paymentInfoList.paymentInfo(1).senderTransactionStatus=COMPLETED
sender.accountId=XXXXXXXX
You can find the more info here :
https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-basicPreapproval-curl-etc/