0

I am working on an e-commerce test website.

  1. in my checkout page session is on works fine.

  2. after checkout, redirecting to payu money gateway website for payment

  3. after payment it is redirecting to my e-commerce website. Now my session gets destroyed.

It shouldn't destroy until unless the user logs out from the website. It is not my code problem, because it is redirecting to my website from payu website. but the session is automatic gets destroyed

Raptor
  • 53,206
  • 45
  • 230
  • 366

2 Answers2

1

before starting your session:

maybe try this:

 // 1 week = 604800 seconds
 // server should keep session data for exactly (or at least) 1 week
 ini_set('session.gc_maxlifetime', 604800);

 // each client should remember their session id for EXACTLY 1 week
 session_set_cookie_params(604800);

 session_start(); // start the session
Sumit Wadhwa
  • 2,825
  • 1
  • 20
  • 34
1

I have a solution after implementing on the ecommerce i can say it actually happens- 1.just store the information like transation_id,user_id and status. 2.On the behlaf of the responce it will return transation_id so we can easily handle by transation_id and status.