如何退还部分金额在贝宝自适应支付



我在paypal自适应支付&我需要用API退款,我可以全额退款,但我也需要退还部分金额
参考url,我正在使用:https://developer.paypal.com/docs/classic/api/adaptive-payments/Refund_API_Operation/
eg-付款时的总金额为100 &我只需要退还50.00

i try以下代码/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 
&transactionId=AP-95V43510SV018561T0"

,尝试以下输入设置退款金额

&amount = 50.0

&amount = XS:50.0

但是这些都不起作用只是全额退款

对您的请求有效负载进行一点更正,"AP-95V43510SV018561T0"是一个付费密钥值(从Pay api响应获得),名称对应该是payKey = AP-95V43510SV018561T0

带有最小参数的部分退款有效负载是这样的,假设您刚刚进行了100美元的交易,并准备进行50美元的退款:

requestEnvelope.errorLanguage = en_US
detailLevel = ReturnAll 
payKey = AP-95V43510SV018561T0
receiverList.receiver(0).email = receiver@paypal.com
receiverList.receiver(0).amount = 50.00
currencyCode = USD

和API响应:

responseEnvelope.timestamp=2015-08-06T07:39:08.861-07:00
responseEnvelope.ack=Success
responseEnvelope.correlationId=2e7007b68f85b
responseEnvelope.build=17603431
currencyCode=USD
refundInfoList.refundInfo(0).receiver.amount=50.00
refundInfoList.refundInfo(0).receiver.email=receiver@paypal.com
refundInfoList.refundInfo(0).refundStatus=REFUNDED
refundInfoList.refundInfo(0).refundNetAmount=48.05
refundInfoList.refundInfo(0).refundFeeAmount=1.95
refundInfoList.refundInfo(0).refundGrossAmount=50.00
refundInfoList.refundInfo(0).totalOfAllRefunds=50.00
refundInfoList.refundInfo(0).refundHasBecomeFull=false
refundInfoList.refundInfo(0).encryptedRefundTransactionId=96U15993F0258151X
refundInfoList.refundInfo(0).refundTransactionStatus=COMPLETED

相关内容

  • 没有找到相关文章

最新更新