Question

Here is the problem - I am using Codeigniter as my framework and integrating Paypal Express Checkout. The library that I am using is the CI_MERCHANT and it works quite fine however when I print_r the parameters sending in and then asking a GetTransactionDetails back they are different

Here is what i am sending over:

    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
)

The Response I get is:

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
}

I have tried the following: using different version declaration. I know that SHIPPINGAMT and TAXAMT have been deprecated since version 63.0 so i have tried to use it and set it to version 61 to no avail.

Also inside the sandbox account the "client" is only charged the ITEMAMT and not the full amount with the shipping. However during checkout it does pass the amount as the total being displayed is the ITEMAMT + SHIPPING + TAX.

anyone got a n idea what is going on?

Appreciated.

Était-ce utile?

La solution

I'm assuming you're calling GetExpressCheckoutDetails prior to calling DoExpressCheckoutPayment..??

I'm pretty sure what you're seeing is the expected result. Until DoExpressCheckoutPayment is called the shipping and tax amounts could change, so GECD wouldn't reflect anything yet.

When you redirect to PayPal are you seeing the shipping and tax included in the order review? If so then you're doing everything correctly. It's just that, again, GECD doesn't include those details since they could change. For example, you could call GECD to obtain the payer's shipping address so that you could then calculate shipping and tax accordingly, and that could be different than what you sent with SEC.

Anyway, check that you're able to see what you send in SEC in the review pages at PayPal, and then finalize everything with DECP and I'm guessing you'll see that it gets included as expected (so long as you include it the same way in your DECP request.)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top