How do I setup a custom complete return url?

deyohong
Contributor
Contributor

I'm using a donate button and want to take donors back to my website after payment completed.  Is there a way to specify a dynamic Complete URL for each donation, i.e. using a variable (rather than a fixed URL)?

 

I've tried hidden fields and it doesn't make any difference (it always returns as GET method):

 

<form action="https://www.sandbox.paypal.com/donate" method="post" target="_top">

<input type="hidden" name="hosted_button_id" value="WHATEVER" />

<input type="hidden" name="rm" value="2" />

<input type="hidden" name="return" value="https://mywebsite.com/?paypal=complete&custom=COMPLETE-123" />

<input type="hidden" name="complete_url" value="https://mywebsite.com/?paypal=complete&custom=COMPLETE-URL-123" />

<input type="hidden" name="complete_return" value="https://mywebsite.com/?paypal==complete&custom=COMPLETE-RET-123" />

...

</form>

 

Note:  I can use IPN fine, but IPN is asynchronous and I want to give each specific user a confirmation page after PayPal payment is completed when they return to my website.  Problem with cookie and PHP session_id is that it doesn't always work.  The session_id changes when PayPal returns to my website.

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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