I've a subscription-based membership, however I encountered the following problem:
However as the user subscribed on May 1st 2012, he still has some days left if he were to cancel before one month. Any way to solve this? Does PayPal sends any IPN for this type of issue?
One solution I thought of is doing a cronjob every night to check if the month is up.
Once you've confirmed you want to cancel the payment, PayPal will process its cancellation. It's worth noting that this will usually cancel the subscription you were paying for if you have no other payment method, though it's best to close your account with the subscription too.
You can cancel any kind of PayPal transaction that is still pending. As long as the receiver has not accepted the money you sent, you can cancel the PayPal payment in your Activity menu. However, once the receiver accepts the payment, it will finalize immediately and you will no longer be able to cancel or reverse it.
When we implemented subscription services on our own website, we basically handle the events like this:
Upon user sign in, we check whether the subscription has expired (which is easy if you store that in your db).
Basically, subscription events are separate from payment events. A subscription can be cancelled but that doesn't mean the payment gets refunded; that would be a separate event.
Btw, payment and subscription events can come in different order (e.g. payment can come first, followed by subscription notification); it's important to cater for that.
When user subscribes, paypal will create a recurring payment profile, which means the user will have to pay monthly (yearly, daily depending on the profile) the sum, on the day he subscribed (ex. 1st May, 1st June, 1st July). When the user cancels, he cancels the payment profile, not the payment itself. So after that paypal will not ask for any other payment. If you want to give the user the days, which were left you have to store the information about the subscription.
You can store in a db the day he subscribed and the day he cancelled.From there you can tell how many days the user still has. Paypal sends IPN messages both on the creation of the recurring payment profile, on the payment itself and on the cancel as well.
You can find information on the IPN messages here: https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With