I know that we can define a return URL in forms for paypal payments. I wonder if we can define two return urls, one for success and another for fail pages. I looked arround but couldn't find proper info. Does anyone know if it can be done?


6 Years
Discussion Span
Last Post by FairBit

As far as I know, there can only be one call page for PayPal and it will include message with valid or invalid CC, etc


Hi !
All the programming is based on the binary system.In a binary there are only two values 0 or 1,true or false.At a one time you can do only one operation from both.


As the above posters have said, PayPal only accepts one Return URL. However, you can also define a Cancel URL for if the user cancels the transaction while on the PayPal site. Perhaps this is what you are looking for? Check this list of PayPal HTML variables for more info. I believe that the variable in question is called "cancel_return".

Alternatively, if you're interested in receiving information from PayPal about whether a transaction has been successful or not, you need to configure Instant Payment Notifications. These are POST requests from PayPal which go to a special URL which you provide, containing a lot of information about the transaction. Setting these up is an entirely different barrel of monkeys, however. I'd recommend reading PayPal's guide to IPNs if this is the functionality that you're looking for. It is really useful so definitely worth checking out.

Hope this helps!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.