如何在Paypal中使用Paypal的两个功能 - SetExpressCheckoutPaymentAuthorization和Chained Payment。我想授权买家和卖家。当买家付款时,它将在交易完成时保持为paypal,然后付款进入卖家账户,20%的金额将进入管理员账户,80%的进入卖家账户使用Paypal。请逐步了解此过程。我想在我的asp.net项目中实现这个过程。
答案 0 :(得分:0)
您可以在自适应付款中使用PreApproval的概念,您可以在将来的任何时间获得买方的许可,并且一旦他同意您将获得可在您的自适应链支付API中使用的预批准密钥致电支付给主要和次要接收者的付款。通过这种方式,买家不会立即收取费用,您将有足够的时间进行支付。
Flow将是这样的:
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.将买家转到PayPal页面同意:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-preapproval&preapprovalkey=PA-6D174595N6325214K
3.使用上面收到的PreApproval Key向买家提供以下信息:
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
您可以在此处找到更多信息:
https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-basicPreapproval-curl-etc/