I\'m making one web app. I\'ve integrated Paypal in it using simple form submission to the Paypal site. Everything works well. but whenever the payment gets successful it sh
You have to enable auto return functionality setting in paypal .
Just follow the below steps to enable
For sandbox account do the following
For implement PayPal button html form parameters, use this
<form method=post action=https://api-3t.sandbox.paypal.com/nvp>
<input type=hidden name=USER value=API_username>
<input type=hidden name=PWD value=API_password>
<input type=hidden name=SIGNATURE value=API_signature>
<input type=hidden name=VERSION value=XX.0>
<input type=hidden name=PAYMENTREQUEST_0_PAYMENTACTION value=Sale>
<input name=PAYMENTREQUEST_0_AMT value=19.95>
<input type=hidden name=RETURNURL value=https://www.YourReturnURL.com>
<input type=hidden name=CANCELURL value=https://www.YourCancelURL.com>
<input type=submit name=METHOD value=SetExpressCheckout>
</form>
This page contains all the information you need https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECGettingStarted/
Or use the integration wizard to generate de form https://devtools-paypal.com/integrationwizard/ecpaypal/main.php
According to the spec for PayPal button parameters, you need to set the return method.
<input type='hidden' name='return' value='http://mysite.com/user_credits/purchase_credits'>
<input type='hidden' name='rm' value='1'>
The values are as follows:
0 - Don't redirect, and use GET.1 - Automatically redirect to the return URL using GET.2 - Automatically redirect to the return URL using POST, including all payment variables.