I have been tasked with integrating PayPal into a website that is in development. I was curious if anyone could tell me the best solution for my needs as there seems to be a lot of options out there.
The site has to take payments in two ways – firstly, we need a static payment system for booking tickets. I have a basket functionality already set up on the website, because it has to be set up so that only part of the price is paid online, so basically I need a single payment to an invariant email address. I am current during this using IPN, which seems to work.
Secondly, people can set up a subscription for a fixed amount per month. I am not sure if it is practical to do this with the IPN setup I have to handle the single payments, because I can’t seem to find any documentation to handle all the eventualities of people cancelling their subscriptions, missing payments, etc.
So I really need help with the second one, but if anyone has a solution they think should be used for both that would be fantastic, as that would obviously be cleaner. I have never integrated PayPal into a website before so all help welcome!
Thank you so much!
IPN would works for Subscriptions as well.
when a user subscribe you will receive a IPN signal with a txtype = subscr_signup with a lot of informations so you know that you user has subscribed.
when a payment arrived you will received (at the recurrent period) an IPN signal with a txtype = subscr_payment and again a lot of informations.
when a user cancel his subscription by going to their paypal account or a recurrent payment fails twice (can be set in your merchant account) you receive subscr_cancel, mean you won’t received anymore money.
However the trick is this doesn’t mean the subscription is ended.
For that paypal will send you a signal subscr_eot which mean you have to stop providing service to your user. (eot stand for end of period)
For example I pay every month 30$ for a music service and I set it up on the 3rd of the month.
When user set up the subscription you receive the subscr_signup + subscr_payment.
every 3rd of a month you receive subscr_payment (with fail or sucess infor)
I decide to stop my subcription the 20 of the month via paypal.
you will directly receive the subscr_cancel.
the 3rd of the next month after my cancellation you will receive a subscr_eot.
Hope it’s clear for a full details go to the paypal documentation.
https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference#id091EB080EYK
Good luck