View Full Version : Using paypal

03-18-2008, 01:49 PM

I have a website where users can add products to a basket. Then when they are finished shopping they can continue to checkout where it redirects them to paypal. Once they have paid for the products on PayPal they are sent to a confirmation page on PayPal where it says 'Click here to return to {SITE NAME}'. When they are returned to the site it sends a post form so I can work out whether the payment was successful and therefore change the order record in the database accordingly.

However if they don't click on 'Click here to return to {SITE NAME}' even if they have paid I have no way of knowing whether the payment was successful causing an inconsistency. My question is how can I skip the step on PayPal where it asks if the user would like to return to the site and just automatically redirect them?


03-18-2008, 02:06 PM
You might need to do some editing but this might help.

03-19-2008, 05:49 PM
Thanks for your reply. Is there a simple way of doing this? I mean can I add something like this to my existing code:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="my@email.com">
<input type="hidden" name="item_name" value="Item name">
<input type="hidden" name="item_number" value="1234">
<input type="hidden" name="amount" value="19.95">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" value="Redirect" value="automatically">
<input type="submit" value="Buy Now">

03-19-2008, 05:57 PM
You need to read that article carefully. It tells you what you need to do to get things to work. The issue at hand is how the system handles the payments. Whether it uses PDT or IPN.

03-21-2008, 02:37 PM
Curt ...

If you haven't already, look into PayPal's free development website (the "sandbox").

This is a great PayPal feature that lets you create two test accounts ... the "buyer",
and the "seller". You actually can test your whole script exactly like a real PayPal
account, including actual credit card transactions, using a make-believe credit card.

Everything about it looks like a "real" PayPal account, but it's only for testing, so
the transactions are not real. They also have many good examples and snippets of
code for developers. Once you get your scripts working perfectly, you switch your
PayPal id to your REAL PayPal account.

This is a "must-have" for PayPal developers.