gpt4 book ai didi

多次 try catch 时出现 Paypal 错误消息 'Buyer cannot pay.'

转载 作者:太空宇宙 更新时间:2023-11-03 16:00:00 25 4
gpt4 key购买 nike

我使用 Paypal 的 Express Checkout。问题是,当我多次尝试获取授权时。我收到失败响应。

这笔付款的总金额是 800。

我想获取每个项目的授权。

这是第一个请求。我尝试在“L_AMT0”中捕获项目数量

    $captureData = array(
'AUTHORIZATIONID' => $payment->payment_id,
'AMT' => $amount, // '41.00'
'COMPLETETYPE' => 'Complete',
'CURRENCYCODE' => 'SGD',
);

$response = $merchant->doCapture($captureData);

这是捕获第一个项目后的第一个响应的某些部分。一切看起来都很好。

'ACK' => string 'Success' (length=7)
'TRANSACTIONTYPE' => string 'cart' (length=4)
'PAYMENTTYPE' => string 'instant' (length=7)
'AMT' => string '800.00' (length=6)
'L_AMT0' => string '759.00' (length=6)
'L_AMT1' => string '41.00' (length=5)

所以我做了第二笔钱并得到了这个错误。

'AUTHORIZATIONID' => string '*****************' (length=17)
'TIMESTAMP' => string '2015-09-09T09:14:51Z' (length=20)
'CORRELATIONID' => string '*************' (length=13)
'ACK' => string 'Failure' (length=7)
'VERSION' => string '115' (length=3)
'BUILD' => string '17972692' (length=8)
'L_ERRORCODE0' => string '10606' (length=5)
'L_SHORTMESSAGE0' => string 'Buyer cannot pay.' (length=17)
'L_LONGMESSAGE0' => string 'Transaction rejected, please contact the buyer.' (length=47)
'L_SEVERITYCODE0' => string 'Error' (length=5)

那么你能帮我找出我的请求有什么问题吗?

最佳答案

好的,我现在找到了解决方案。

只需将第一次和后续捕获的 COMPLETETYPE 更改为“NotComplete”即可。

然后在最后一次捕获时将其更改为“完成”。

https://developer.paypal.com/docs/classic/api/merchant/DoCapture_API_Operation_NVP/

关于多次 try catch 时出现 Paypal 错误消息 'Buyer cannot pay.',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32476104/

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