Friday, January 25, 2013

maintaining session after redirect from payment (credit card) post

I was facing this exact problem in CakePHP, the answer was to use Security.low in core.php !:

(http://cakephp.1045679.n5.nabble.com/After-auto-redirect-from-another-domain-site-the-session-was-lost-td1324708.html)

Hey Guys,
Let me write down the steps to reproduce my problem:
Reproduce steps:
1. Customer login my site(https://www.mysite.com);
2. Choose a product and redirect to Paypal sandbox site(https://developer.paypal.com/cgi-bin/devscr) to complete the payment;
3. After the payment, the customer will be auto redirected to my site;
4. And then the customer session was lost.

I find the solution in Paypal forums, said that :

You could pass your "session variable" Through PayPal variable "custom" than read it back in when the buyer is returned to your site after completing the PayPal payment or through the IPN POST.
 
You could also use an authentication cookie which would stick around while the customer made a payment on PayPal's website and when they returned to your site they would still be authorized.
I try to store the session in my post form and get it after the redirect from paypal site.
And then I use $this->Session->id($lastSessionID) to restore it. But fail as before.

Is there anybody has the idea how to implement it in Cake App?
Appreciate for any reply from you.

-- 
Thanks
Joshua


thanks indeed

cancel script completely on ctrl-c

I found this question interesting: basically how to cancel completely a script and all child processes : You do this by creating a subro...