Question: Note: Our site is built in PHP and uses MySQL databases. I already manage another site with shopping cart in its entirety using Authorize.net so please dont respond with suggestions to use another provider. A new product/service we are releasing is classified as "High Risk" to the merchant providers and they want to charge us out the a\*\*. In response, I figured setting up a Website Payments Standard account on Paypal.com was the best alternative for the following reasons:

1) no monthly charges, only pay for what is used

2) trust brand and people are comfortable with Paypal

The rates are quite a bit higher than we are used to but any High Risk Merchant account is so that is irrelevant. The issue I am running into is this:

1) throughout the registration process on our site, we collect quite a bit of user information and pass it from page to page using SESSION variables. When you use Website Payments Standard, you are forced to pass the consumer off to a Paypal owned webpage to submit their payment information. Upon successful completion, they are able to direct them back to a 'confirmation' page on our site but it is my understanding there is NO way to keep the old SESSION variables in tact. This is very important to us because the overall concept is to store the SESSION variables ONLY after successful payment has been made.

2) Using Website Payments Standard, I am unable to find a way to send a Pay-Amount variable (everything must be dictated up front, i.e. T-shirt is $2.99). Our site allows the consumer to enrollee multiple persons and have several 'add-ons' for each person so there are literally over 100 end check out amount possibilities. I am not sure if it is possible to override this.

Has ANYBODY had luck using Website Payments Standard on Paypal acknowledging the information above?

Answer: 
I'm months too late for my answer... but I also had the same problem...losing sessions and cookies after redirection to the return url.

For those who will be encountering the same problem, here is the solution I came up with,

In the paypal form you add

```
<input type='hidden' name='return' value='".http_dir."shop/return.php'> 
<input type='hidden' name='custom' value='$session_id'>

```

where $session\_id = session\_id( );

and in shop/return.php, I tested if it works with

```
echo '<pre>';
print_r($_SESSION);
echo '</pre>';

echo '<pre>';
print_r($_COOKIE);
echo '</pre>';

echo '<pre>';
print_r($_GET);
echo '</pre>';

```

When you do not include 'custom' parameter in the form, it will return an empty array. It's crazy how just two lines change everything. I thought I was gonna repeat the whole shopping cart logic, oh boy. 

Hope this would help someone in the future... Cheers^^

Source: [WPS HTML Variables](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables)
1.)I agree with Pete above in that your probably looking for the **PDT** functionality. It sounds like your best bet would be do digest the request sent to your return page for the PDT variables and build your session variables then.

2.) You can send any amount you want using the "amount" parameter. [Here's the info on PayPal's HTML parameters](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables)