0
votes

I have gone through all the post related to this issue but i didn't find any specific solutions w.r.t my scenario and after trying these alternatives still the problem persist.

I am using paypal sandbox and below is the response from doExpressCheckout api response which is success.

EC%2d9VU62103VP339240X&
SUCCESSPAGEREDIRECTREQUESTED=false&
TIMESTAMP=2015%2d02%2d03T12%3a18%3a36Z&
CORRELATIONID=7c3edc0fdf0dd&
ACK=Success&VERSION=119%2e0&
BUILD=15110743&INSURANCEOPTIONSELECTED=false&
SHIPPINGOPTIONISDEFAULT=false&
PAYMENTINFO_0_TRANSACTIONID=61065405X5999873U&
PAYMENTINFO_0_TRANSACTIONTYPE=expresscheckout&PAYMENTINFO_0_PAYMENTTYPE=instant&
PAYMENTINFO_0_ORDERTIME=2015%2d02%2d03T12%3a18%3a36Z&PAYMENTINFO_0_AMT=598%2e90&
PAYMENTINFO_0_FEEAMT=17%2e67&
PAYMENTINFO_0_TAXAMT=0%2e00&PAYMENTINFO_0_CURRENCYCODE=USD&
PAYMENTINFO_0_PAYMENTSTATUS=Completed&PAYMENTINFO_0_PENDINGREASON=None&
PAYMENTINFO_0_REASONCODE=None&PAYMENTINFO_0_PROTECTIONELIGIBILITY=Eligible&
PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE=ItemNotReceivedEligible%2cUnauthorizedPaymentEligible&
PAYMENTINFO_0_SECUREMERCHANTACCOUNTID=B59AFL78MCNRA&PAYMENTINFO_0_ERRORCODE=0&PAYMENTINFO_0_ACK=Success

Now i am using the transaction id from this response for calling DoCapture api but i am getting "10609 Transaction id is invalid". Please note that in paypal the transaction is confirmed and i can see it there.

Below is the request for DoCapture api:

COMPLETETYPE=Complete&AMT=598.9
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&METHOD=DoCapture&
AUTHORIZATIONID=61065405X5999873U&PAYMENTREQUEST_0_CURRENCYCODE=USD
&VERSION=119.0&
USER=xxxxxxxxxxxxxxxxx
PWD=xxxxxxxxx&
SIGNATURE=xxxxxxxxx

Response:

AUTHORIZATIONID=61065405X5999873U&TIMESTAMP=2015%2d02%2d03T11%3a36%3a42Z&CORRELATIONID=233e0f1acfe90&ACK=Failure&VERSION=119%2e0&BUILD=15110743&L_ERRORCODE0=10609&L_SHORTMESSAGE0=Invalid%20transactionID%2e&L_LONGMESSAGE0=Transaction%20id%20is%20invalid%2e&L_SEVERITYCODE0=Error

Please provide your valuable suggestions.

1

1 Answers

0
votes

You do not need to call DoCapture -- and indeed cannot call DoCapture -- to capture a sale transaction. A sale transaction, which is what you did in DoExpressCheckout, immediately transfers the money to your account. The transaction is complete as soon as DoExpressCheckout returns.

If you want to only authorize the payment in DoExpressCheckout you would need to specify PAYMENTACTION=Authorization. This will create a pending authorization instead of a sale transaction in the DoExpressCheckout call; you would then call DoCapture at a later time (such as when you have shipped the goods) to complete the pending transaction and move the funds to your account.