Redirecting from Paypal with querystring values

Hi

I am wondering how you process transaction through Paypal and then redirect to another site with product id’s of the items purchased passed in the query string in the URL.

I am trying to use a Buy Now button and after the transaction has been completed I want to redirect to a php based site which needs the product id.

Thanks

Lewis

You should search the paypal site for IPN examples, they’re really good!

One way to do it(it is not the only way I hasten to add) is that you use the return url in the form. The trick is that your return url takes a parameter indicating that it is being visited from the paypal. Then by checking, for example;

if(isset($_GET['action']) && $_GET['action'] == "from_paypal" ){
//here you go to your database and fetch the item number from there
// or you may use the item_number directly. whatever you found convenient
}

Once you obtained the id, then redirect to the other website with that id in the query string.

I hope that helps