kumari shwetha
kumari shwetha

Reputation: 1

PHP session is automatically gets destroyed after payu payment gateway redirect

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

Upvotes: 0

Views: 2665

Answers (2)

Aman Chaurasiya
Aman Chaurasiya

Reputation: 26

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.

Upvotes: 1

Sumit Wadhwa
Sumit Wadhwa

Reputation: 3227

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

Upvotes: 1

Related Questions