PHP Newsletter

Join now and receive weekly updates pertianing to the world of PHP.

Polls

What do you think about the new PHPMine Design?
Awesome
Not Bad
Sucks

PHP Gigs By City

PHP Jobs By Topic

Advertisements

If/Else PHP Function Help!!?

Asked 2010-03-15 12:41:49 by Chalumeau

Hi! I need some help to create a structure "If/else" for a website...

The user buys chips on paypal and he's redirected to a page where he must put the exact amount of the chips he bought, is it's different, he must receive the next error text: "This is not the amount of chips you paid for!, please put the correct amount ;)"

If he puts the correct amount (200) then, he must be redirected correctly with the button "continue" of my site.

10 points y 5 stars to whom helps me!! It's urgent!

Anwered 2010-03-15 12:57:24 by Ben H

I have been faced with this problem for a while as the majority of my work is around digital downloads and online memberships.

The redirect idea will not work. For a start there is a time delay when the payment has been taken before the user is redirected. People usually close their browser at this point.There is also no way for paypal to confirm how many chips the person has paid for using this method.

You have two options: 1) PayPal Api. 2) PayPal IPN

The IPN by PayPal is the quickest and free service to use. Basically once a payment is complete PayPal will run a script on your server and provide any details on the transaction.

Search for paypal ipn integration on the various forums or search engines.

Questions and answers provided by the Yahoo Answers Community.