• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

Session expires after returning from pay pal to My site after payment.

Hi all,
I am Integrating pay pal to my site and using Pay pal PDT.
i AM USING HTML BUTTON OF PAY PAL AND i AM SETTING SEESION[uSERNAME"] IN my pay pal button page. from there it goes to pay pal and returns back  to my thank you page.
On my thank you page I am reading this session.
Sometimes its there and sometimes it null.
Some times Session expires after returning from pay pal to My site after payment.
P-lease let me know the reason if you can guess
1 Solution
You need to add optional parameter(username in your case) to PayPal request and PayPal returns it in response ...
About session : You can change session time (20 min by default) in web.config
dhiraj79Author Commented:
Thanks for the reply ....
How can I send value of user name from my session variable to the html button code optional parameter.
Can you please give that code.
In your form you probably have a return URL like this:
<INPUT TYPE="hidden" NAME="return" value="http://www.mysite.com/thankyou.asp?id=XXXX">

Add the parameter to that:
<INPUT TYPE="hidden" NAME="return" value="http://www.mysite.com/thankyou.php?id=XXXX&usernamne=<%=SESSION["uSERNAME"]%>>


Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now