你好,我试图在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
用这个替换你的代码,贝宝弃用了一些类似的字段
付款到PAYMENTREQUEST_n_PAYMENTACTION
AMT至PAYMENTREQUEST_n_AMT
自定义到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调用中进行这些更改应该没问题。
在"SetExpressCheckout"API调用中传递两个与货币相关的参数,如下所示:
$nvpstr=$nvpstr。"&CURRENCYCODE="$currencyCodeType
$nvpstr.='&PAYMENTREQUEST_0_currentcode='$currencyCodeType
但在"DoExpressCheckoutPayment"API调用中,您只传递了一个:
$nvpstr=$nvpstr。"&PAYMENTREQUEST_0_CURRENCYCODE="$货币
您应该在API调用中只传递一个与货币相关的参数:$nvpstr.='&PAYMENTREQUEST_0_currentcode='$currencyCodeType
一旦您在"SetExpressCheckout"API调用中进行了这些更改,就应该很好了