Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal Express Checkout Integration Response

Tags:

paypal

I'm currently having a hard time trying to understand the response of my PayPal EC Integration.

GetExpressCheckoutDetails response is

[CHECKOUTSTATUS] => PaymentActionNotInitiated

but in DoExpressCheckout response, the

[PAYMENTINFO_0_PAYMENTSTATUS] => Completed

I'm confused, does this mean the buyer has been charged and the payment was successful or not? I cannot find answers in PayPal forum and portals either... weeeew

Below is the complete response details:

GetExpressCheckout response:

        [TOKEN] => EC-76768931K5394210Y
        [CHECKOUTSTATUS] => PaymentActionNotInitiated
        [TIMESTAMP] => 2012-10-20T07:15:22Z
        [CORRELATIONID] => 2b85ff556730a
        [ACK] => Success
        [VERSION] => 94.0
        [BUILD] => 3926908
        [EMAIL] => [email protected]
        [PAYERID] => 3PCFRVX65A7Y8
        [PAYERSTATUS] => verified
        [FIRSTNAME] => Test
        [LASTNAME] => Peepee
        [COUNTRYCODE] => US
        [CURRENCYCODE] => PHP
        [AMT] => 895.00
        [ITEMAMT] => 895.00
        [SHIPPINGAMT] => 0.00
        [HANDLINGAMT] => 0.00
        [TAXAMT] => 0.00
        [INVNUM] => 1231313213213
        [INSURANCEAMT] => 0.00
        [SHIPDISCAMT] => 0.00
        [L_NAME0] => Test Item
        [L_QTY0] => 1
        [L_TAXAMT0] => 0.00
        [L_AMT0] => 895.00
        [L_ITEMWEIGHTVALUE0] =>    0.00000
        [L_ITEMLENGTHVALUE0] =>    0.00000
        [L_ITEMWIDTHVALUE0] =>    0.00000
        [L_ITEMHEIGHTVALUE0] =>    0.00000
        [PAYMENTREQUEST_0_CURRENCYCODE] => PHP
        [PAYMENTREQUEST_0_AMT] => 895.00
        [PAYMENTREQUEST_0_ITEMAMT] => 895.00
        [PAYMENTREQUEST_0_SHIPPINGAMT] => 0.00
        [PAYMENTREQUEST_0_HANDLINGAMT] => 0.00
        [PAYMENTREQUEST_0_TAXAMT] => 0.00
        [PAYMENTREQUEST_0_INVNUM] => 1231313213213
        [PAYMENTREQUEST_0_INSURANCEAMT] => 0.00
        [PAYMENTREQUEST_0_SHIPDISCAMT] => 0.00
        [PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED] => false
        [L_PAYMENTREQUEST_0_NAME0] => Test Item
        [L_PAYMENTREQUEST_0_QTY0] => 1
        [L_PAYMENTREQUEST_0_TAXAMT0] => 0.00
        [L_PAYMENTREQUEST_0_AMT0] => 895.00
        [L_PAYMENTREQUEST_0_ITEMWEIGHTVALUE0] =>    0.00000
        [L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0] =>    0.00000
        [L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0] =>    0.00000
        [L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0] =>    0.00000
        [PAYMENTREQUESTINFO_0_ERRORCODE] => 0

DoExpressCheckout response:

        [TOKEN] => EC-76768931K5394210Y
        [SUCCESSPAGEREDIRECTREQUESTED] => false
        [TIMESTAMP] => 2012-10-20T07:15:27Z
        [CORRELATIONID] => ec7af38c18968
        [ACK] => Success
        [VERSION] => 94.0
        [BUILD] => 3926908
        [INSURANCEOPTIONSELECTED] => false
        [SHIPPINGOPTIONISDEFAULT] => false
        [PAYMENTINFO_0_TRANSACTIONID] => 02800680NT5556907
        [PAYMENTINFO_0_TRANSACTIONTYPE] => expresscheckout
        [PAYMENTINFO_0_PAYMENTTYPE] => instant
        [PAYMENTINFO_0_ORDERTIME] => 2012-10-20T07:15:26Z
        [PAYMENTINFO_0_AMT] => 895.00
        [PAYMENTINFO_0_FEEAMT] => 49.91
        [PAYMENTINFO_0_TAXAMT] => 0.00
        [PAYMENTINFO_0_CURRENCYCODE] => PHP
        [PAYMENTINFO_0_PAYMENTSTATUS] => Completed
        [PAYMENTINFO_0_PENDINGREASON] => None
        [PAYMENTINFO_0_REASONCODE] => None
        [PAYMENTINFO_0_PROTECTIONELIGIBILITY] => Ineligible
        [PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE] => None
        [PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => K3TTNE7MKRJUN
        [PAYMENTINFO_0_ERRORCODE] => 0
        [PAYMENTINFO_0_ACK] => Success

Thanks a lot! :)

like image 909
Woppi Avatar asked Oct 20 '12 07:10

Woppi


1 Answers

The payment does not take place until YOU call DoExpressCheckout.

In the first step (SetExpressCheckout + redirection to PayPal) the buyer is giving you authorization to charge him. It's now up to you to actually get his money by calling DoExpressCheckout.

If you call GetExpressCheckoutDetails after DoExpressCheckout, you should get a payment completed response.

Edit: One reason you may want to call GetExpressCheckoutDetails before DoExpresCheckout, is to get the address that the buyer selected, in case it may change the totals, so it's still a valid use case.

like image 118
Lenny Markus Avatar answered Sep 28 '22 12:09

Lenny Markus