This question already has an answer here:
I have created an account in paypal sandbox and created 2 accounts one with some money for making payments. I use the signature details in my java program for getting paid. When the user click on pay with paypal button we will get a token from paypal and pass it to this URL:
https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=
After the successful payment i am not able to see any transactions in my paypal sandbox accounts? Why is it so, what is the mistake i am doing? I am using Google App Engine java and jsp. Please provide me any help full links for doing "Pay With Paypal"
Thanks.
First of all, I'd do a payment from one test account to another using the regular "Send Money" interface and check that the payment shows up, just to rule out the possibility that the PayPal sandbox is acting up.
As for express checkout, not only do you need to do a GetExpressCheckoutDetails after the user is returned to your site, but you'll also need to do DoExpressCheckoutPayment before the payment will show up (as pending or as completed, depending on whether you're doing a Sale or an Authorization. If you don't call DoExpressCheckoutPayment then PayPal assumes your user left your site or otherwise didn't confirm the transaction.
This is my favorite reference for how to do EC: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECSimpleIntegration
See my answer in Why is DoExpressCheckoutPayment required for Paypal?
In order to use Express Checkout, you must call at least the following API calls:
1.
SetExpressCheckout
-- to set up the transaction.2.
DoExpressCheckoutPayment
-- to finalize the transaction.If you don't call
DoExpressCheckoutPayment
on the page specified inSetExpressCheckout
'sRETURNURL
parameter, the transaction is not completed. This is by design to allow for greater flexibility in the checkout flow.Express Checkout is intended as a drop-in solution in your own checkout process. After Express Checkout redirects you back to your site, you're supposed to show an order confirmation where the buyer can review his/her final order details before initiating a button / link which initiates the final
DoExpressCheckoutPayment
API call. This is whyDoExpressCheckoutPayment
is required.