PayPal - 不支持货币

时间:2014-06-10 05:07:52

标签: php paypal opencart express-checkout

我的客户端错误totals of the cart item amounts do not match order amounts。我是OpenCart&的新手。贝宝。我在StackOverflow上看到了其他一些帖子

  1. Paypal The totals of the cart item amounts do not match order amounts

  2. PayPal API: The totals of the cart item amounts do not match order amounts

  3. http://www.opencart.com/index.php?route=extension/extension/info&extension_id=16699

  4. 我在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
    )
    

2 个答案:

答案 0 :(得分:2)

您的货币代码值目前设置为" INR"这不是PayPal的有效货币代码。查看currency code docs,了解有关可用且有效的货币代码的详细信息。

答案 1 :(得分:0)

我会尝试传递运费金额:

[PAYMENTREQUEST_0_SHIPPINGAMT] =>3250.00

您的示例中未使用该变量。