Dec 6th, 2007, 06:55 PM
Urlmapping with paypal return urls
Loving Spring. I am stuck though, to do with urlMapping (org.springframework.web.servlet.handler.SimpleUrl HandlerMapping). For those of you who dont know, when integrating with Paypal you can set the return to URL if a payment is successful, and another one if the payment is cancelled. For myself I want to set a url like
and if a payment passes I want to set it as
How do I do this using the SimpleURLHandler?
do I need to put a * to replace all the request parameters in the URL? Or will the SimpleUrlHandler deal with just the url up until the frist parameter?
Can I match on /paymentpassed.paypal or *.paypal or do I have to do something like paymentpassed.paypal*?
Dec 7th, 2007, 05:55 PM
As I remember, PayPal takes money and gives you nothing back... including parameters! Since you have to set up the return URL's with PayPal, you really can't have, say a paymentId or an accountId passed nicely back to you.
You may want to either store the information in a database by sessionId, and have the information you need to present upon completion or cancellation ready when they come back to you.
Also, keep in mind that, with my experiences, people generally don't 'Return to Merchant' in PayPal, so make sure you are not depending on that! I would be nice if they sent people automatically back.
Dec 9th, 2007, 02:37 AM
Feb 11th, 2011, 01:44 PM