2014-09-26 41 views
2

您好,我尝试在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

您在指定货币的方式可能有错误。显示你的代码。 – RST 2014-09-26 10:20:12

+0

请回顾一下http://teste.ebroselow.com/Paypal.php – Hasibur 2014-09-26 10:34:28

+0

我指的是您的代码,而不是代码示例。这个例子使用澳元 – RST 2014-09-26 10:38:47

回答

4

替换这个代码,贝宝弃用像

PAYMENTACTION一些领域PAYMENTREQUEST_n_PAYMENTACTION

AMT TO PAYMENTREQUEST_n_AMT

CUSTOMPAYMENTREQUEST_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调用它应该罚款。

0

您传递有关货币的 “SetExpressCheckout” API调用像下面两个参数:

$ nvpstr = $ nvpstr。 “& CURRENCYCODE =”。 $ currencyCodeType;

$ nvpstr = '& PAYMENTREQUEST_0_CURRENCYCODE =' $ currencyCodeType。;

但在 “DoExpressCheckoutPayment” API调用你只有一个路过:

$ nvpstr = $ nvpstr。 “& PAYMENTREQUEST_0_CURRENCYCODE =”。$ currency;

你应该只通过两个API调用有关货币一个参数:。 $ nvpstr = '& PAYMENTREQUEST_0_CURRENCYCODE =' $ currencyCodeType;

一旦你在你的 “SetExpressCheckout” 这些变化的API调用它应该罚款

+0

我已经改变了这一点,但不工作。 – Hasibur 2014-09-26 10:55:12

+0

但在上面的“http://teste.ebroselow.com/Paypal.php”网址中,仍然是通过这两个参数。 – Eshan 2014-09-26 11:03:25

+0

其演示文件我已经从我原来的代码 – Hasibur 2014-09-26 11:45:30