|
Posted by Manuel Lemos on 09/28/57 12:01
Hello,
on 01/28/2008 12:43 AM Roberto said the following:
> My UK client wants to have a website where users subscribe through
> PayPal and automatically get a notification and a charge every 12
> months for what they purchased on the website. What's the PHP way to
> do this with the PayPal API?
>
> As well, do you have experience in the trenches with such a solution
> and can give me any warnings about this?
Paypal provides several methods to accept payments. The simplest ones
are based on Paypal IPN and PDT . These are relatively simple to
implement in PHP. There are a few ready to use PHP classes to help you
start using them quickly.
http://www.phpclasses.org/browse/class/19/top/rated.html
Paypal documentation is extensive, but I learned by examples from the
Paypal Hacks book. I really recommend it because it provides a step by
step guide, which IMHO is better than Paypal documentation. It is also
good warning you against certain problems that you need to anticipate.
http://www.phpclasses.org/reviews/id/0596007515.html
As for subscriptions, I have implemented them in the PHPClasses site.
http://www.phpclasses.org/premium/
They work well but you need to pay attention to several details also
mentioned in most part in the Paypal hacks book. Subscriptions are like
regular shopping cart purchases, except that Paypal renews the charges
automatically for you after a given period. So, you cannot mix renewable
purchases with products paid just in one time.
Paypal will send your site an IPN notificatian when a subscription
payment is done, or the subscription payment has failed (lack of source
funds) or the subscription was canceled permanently. You need to handle
all of these and notify your client customers when it is important for
him to know.
For instance, if a customer credit card expires, all subscriptions that
it was funding will be canceled. Paypal cancels the subscriptions, sends
you an IPN but it does not quite tell you why the subscription was
canceled. This may be confusing to customers, so it is better to warn
them in case a subscription is canceled and you do not know if it was
the customer that canceled it.
There are more details but this is enough to get your started.
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Navigation:
[Reply to this message]
|