Re: Session Vars not staying active

From: Date: Sat, 03 Aug 2013 19:53:15 +0000
Subject: Re: Session Vars not staying active
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-321780@lists.php.net to get a copy of this message
On Aug 3, 2013 3:03 PM, "dealTek" <dealtek@gmail.com> wrote: > > Hi all, > > > I am having trouble with session vars. > > I'm trying to implement the credit card direct pay method outlined here... > > http://developer.authorize.net/api/dpm/ > > - Basically, page 1 is my form that goes outside my site to the cc gateway company then comes back with a result... (PG2) > > Problem: if I try to create session vars on page 1 - they don't work on page 2. > > Am I correct in thinking that when this process leaves my site and goes to the gateway, then returns, it is similar to creating a new session and that is why the session vars don't remain active? > > Thanks in advance. Are you calling session_start() on both pages or at least using a session auto start? Also, is the API returning the data by redirecting the client (browser) or doing a postback? If the remote server is calling back behind the scenes, then you'll need a workaround and additional processing, or the ability to pass the session ID and assume the client-initiated session (not ideal). If it's all processed by the browser, the redirection should have no bearing, as the session will persist based upon the server-side data and the client-side cookie; the server will have no knowledge of the client's redirection to the payment gateway (nor any remote destination).

« previous php.general (#321780) next »