Jump to content

how do i keep $_SESSION data when working with PayPal?


WhiteRau

Recommended Posts

hey gang:

 

i have a number of variables stored in the $_SESSION array and wanted to know how i can keep them handy for use AFTER PayPal has done it's thing.  to help clarify, the desired process here is client fills out form. clicks PayPal button. form data is then used to create some documents which are then sent to client.  i have the flow working but without the PayPal part because i'm not sure how to preserve the form data while PayPal does it's thing so i can use it when PayPal is done.  am i making sense?  i'd like to steer away from client-side cookies because of security issues and our paranoid client insists on it...

 

bah.  first the JSON shuffle from JavaScript to PHP and now this PayPal mess.  :-\

 

any help is MOST welcome.  TIA!

 

WR!

Link to comment
Share on other sites

i'd like to steer away from client-side cookies because of security issues and our paranoid client insists on it...

 

... and right they are! You don't store customer information in cookies. Why is the client advising the developer on security?

 

--

 

If their data is stored in the session, why isn't it still available on their return?

Link to comment
Share on other sites

client is one of those 'techno-capable hobby' types...  ::)

 

as for the session data, i didn't know for sure if that was the case, so i came here.  i've never interrupted flow in a site like this before and so when my well-meaning colleague mentioned that i'd lose the $_SESSION data if i left the domain...ignorance won.  in which case, i may have another few questions based on what he's told me...  argh.  :-[

 

so what i'm hearing you say is that this, in fact, is untrue.  the session should remain available?

 

WR!

Link to comment
Share on other sites

Does Paypal allow you to pass them a GET parameter that they will send back to you after the user is done? If so, you could throw the session ID in the url and have paypal redirect them back to your site with that same session ID appended to the URL. Also there is setting a cookie with ONLY the session ID. If you store the session ID in the cookie, you can read back the session ID when they return and initialize their session data.

Link to comment
Share on other sites

@ddubs: sounds like a great solution, actually.  i believe PayPal allows passing a 'custom' field that can then be sent back.  i'll look into that.  thanks!  :)

 

now i just have to figure out how to take the <form>'s $_POST array and get it into the $_SESSION... i wish you could have a $_SESSION option in the <form> method...  :shrug:

 

thanks guys.  if i have more questions regarding this topic, i'll return!  :D

 

WR!

Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.