您好,我尝试在 PayPal 中使用欧元创建付款,但出现错误。但是当我使用美元付款时它工作正常。
[TIMESTAMP] => 2014-09-26T10:03:06Z
[CORRELATIONID] => 4d802c104e0ae
[ACK] => Failure
[VERSION] => 64
[BUILD] => 13055236
[L_ERRORCODE0] => 10444
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => The transaction currency specified must be the same as previously specified.
[L_SEVERITYCODE0] => Error
最佳答案
用这个替换你的代码,paypal 不推荐使用一些字段,比如
PAYMENTACTION 到 PAYMENTREQUEST_n_PAYMENTACTION
AMT TO PAYMENTREQUEST_n_AMT
CUSTOM 到 PAYMENTREQUEST_n_CUSTOM
$nvpstr = "&TOKEN=" . $token;
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_PAYMENTACTION=Sale";
$nvpstr = $nvpstr . "&PAYERID=" . $payerID;
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_AMT=" . $paymentAmount;
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_CUSTOM=" . $userId;
$nvpstr = $nvpstr . "&PAYMENTREQUEST_0_CURRENCYCODE=".$currency;
您在“DoExpressCheckoutPayment”API 调用中进行这些更改应该没问题。
关于php - 指定的交易货币必须与之前指定的相同,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26057138/