1
votes

I have a simple button created with Paypal's Website Payments Standard, and I'm using the feature "Take customers to this URL when they finish checkout".

On that page which users are being redirected to when the purchase is successful (on my site) I'd like to simply display the email associated with their paypal purchase, telling them something like "an invoice will be sent to this email address: xxx".

Is that possible without using the API or IPN (which I'd rather avoid because it seems like I can't set different IPN urls for deifferent buttons/products.)

2

2 Answers

2
votes

Ended up using PDT, there's a great example of how to simply do this here: http://www.geekality.net/2010/10/19/php-tutorial-paypal-payment-data-transfers-pdt/

Thanks PP_MTS_Chad, I wouldn't have found it if it wasn't for you pointing out that option.

1
votes

You could use 1 of 2 ways to get information back to your return URL, without having to use IPN or an API. You could use PDT to return information back to your site, or you could use the return method which uses the variable "rm". You can find more out about IPN here, and there are also some sample scripts you can use on that site as well.

If you want to use the return method, this is a little different from PDT. With the return method you do not have to post the information back to PayPal to verify it. If you wanted PayPal to post the information over to your return page you would just simply enable auto return in your account under your profile. Then you would just include the following lines of code in your button code.

<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="http://www.mysite.com/return.php">

The variable "rm", controls how you want the information sent back to you. You can set it to be a GET or a POST.

Allowable values are:

0 – all shopping cart payments use the GET method

1 – the buyer's browser is redirected to the return URL by using the GET method, but no payment variables are included

2 – the buyer's browser is redirected to the return URL by using the POST method, and all payment variables are included

The default is 0.

Note: The rm variable takes effect only if the return variable is set.