贝宝API:购物车中物品金额的合计不匹配订单金额 [英] PayPal API: The totals of the cart item amounts do not match order amounts

查看:341
本文介绍了贝宝API:购物车中物品金额的合计不匹配订单金额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多关于此错误的帖子,但他们都没有对我适用。我真的不明白,为什么数额不匹配。我有ITEMAMT它匹配AMT0 * QTY0。而AMT匹配ITEMAMT + SHIPPINGAMT。我一遍又一遍地检查的文档,它真的应该以这种方式工作。它的工作原理,当我完全卸下装出来的......

在结账URL中的AMT是73.9了。

我真的希望有人熟悉很混乱的错误,并且知道我做错了...

在此先感谢

 阵列

    [TIMESTAMP] => 2013-01-24T22:56:09Z
    [的correlationID] =>
    [ACK] =>失败
    [VERSION] => 62.0
    [BUILD] => 4181146
    [L_ERROR code0 => 10413
    [L_SHORTMESSAGE0] =>交易拒绝了,因为一个无效的说法。详情请参见其他错误消息。
    [L_LONGMESSAGE0] =>购物车中物品金额的合计不匹配订单金额。
    [L_SEVERITY code0 =>错误

排列

    [PAYMENTREQUEST_0_PAYMENTACTION] =>拍卖
    [L_PAYMENTREQUEST_0_NAME0] => XXXX
    [L_PAYMENTREQUEST_0_NUMBER0] => 30533
    [L_PAYMENTREQUEST_0_DESC0] => XXXX
    [L_PAYMENTREQUEST_0_AMT0] => 30.95
    [L_PAYMENTREQUEST_0_QTY0] => 2
    [PAYMENTREQUEST_0_ITEMAMT] => 61.9
    [PAYMENTREQUEST_0_TAXAMT] => 0
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 12
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0
    [PAYMENTREQUEST_0_AMT] => 73.9
    [PAYMENTREQUEST_0_CURRENCY code =>美元
    [REQCONFIRMSHIPPING] => 1
    [PAYMENTREQUEST_0_SHIPTOSTREET] => XXXX
    [PAYMENTREQUEST_0_SHIPTOCITY] => XXXX
    [PAYMENTREQUEST_0_SHIPTOSTATE] => XX
    [PAYMENTREQUEST_0_SHIPTOCOUNTRY code => XX
    [PAYMENTREQUEST_0_SHIPTOZIP] => XXXXXX
    [PAYMENTREQUEST_0_SHIPTOPHONENUM] => XXXXXXXX


解决方案

回答我的问题可能是不利于你们中的大多数经过。但我的项目之一包含了一个与放大器;在描述(L_PAYMENTREQUEST_0_DESC0)。 '和;'逃脱通过与卷曲传递的数据。和创建该错误(这是完全关闭)。请记住,这也将当你把在将包含一个与放大器的任何字符发生;当URL正在连接$ C $例如CD é将成为&放大器; eacute;

我从我的第一篇取出物品描述道歉,但我不知道这有一些东西需要用它做,由于对大量的错误信息。

There are a lot of posts about this error, but they all not apply on me. I really don't understand why the amounts wouldn't match. I have ITEMAMT which matches AMT0 * QTY0. And AMT matches ITEMAMT + SHIPPINGAMT. I checked the docs over and over and it really should work this way. It works when I totally remove the shipping out of it...

The AMT in the checkout url is 73.9 too.

I really hope someone is familiar with this very confusing error, and knows what I am doing wrong...

Thanks in advance

Array
(
    [TIMESTAMP] => 2013-01-24T22:56:09Z
    [CORRELATIONID] =>
    [ACK] => Failure
    [VERSION] => 62.0
    [BUILD] => 4181146
    [L_ERRORCODE0] => 10413
    [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
    [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
    [L_SEVERITYCODE0] => Error
)
Array
(
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [L_PAYMENTREQUEST_0_NAME0] => XXXX
    [L_PAYMENTREQUEST_0_NUMBER0] => 30533
    [L_PAYMENTREQUEST_0_DESC0] => XXXX
    [L_PAYMENTREQUEST_0_AMT0] => 30.95
    [L_PAYMENTREQUEST_0_QTY0] => 2
    [PAYMENTREQUEST_0_ITEMAMT] => 61.9
    [PAYMENTREQUEST_0_TAXAMT] => 0
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 12
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0
    [PAYMENTREQUEST_0_AMT] => 73.9
    [PAYMENTREQUEST_0_CURRENCYCODE] => USD
    [REQCONFIRMSHIPPING] => 1
    [PAYMENTREQUEST_0_SHIPTOSTREET] => XXXX
    [PAYMENTREQUEST_0_SHIPTOCITY] => XXXX
    [PAYMENTREQUEST_0_SHIPTOSTATE] => XX
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => XX
    [PAYMENTREQUEST_0_SHIPTOZIP] => XXXXXX
    [PAYMENTREQUEST_0_SHIPTOPHONENUM] => XXXXXXXX
)

解决方案

The answer to my question is probably not helpful to most of you passing by. But one of my items contained an & in the description (L_PAYMENTREQUEST_0_DESC0). '&' escaped the data passed through with CURL. And that created the error (which is totally off). Remember that this will also happen when you put in any characters that will contain an & when the URL is being encoded e.g. é will become é

I apologize for removing the item description from my first post, but i had no idea this had something to do with it, due to the error message about amounts.

这篇关于贝宝API:购物车中物品金额的合计不匹配订单金额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆