我希望paypal快速结账页面以$ AUD显示总计,但不会接受。
这没问题
$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并不重要,它总是返回该错误。我已经尝试过Caps而且没有帽子,检查空白等等。
还尝试了每个建议的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
";
是什么给出了?
答案 0 :(得分:0)
我认为你必须对货币类型进行网址编码。
如:
PAYMENTREQUEST_0_CURRENCYCODE'=>urlencode('GBP')