469,946 Members | 1,805 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

PayPal and Session Variables

I have written some code to use paypal for users to make purchases from my
site. I am using the paypal instant payment notification.

When i get the notification from paypal I send the user an email with
registration key. I can pass data to that page with the custom field with no
problem.

The problem is after I redirect from my page to paypal. When I click the
return button on paypal at the end of the purchase process all of my session
variables are gone. They were there before I redirected to paypal but gone
when paypal sends back to my page.

Any ideas what is going on here and how I can prevent this from happening?

Right now the user has to log back in after making a purchase which is a
real hassle.

Thanks.
Nov 19 '05 #1
2 4026
I suspect this is happening because when the user is redirected to paypal,
the session ends. Probably the easiest way to handle this is to make sure
that when they are redirected to paypal, there is still a page of your site
open, so the session won't end. Otherwise, you'd have to pass some data to
paypal and back, so the user could be re-authenticated without retyping
their login. It would be easier to just keep your session going.

:-) dio
"Tommy" <to***@dontspamme.com> wrote in message
news:uQ**************@TK2MSFTNGP14.phx.gbl...
I have written some code to use paypal for users to make purchases from my
site. I am using the paypal instant payment notification.

When i get the notification from paypal I send the user an email with
registration key. I can pass data to that page with the custom field with no problem.

The problem is after I redirect from my page to paypal. When I click the
return button on paypal at the end of the purchase process all of my session variables are gone. They were there before I redirected to paypal but gone
when paypal sends back to my page.

Any ideas what is going on here and how I can prevent this from happening?

Right now the user has to log back in after making a purchase which is a
real hassle.

Thanks.

Nov 19 '05 #2
There should be no reason for this to happen unless the customer is on
paypals site for over 20 minutes (or you have session timeout set lower).

I think with paypal, you can also pass your own variables, so you could save
a login key into a database, pass that through paypal, and when the customer
returns from paypal, check your login key and re-open/re-create their
session. (For login key, I would probably pass two items, a record
identifier and a generated key, or you could use a guid).
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"diogenes" <di******@lorigudenkauf.com> wrote in message
news:ec**************@TK2MSFTNGP14.phx.gbl...
I suspect this is happening because when the user is redirected to paypal,
the session ends. Probably the easiest way to handle this is to make sure
that when they are redirected to paypal, there is still a page of your
site
open, so the session won't end. Otherwise, you'd have to pass some data to
paypal and back, so the user could be re-authenticated without retyping
their login. It would be easier to just keep your session going.

:-) dio
"Tommy" <to***@dontspamme.com> wrote in message
news:uQ**************@TK2MSFTNGP14.phx.gbl...
I have written some code to use paypal for users to make purchases from
my
site. I am using the paypal instant payment notification.

When i get the notification from paypal I send the user an email with
registration key. I can pass data to that page with the custom field with

no
problem.

The problem is after I redirect from my page to paypal. When I click the
return button on paypal at the end of the purchase process all of my

session
variables are gone. They were there before I redirected to paypal but
gone
when paypal sends back to my page.

Any ideas what is going on here and how I can prevent this from
happening?

Right now the user has to log back in after making a purchase which is a
real hassle.

Thanks.


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by rgparkins | last post: by
1 post views Thread by Mike Kingscott | last post: by
5 posts views Thread by Jason James | last post: by
3 posts views Thread by Yourself | last post: by
reply views Thread by PayPal Security Measures! | last post: by
2 posts views Thread by t0m66 | last post: by
reply views Thread by Nicodemus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.