hwd
hwd

Reputation: 139

Not getting the value of session variable on paypal transaction processing in php

i cant get the value of session variable on paypal transaction processing.when transation complete my table is updated, for updation i use a session variable,at that time i can't get the value of the session variable.

is sessions not get in paypal? please help me to find a solution......

Upvotes: 0

Views: 731

Answers (1)

Salman Arshad
Salman Arshad

Reputation: 272106

I'll assume that you're using simple payment integration that requires your user to click the "return to merchant website" button to post the data back to your website.

You can access the session variables if (i) user completes the payment and comes back to your website before session expires (ii) the user returns to the website on which session was started. This means if your user starts checkout on "website.com" and the session is started here, the user should return to "website.com", not "www.website.com" for the session variables to be accessible.

Using sessions is not reliable; e.g. is user spends a long time on PayPal website, the session on your website will timeout. As a workaround, if you are interested in specific session variables, you can pass them to PayPal in custom hidden form fields; PayPal echos these fields back to your return script as-is.

Upvotes: 1

Related Questions