gpt4 book ai didi

paypal - 如何在paypal自适应支付中退还部分金额

转载 作者:太空宇宙 更新时间:2023-11-03 15:52:32 27 4
gpt4 key购买 nike

我正在使用 paypal 自适应支付,我需要使用 API 退款,我可以全额退款,但我也需要部分退款
我正在使用的引用网址:https://developer.paypal.com/docs/classic/api/adaptive-payments/Refund_API_Operation/
例如-付款时的总金额是 100,我只需要退还 50.00

我尝试使用以下代码/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”是一个支付键值(从支付 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

关于paypal - 如何在paypal自适应支付中退还部分金额,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31853816/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com