How to make a PHP protected page ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chrisjchrisj
Forum Newbie
Posts: 5
Joined: Thu Apr 02, 2009 8:42 am

How to make a PHP protected page ?

Post by chrisjchrisj »

I'm using a PHP script and am adding a Paypal link, so when the user/purchaser returns to the PHP script he is routed to a protected page that only users who have made the payment can access.

Can someone help me with the protected page part?
Some clues, any help would be appreciated.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: How to make a PHP protected page ?

Post by greyhoundcode »

When a customer finishes paying on PayPal's own website, they are sent back to a page designated by you - which by the sound of it you are already well aware of. PayPal will send a number of PDT variables describing the transaction which has taken place, you can see a full list here.

Take note of the custom variable. Set this before they leave for the payment pages, then check it when they return - you then know it is the person who just paid and not a random surfer. As per the PayPal rules (I think), you should display a receipt of some kind at this point and that's what the other PDT variables are for.
Post Reply