Re: Paypal Integration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 10:14 AM +1000 9/16/08, Andrew Barnett wrote:
Has anyone got any example integration of PHP with the Paypal API?

I'm looking to build a site where people register for a nominal fee,
and gain access to the site indefinately. So I just want to check a
user against whether they have paid or not.

Andrew


Andrew:

-- simple way

From what you describe, that's very simple -- you don't even need php for it.

For example -- please review at the "How to win" part of this:

http://sperling.com/quarters/

and view the ten lines of html code that sends the user to PayPal to collect $5.

From there, PayPal then notifies me via email and I act accordingly.

Similarly, you could add people to your site the same way. But you would have to know who these people are (user id, password, and email address) to grant them access.

--- less simple way

If you want this done automagically, then:

1. Have a script where people can register for your site -- IOW, a script to gather user id, email address and password;

2. Place the PayPal purchase code in your form.

3. Place the "grant access" code in the "thanks.php" script (see PayPal html code) to be approved when the $ transaction is done.

4. Then send the registered user a notice that they are registered and can obtain access by entering their user id and password.

Of course, you also have to account for lost passwords and such, but that goes with dealing with selling people registrations.

In any event, that's the way I would do it.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux