PDA

View Full Version : PayPal and PHP


RBB
12-1-05, 05:07 PM
I created a shopping cart for a client using PHP and MySQL. Then I got into PayPal and created an "Add Item to Cart" button. When you click the button, it carries the Item Number forward into the PayPal shopping cart and it appears on the sales receipt as part of the transaction.

I'd like to also carry this Item Number forward to the subsequent "Thank You" page that appears when a PayPal transaction is complete. If you're familiar with PayPal, you know that it sends you back to your site's "thank you" page.

I'm thinking that I could put an Update query on this page that would change the Item Number to "unavailable," which would automatically remove it from the Web site.

But does anyone here know if the Variable will carry all the way through the PayPal process and be picked up by the "thank you" page at the completion of the transaction? The only way I could think of to test the GET function is to make an actual purchase, which I really don't want to do (especially if it doesn't work the first time and has to be tested 2-3 times to get the syntax correct).

Any advice?? Thanks!!

--Bob

YvetteKuhns
12-1-05, 08:59 PM
But does anyone here know if the Variable will carry all the way through the PayPal process and be picked up by the "thank you" page at the completion of the transaction?


You are using php and mysql which means you can store info in the database to retrieve. Or you can simply use php. You may want to have an order confirmation page that "echoes" the order data and this is where you can include the item number. This page can include a PayPal button which is a form submission with hidden fields to send to PayPal. PayPal does accept the hidden form data field named item_number.

RBB
12-1-05, 09:58 PM
Hi Yvette,

Thanks for this info. I appreciate it. I'm gonna give it a try!

--Bob