我正在开发paypal自适应支付&我需要通过API退款,我可以在parrralel付款的情况下退款,但在链式付款方面遇到问题
例如,买方/发件人在付款时总共支付了200美元
receiver1 = $ 90
receiver2 = $ 90
接收器(主要)= $ 20
当我处理来自API的每个接收器的10美元退款,每个接收器的API返回状态已完成时,主接收器将获得10美元和10美元的退款。二级接收器10美元,但买家只能获得10美元的退款
API代码
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: your_app_id " https://svcs.sandbox.paypal.com/AdaptivePayments/Refund -d
"requestEnvelope.errorLanguage=en_US
requestEnvelope.errorLanguage = en_US
payKey = AP-95V43510SV018561T0
receiverList.receiver(0).email = receiver-1@example.com
receiverList.receiver(0).amount = 10.00
receiverList.receiver(0).email = receiver-2@example.com
receiverList.receiver(0).amount = 10.00
receiverList.receiver(0).email = primary-receiver-1@example.com
receiverList.receiver(0).amount = 10.00
currencyCode = USD
API响应:
responseEnvelope.timestamp:2015-08-12T22%3A21%3A54.003-07%3A00
responseEnvelope.ack:Success
responseEnvelope.correlationId:189c035575d2d
responseEnvelope.build:17603431
currencyCode:USD
refundInfoList.refundInfo(0).receiver.amount:10.00
refundInfoList.refundInfo(0).receiver.email:reciver-1%40example.com
refundInfoList.refundInfo(0).refundStatus:REFUNDED
refundInfoList.refundInfo(0).refundNetAmount:9.71
refundInfoList.refundInfo(0).refundFeeAmount:0.29
refundInfoList.refundInfo(0).refundGrossAmount:10.00
refundInfoList.refundInfo(0).totalOfAllRefunds:10.00
refundInfoList.refundInfo(0).refundHasBecomeFull:false
refundInfoList.refundInfo(0).encryptedRefundTransactionId:4R029320L1387345S
refundInfoList.refundInfo(0).refundTransactionStatus:COMPLETED
refundInfoList.refundInfo(1).receiver.amount:10.00
refundInfoList.refundInfo(1).receiver.email:reciver-2%40example.com
refundInfoList.refundInfo(1).refundStatus:REFUNDED
refundInfoList.refundInfo(1).refundNetAmount:9.71
refundInfoList.refundInfo(1).refundFeeAmount:0.29
refundInfoList.refundInfo(1).refundGrossAmount:10.00
refundInfoList.refundInfo(1).totalOfAllRefunds:10.00
refundInfoList.refundInfo(1).refundHasBecomeFull:false
refundInfoList.refundInfo(1).encryptedRefundTransactionId:94P25967RW2250454
refundInfoList.refundInfo(1).refundTransactionStatus:COMPLETED
refundInfoList.refundInfo(2).receiver.amount:10.00
refundInfoList.refundInfo(2).receiver.email:primary-reciver%40example.com
refundInfoList.refundInfo(2).refundStatus:REFUNDED
refundInfoList.refundInfo(2).refundNetAmount:10.00
refundInfoList.refundInfo(2).refundFeeAmount:0.00
refundInfoList.refundInfo(2).refundGrossAmount:10.00
refundInfoList.refundInfo(2).totalOfAllRefunds:10.00
refundInfoList.refundInfo(2).refundHasBecomeFull:false
refundInfoList.refundInfo(2).encryptedRefundTransactionId:48K03063M44155052
refundInfoList.refundInfo(2).refundTransactionStatus:COMPLETED
提前感谢您的帮助
答案 0 :(得分:0)
您需要将金额指定为20美元:
receiverList.receiver(0).email = primary-receiver-1@example.com
receiverList.receiver(0).amount = 20.00
因此,您在退款API中与主要收件人关联的金额将会返还给买方。