您好我尝试在PayPal中使用EURO创建付款但收到错误。但是当我使用美元付款时,它运作正常。
[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
答案 0 :(得分:5)
用此替换你的代码,paypal弃用了某些字段,如
付款至 PAYMENTREQUEST_n_PAYMENTACTION
AMT 至 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调用它应该没问题。
答案 1 :(得分:0)
您正在“SetExpressCheckout”API调用中传递与货币相关的两个参数,如下所示:
$ nvpstr = $ nvpstr。 “& CURRENCYCODE =”。 $ currencyCodeType; 强>
<强> $ nvpstr = '&安培; PAYMENTREQUEST_0_CURRENCYCODE =' $ currencyCodeType; 强>
但是在“DoExpressCheckoutPayment”API调用中,您只传递了一个:
$ nvpstr = $ nvpstr。 “&安培; PAYMENTREQUEST_0_CURRENCYCODE =”。$货币; 强>
您应该在API调用中只传递一个与货币相关的参数: 。的 $ nvpstr = '&安培; PAYMENTREQUEST_0_CURRENCYCODE =' $ currencyCodeType; 强>
在“SetExpressCheckout”API调用中进行这些更改后,它应该没问题