Abhishek gupta
Abhishek gupta

Reputation: 463

Paypal Integration Post processing information

I have created a simple button, on a click of it direct it to the paypal site for the payment.

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="cmd" value="_xclick" />
    <input type="hidden" name="business" value="[email protected]" />

    <input type="Show" name="item_name" value="My painting" />
    <input type="Show" name="amount" value="10.00" /> 
    <input type="submit" value="Buy!" />
</form>

Now what I am trying to do is to redirect to my own page with the transaction successful notification.

I have read websites articles but nothing is providing me with the Solution. Need help regarding to this issue.

Upvotes: 0

Views: 238

Answers (1)

canderso
canderso

Reputation: 662

Use PayPal Instant Payment Notification (IPN), more information here: https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/article_pdn_intro-outside.

Here's a code sample:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="item_name" value="doodad from alanb.com">
<input type="hidden" name="item_number" value="dd01">
<input type="hidden" name="amount" value="4.99">
<input type="hidden" name="return" value="http://alanb.com/doodads/thanks.html">
<input type="hidden" name="cancel_return" value="http://alanb.com/doodads/canceled.html">
<input type="image" border="0" name="submit" src="http://images.paypal.com/images/x-click-but5.gif" alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée">
</form>

The trick is done by the "return" input element ;).

Another thing that helped me a lot when setting up PayPal Integral Evolution on my website, was this PDF: https://cms.paypal.com/cms_content/FR/en_US/files/developer/IntegralEvolution.pdf. It documents all fields, possible values and how to use them.

Hope this helps, Carl

Upvotes: 1

Related Questions