I have code that creates a session variables for a user on one page. Before the data is entered in the database they go to PayPal to checkout and come back to the site. When they come back those session variables created for the user sometimes remain and sometimes return as NULL.
User enters their information creates session variables -> Go to PayPal, checkout -> Come back to the site, session variables are sometimes retained going into the database, sometimes not
I cannot figure out for the life of my why it does it sometimes and not other times. Is there something about sessions that I am missing? Any ideas?
Make sure you’re calling session_write_close() before redirecting to Paypal.