Home » Php » Paypal API buttons

Paypal API buttons

Posted by: admin June 30, 2018 Leave a comment


I have a game where you can purchase horseshoes. When the user first logs on for the day a random string is created for that user during their session online, when logged out and logged back in this will reset. When the user wants to purchase horseshoes it directs them to PayPal and I want this random string to go with the button so it can be returned later to confirm a purchase. After the transaction the page CURRENTLY goes to


This gives the item name, and this tx number at the end.

I want that page to go to a different page called “GiveItems.php” where it takes the transaction ID using a $_GET and and it also checks another $_GET for the original random string. If the transaction ID isn’t in the “Transaction” database AND the random string is correct to the user then it will place it in the database as a record of the purchase. Then reset the random string so one cannot change the transaction ID to a fake number without the random string.

All of this is a brainstorm on what I should really do, but none I can actually figure out. I’ve read PayPal APIs, I’ve talked with other coders and have found no help. If anyone has a better idea or knows how to do something like this I would love the help.