whitney6
09-16-2011, 12:15 AM
I want to create a code that allows users to purchase something on paypal and then paypal sends me the transaction information and I store it in a mysql database for further use. I have a paypal account and have read some of the information on integrating this with my site, but I am having some problems understanding it. I have some knowledge of html, php, and mysql but would still consider myself a beginner.
So here's the sequence of pages I need help with in the order the customers would view them:
1. My "store" on my website with the option to purchase a product. The customer is logged in and there is a sessions variable with their email in it. They click a buy now button which takes them to paypal. (I don't need help coding this page, but as it is an important step in the process I included it)
2. Paypal website. I have one "product" for sale at a static price, you can purchase multiples of the product though. So here the user should be able to pay for the product and complete the transaction. (I can set this up through paypal myself as well, but once again included it because its an important step.)
3. Back to my website to the "Thank you for your business page." (This is the page I need help with). Here I would like to display to the customer the transaction id, amount of product purchased, and the price of transaction. I would then put the transaction id and amount of product into my database for later use. So I need help figuring out how to send the transaction id, amount of product, and total price from paypal to this page. The user will already be using a session so I will have their email for use in the database.
So my question is how do I get paypal to send variables (specifically the transactionid, amount of product, and total cost) to my webpage? And then how would I retrieve it (I can get items sent with POST, but I'm not sure if that is what paypal is using).
Thanks!
So here's the sequence of pages I need help with in the order the customers would view them:
1. My "store" on my website with the option to purchase a product. The customer is logged in and there is a sessions variable with their email in it. They click a buy now button which takes them to paypal. (I don't need help coding this page, but as it is an important step in the process I included it)
2. Paypal website. I have one "product" for sale at a static price, you can purchase multiples of the product though. So here the user should be able to pay for the product and complete the transaction. (I can set this up through paypal myself as well, but once again included it because its an important step.)
3. Back to my website to the "Thank you for your business page." (This is the page I need help with). Here I would like to display to the customer the transaction id, amount of product purchased, and the price of transaction. I would then put the transaction id and amount of product into my database for later use. So I need help figuring out how to send the transaction id, amount of product, and total price from paypal to this page. The user will already be using a session so I will have their email for use in the database.
So my question is how do I get paypal to send variables (specifically the transactionid, amount of product, and total cost) to my webpage? And then how would I retrieve it (I can get items sent with POST, but I'm not sure if that is what paypal is using).
Thanks!