-3

we are implementing instamojo payment gateway in PHP. After the payment transaction is successful while returning to our return URL, we are losing existing session values. So how to maintain our session values from payment page.

Nicolai Reuschling
  • 2,558
  • 2
  • 20
  • 24
  • Can you provide some code for us to review? It's kind of hard to pinpoint a problem without something to look at. – Derek Pollard Feb 01 '16 at 18:21
  • I am simply accessing the session variable by $_SESSION['user_id'] in webhook url on controller page and sending the userId to model page finally. But I am unable to access the session variable – priyanka chordiya Feb 01 '16 at 18:28
  • I understand your line of thinking, however, without something to look at, I would be making blind shots in the dark to an answer. – Derek Pollard Feb 01 '16 at 18:30
  • Controller:load->model('ordermodel'); $this->ordermodel->saveOrderDetails($_SESSION['user_id']); } } } ?> – priyanka chordiya Feb 01 '16 at 18:34

1 Answers1

0

There's a really good chance that you're going across domains if you're following the proper session cookie rules. For instance, if you're at mysite.com and you even switch to sub.mysite.com you're cookies are lost. It's just the way it works. There are a lot of clever ways to handle this of course, but all of them are way out of scope from anything I would type in here. I would google search for Single Sign On, as a starting point. Good luck.

Iwnnay
  • 1,933
  • 17
  • 18