0

这就是问题所在——我使用 Codeigniter 作为我的框架并集成了 Paypal Express Checkout。我正在使用的库是 CI_MERCHANT 并且它工作得很好但是当我 print_r 发送的参数然后询问 GetTransactionDetails 时它们是不同的

这是我要发送的内容:

    Array
(
    [METHOD] => SetExpressCheckout
    [VERSION] => 94.0
    [USER] => ***
    [PWD] => ***
    [SIGNATURE] => ***
    [PAYMENTREQUEST_0_PAYMENTACTION] => Authorization
    [PAYMENTREQUEST_0_CURRENCYCODE] => USD
    [PAYMENTREQUEST_0_AMT] => 37.95
    [PAYMENTREQUEST_0_ITEMAMT] => 35.95
    [PAYMENTREQUEST_0_DESC] => invoice-#test
    [PAYMENTREQUEST_0_TAXAMT] => 1.00
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 1.00
    [L_PAYMENTREQUEST_0_NAME0] => Item_1
    [L_PAYMENTREQUEST_0_DESC0] => 
    [L_PAYMENTREQUEST_0_AMT0] => 35.95
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [AMT] => 37.95
    [SOLUTIONTYPE] => Sole
    [LANDINGPAGE] => Billing
    [ALLOWNOTE] => 1
    [RETURNURL] => URL/ACCEPT
    [CANCELURL] => URL/DECLINE
    [PAYMENTREQUEST_0_SHIPTONAME] => first_name second_name
    [PAYMENTREQUEST_0_SHIPTOSTREET] => address1
    [PAYMENTREQUEST_0_SHIPTOSTREET2] => address2
    [PAYMENTREQUEST_0_SHIPTOCITY] => city
    [PAYMENTREQUEST_0_SHIPTOSTATE] => state
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US
    [PAYMENTREQUEST_0_SHIPTOZIP] => zip
    [PAYMENTREQUEST_0_SHIPTOPHONENUM] => 
    [PAYMENTREQUEST_0_EMAIL] => email@dot.com
    [PAYMENTREQUEST_0_INVNUM] => 1468808
    [upload] => 1
)

我得到的回应是:

Array
(
    [RECEIVEREMAIL] => ***
    [RECEIVERID] => ***
    [EMAIL] => email@dot.com
    [PAYERID] => ***
    [PAYERSTATUS] => verified
    [COUNTRYCODE] => US
    [SHIPTONAME] => first_name last_name
    [SHIPTOSTREET] => address1
    [SHIPTOCITY] => city
    [SHIPTOSTATE] => state
    [SHIPTOCOUNTRYCODE] => US
    [SHIPTOCOUNTRYNAME] => United States
    [SHIPTOZIP] => ZIP
    [ADDRESSOWNER] => PayPal
    [ADDRESSSTATUS] => Confirmed
    [INVNUM] => 1468808
    [SALESTAX] => 0.00
    [SUBJECT] => invoice-#test
    [TIMESTAMP] => 2013-07-03T01:29:04Z
    [CORRELATIONID] => b64ae0d8c4388
    [ACK] => Success
    [VERSION] => 94.0
    [BUILD] => 6561328
    [FIRSTNAME] => first_name
    [LASTNAME] => last_name
    [TRANSACTIONID] => ***
    [TRANSACTIONTYPE] => cart
    [PAYMENTTYPE] => instant
    [ORDERTIME] => 2013-07-03T01:29:02Z
    [AMT] => 35.95
    [TAXAMT] => 0.00
    [SHIPPINGAMT] => 0.00
    [HANDLINGAMT] => 0.00
    [CURRENCYCODE] => USD
    [PAYMENTSTATUS] => Pending
    [PENDINGREASON] => paymentreview
    [REASONCODE] => None
    [PROTECTIONELIGIBILITY] => Ineligible
    [PROTECTIONELIGIBILITYTYPE] => None
    [L_NAME0] => Item_1
    [L_QTY0] => 1
    [L_TAXAMT0] => 0.00
    [L_SHIPPINGAMT0] => 0.00
    [L_HANDLINGAMT0] => 0.00
    [L_CURRENCYCODE0] => USD
    [L_TAXABLE0] => false
    [L_AMT0] => 35.95
}

我尝试了以下方法:使用不同的版本声明。我知道 SHIPPINGAMT 和 TAXAMT 自 63.0 版以来已被弃用,因此我尝试使用它并将其设置为 61 版无济于事。

同样在沙盒帐户中,“客户”只收取 ITEMAMT 而不是运费的全部金额。但是,在结帐时,它确实通过了金额,因为显示的总数是 ITEMAMT + SHIPPING + TAX。

有人知道发生了什么吗?

赞赏。

4

1 回答 1

0

我假设您在调用 DoExpressCheckoutPayment 之前调用 GetExpressCheckoutDetails..??

我很确定你看到的是预期的结果。在调用 DoExpressCheckoutPayment 之前,运费和税额可能会发生变化,因此 GECD 不会反映任何内容。

当您重定向到 PayPal 时,您是否看到订单审核中包含运费和税金?如果是这样,那么你做的一切都是正确的。只是,再次,GECD 不包括这些细节,因为它们可能会改变。例如,您可以致电 GECD 以获取付款人的收货地址,以便您可以相应地计算运费和税金,这可能与您向 SEC 发送的内容不同。

无论如何,请检查您是否能够在 PayPal 的评论页面中看到您在 SEC 中发送的内容,然后使用 DECP 完成所有内容,我猜您会看到它按预期包含在内(只要您包含它与您的 DECP 请求中的方式相同。)

于 2013-07-03T04:09:52.980 回答