Returning from PayPal

OK all…

I have been beating my head against the wall trying to get hashtags to work with PayPal. I don’t know how I missed this other than the simple fact I never scrolled back to the top of the PayPal page when I was setting up/editing my return URLs, but here is the error message on the PayPal page:

"successful redirect url: URLs must include at least one period but not special characters (&, \’, “, >, <, *, [, {, ], }, \#, ~, !, $, |, ^, %) or upper ASCII characters.”

So… how are other programmers getting hashtags to work from PayPal, when hashtags are apparently not allowed as valid characters?

In that case you’ll need to not use a hash tag and just check whether any params match when a new Session is started.

An alternate approach would be to use either a HandleURL or HandleSpecialURL event and if the params you need from PayPal are there then redirect to your own site (with params you need to get customer details back, or by setting a cookie that you use on Session start, or by using either of those and a hash tag … there’s lots of ways to do it).

The simplest way is to look at the parameters names and content when there is such things as txn_id and payment_status = Completed.

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

Call a normal but dummy web page which immediately redirects to your site, but specifies a hash at that point?

If you want to deliver software, and be absolutely sure the caller is paypal returning, you can log all sales with IPN (Instant Payment Notification) and check the transaction ID and status against that log. That is what I have been doing for years on my site to deliver fonts upon return.

The difference with the OP is that instead of having an app that does everything, I use an app dedicated to delivery, and therefore do not have to go to anything but the default page.