WhiteRau Posted November 4, 2011 Share Posted November 4, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/ Share on other sites More sharing options...
Adam Posted November 4, 2011 Share Posted November 4, 2011 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? Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1284972 Share on other sites More sharing options...
WhiteRau Posted November 4, 2011 Author Share Posted November 4, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1285012 Share on other sites More sharing options...
ddubs Posted November 4, 2011 Share Posted November 4, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1285024 Share on other sites More sharing options...
WhiteRau Posted November 4, 2011 Author Share Posted November 4, 2011 @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... thanks guys. if i have more questions regarding this topic, i'll return! WR! Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1285038 Share on other sites More sharing options...
ddubs Posted November 4, 2011 Share Posted November 4, 2011 Edit: nm misread your post... How do you transfer the data to Paypal. Do you $_POST right to a script of theirs? Or do you have to make some sort of API call to them? Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1285041 Share on other sites More sharing options...
WhiteRau Posted January 6, 2012 Author Share Posted January 6, 2012 i just use the PayPal webscr. check out this tutorial, it's pretty cool : http://freelanceswitch.com/money/making-a-paypal-form-tutorial/ apparently you can pass a variable to the webscr and it'll just return it when the transaction is complete... WR! Quote Link to comment https://forums.phpfreaks.com/topic/250447-how-do-i-keep-_session-data-when-working-with-paypal/#findComment-1304722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.