Jump to content

Recommended Posts

Hey,

 

Within my experience of PHP, I have never had anything to do with making secure payments before. And this is a problem I can't seem to get around. I want to let people purchase a premium version of a game, and it will add their name to a PHP file or databse after they are redirected from PayPal to a special page that adds their username to the PHP file after typing it in.

 

How would one make sure they don't just go to the webpage VIA the URL, and that they only came from the PHP redirect after purchase?

Link to comment
https://forums.phpfreaks.com/topic/230389-verifying-payment/
Share on other sites

You can check the $_SERVER['HTTP_REFERER'] variable and make sure that it comes from paypals website. That is just one way to do it. I'm sure there are more.

 

But when people finish a payment, does the URL have a lot of stuff like index.php?purchase_id=t7i 4ldskg;sfjg

 

or something?

 

Will

 

if($_SERVER['HTTP_REFERER']=="http://www.paypal.com")

 

work?

Link to comment
https://forums.phpfreaks.com/topic/230389-verifying-payment/#findComment-1186668
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.