0

我希望贝宝快速结帐页面以澳元显示总额,但它不接受。

这工作没问题

$nvpStr =  "&RETURNURL=$returnURL
            &CANCELURL=$cancelURL
            &PAYMENTREQUEST_0_PAYMENTACTION=Sale
            &PAYMENTREQUEST_0_AMT=$total
            &PAYMENTREQUEST_0_ITEMAMT=$total
            &L_PAYMENTREQUEST_0_NAME0=$name
            &L_PAYMENTREQUEST_0_QTY0=$quantity
            &L_PAYMENTREQUEST_0_AMT0=$price
            &L_PAYMENTREQUEST_0_DESC0=$description
            &NOSHIPPING=1 
            ";

但这会返回错误代码 [L_LONGMESSAGE1] => 不支持货币。

$nvpStr =  "&RETURNURL=$returnURL
            &CANCELURL=$cancelURL
            &PAYMENTREQUEST_0_PAYMENTACTION=Sale
            &PAYMENTREQUEST_0_AMT=$total
            &PAYMENTREQUEST_0_ITEMAMT=$total
            &PAYMENTREQUEST_0_CURRENCYCODE=AUD
            &L_PAYMENTREQUEST_0_NAME0=$name
            &L_PAYMENTREQUEST_0_QTY0=$quantity
            &L_PAYMENTREQUEST_0_AMT0=$price
            &L_PAYMENTREQUEST_0_DESC0=$description
            &NOSHIPPING=1 
            ";

事实上,无论我选择什么代码 PAYMENTREQUEST_0_CURRENCYCODE , EUR, USD ,它总是返回那个错误。我试过大写和没有大写,检查空格等。

还尝试了每个建议中的 url 编码货币代码,但同样的错误。

$cc = urlencode("AUD");

    $nvpStr =  "&RETURNURL=$returnURL
                &CANCELURL=$cancelURL
                &PAYMENTREQUEST_0_PAYMENTACTION=Sale
                &PAYMENTREQUEST_0_AMT=$total
                &PAYMENTREQUEST_0_ITEMAMT=$total
                &PAYMENTREQUEST_0_CURRENCYCODE=$cc
                &L_PAYMENTREQUEST_0_NAME0=$name
                &L_PAYMENTREQUEST_0_QTY0=$quantity
                &L_PAYMENTREQUEST_0_AMT0=$price
                &L_PAYMENTREQUEST_0_DESC0=$description
                &NOSHIPPING=1 
                ";

是什么赋予了?

4

1 回答 1

0

我认为您必须对货币类型进行 url 编码。

如:

PAYMENTREQUEST_0_CURRENCYCODE'=>urlencode('GBP')
于 2012-04-25T04:59:02.290 回答