cancel
Showing results for 
Search instead for 
Did you mean: 

Payment details in return URL?

Options
Go to solution
Seymour_Clufley
Contributor
Posted on

Hello. I would like a donation button on my website that, when clicked, does the following:
 
1. the person is transferred to Paypal
2. donates an arbitrary amount which they specify there
3. and is transferred back to my website, to a page where they are thanked for donating the amount they donated.
 
So ideally, the page they are returned to on my website would have parameters in its URL, something like:
www.mywebsite.com/donation_return_page.html?amount=10&currency=USD
And then my site's javascript would craft the thankyou message.
 
The key thing is the payment details being included in the return URL. Can Paypal do this?
 
Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Solved

Payment details in return URL?

Options
Go to solution
MTS_Aaron
Moderator

Hi,

 

We have our IPN/PDT to help processing payment information.

 

It does not work 100% the way you explain but it might help:

 

https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/

 

Basically we send the information to the URL you specify for your listener script to process order information.

 

Then, for the return URL information, we have PDT: https://developer.paypal.com/docs/classic/products/payment-data-transfer/

 

https://github.com/paypal/pdt-code-samples

 

We would recommend going IPN instead of PDT but you can integrate both if you are brave 🙂

 

Cheers

Aaron

 

 

View solution in original post

3 REPLIES 3
Solved

Payment details in return URL?

Options
Go to solution
MTS_Aaron
Moderator

Hi,

 

We have our IPN/PDT to help processing payment information.

 

It does not work 100% the way you explain but it might help:

 

https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/

 

Basically we send the information to the URL you specify for your listener script to process order information.

 

Then, for the return URL information, we have PDT: https://developer.paypal.com/docs/classic/products/payment-data-transfer/

 

https://github.com/paypal/pdt-code-samples

 

We would recommend going IPN instead of PDT but you can integrate both if you are brave 🙂

 

Cheers

Aaron

 

 

View solution in original post

Payment details in return URL?

Options
Go to solution
Seymour_Clufley
Contributor

Thank you very much, Aaron. IPN looks more complex to implement, and also surplus to my requirements, so I think I'll go with PDT - at least for now.

 

I need to make sure that I am understanding correctly. Please let me know if any of the below is incorrect:

 

1. Once Paypal processes the customer's payment, the customer's browser is re-directed to:

www.mywebsite.com/my_return_page?transactionid=97543828

 

2. Javascript in that page gets the transaction ID from the URL, then sends a POST request to Paypal for the details of that transaction

 

3. Paypal responds, and my Javascript receives the details.

 

Is that how it works?

Payment details in return URL?

Options
Go to solution
MTS_Aaron
Moderator

Hi,

 

Under my understanding I would agree to your definition, yes.

 

Aaron

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.