我的客户遇到此错误 购物车商品总金额与订单金额不匹配
。我是 OpenCart 和 PayPal 的新手。我在 StackOverflow 上看到了其他一些帖子
Paypal The totals of the cart item amounts do not match order amounts
PayPal API: The totals of the cart item amounts do not match order amounts
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=16699
我已经在 OpenCart 扩展模块上面尝试过了
catalog/model/payment/pp_express.php
更改行号 261
$item_total = number_format($item_total + $item_price, 2);
到
$item_total = number_format($item_total + $item_price, 2, '.', '');
更改行号 180
$item_total += number_format($item_price * $item['quantity'], 2);
到
$item_total += number_format($item_price * $item['quantity'], 2, '.', '');
更改行号 187
$data['L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE' . $i] = number_format($weight / $item['quantity'], 2);
到
$data['L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE' . $i] = number_format($weight / $item['quantity'], 2, '.', '');
更改行号 267
$data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($item_total, 2);
到
$data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($item_total, 2, '.', '');
更改行号 268
$data['PAYMENTREQUEST_0_AMT'] = number_format($item_total, 2);
到
$data['PAYMENTREQUEST_0_AMT'] = number_format($item_total, 2, '.', '');
现在,我收到Currency is not supported
错误。我该如何解决这些 paypal 错误?
Array
(
[METHOD] => SetExpressCheckout
[MAXAMT] => 99.92
[RETURNURL] => http://www.domain.com/demo/index.php?route=payment/pp_express/checkoutReturn
[CANCELURL] => http://www.domain.com/demo/index.php?route=checkout/checkout
[REQCONFIRMSHIPPING] => 0
[NOSHIPPING] => 1
[LOCALECODE] => EN
[LANDINGPAGE] => Login
[HDRIMG] =>
[HDRBORDERCOLOR] =>
[HDRBACKCOLOR] =>
[PAYFLOWCOLOR] =>
[CHANNELTYPE] => Merchant
[ALLOWNOTE] => 0
[PAYMENTREQUEST_0_SHIPPINGAMT] =>
[PAYMENTREQUEST_0_CURRENCYCODE] => INR
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[L_PAYMENTREQUEST_0_DESC0] =>
[L_PAYMENTREQUEST_0_NAME0] => Blue Saree with White Embroidery Design
[L_PAYMENTREQUEST_0_NUMBER0] => K7107
[L_PAYMENTREQUEST_0_AMT0] => 1480.00
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_ITEMURL0] => http://www.domain.com/demo/index.php?route=product/product&product_id=112
[L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0] => 1.25
[L_PAYMENTREQUEST_0_ITEMWEIGHTUNIT0] => kg
[L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0] => 12.00000000
[L_PAYMENTREQUEST_0_ITEMLENGTHUNIT0] => in
[L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0] => 11.00000000
[L_PAYMENTREQUEST_0_ITEMWIDTHUNIT0] => in
[L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0] => 10.00000000
[L_PAYMENTREQUEST_0_ITEMHEIGHTUNIT0] => in
[L_PAYMENTREQUEST_0_NUMBER1] => shipping
[L_PAYMENTREQUEST_0_NAME1] => Flat Shipping Rate
[L_PAYMENTREQUEST_0_AMT1] => 3250.00
[L_PAYMENTREQUEST_0_QTY1] => 1
[PAYMENTREQUEST_0_ITEMAMT] => 4730.00
[PAYMENTREQUEST_0_AMT] => 4730.00
)
最佳答案
您的货币代码值当前设置为“INR”,这不是 PayPal 的有效货币代码。检查currency code docs有关可用且有效的货币代码的详细信息。
关于php - Paypal - 不支持货币,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24133255/