JulesR Posted October 20, 2011 Share Posted October 20, 2011 (edited) PayPal is a great system but one nuance we have is that clients often forget to cancel their PayPal subscriptions with us after canceling their service. This, as you can imagine, often leads to complaints further down the line when they realize they've been paying for a service they haven't wanted or been using. We created this action hook that will trigger on a cancellation request, and will detect whether or not a PayPal subscription is active (via the subscription ID part of WHMCS) and then cancel it automatically. To use it, add your own API data to the following lines; $API_UserName = urlencode('ENTER YOUR API USERNAME'); $API_Password = urlencode('ENTER YOUR API PASSWORD'); $API_Signature = urlencode('ENTER YOUR API SIGNATURE'); cancelsubscription.zip Edited October 20, 2011 by JulesR Link to comment Share on other sites More sharing options...
bradh Posted October 24, 2011 Share Posted October 24, 2011 That's a great idea Jules. maybe WHMCS can pick it up as a feature? Link to comment Share on other sites More sharing options...
easyhosting Posted October 24, 2011 Share Posted October 24, 2011 Never had this problem. I have in bold red letters on the cancel request confirmation email that is up to the client to make sure they cancel all associate paypal subscriptions Link to comment Share on other sites More sharing options...
JulesR Posted October 24, 2011 Author Share Posted October 24, 2011 That's a great idea Jules. maybe WHMCS can pick it up as a feature? Thanks. Yeah, it makes sense that something like this should be as standard. Hopefully this feature is added in future. Never had this problem. I have in bold red letters on the cancel request confirmation email that is up to the client to make sure they cancel all associate paypal subscriptions When you have enough customers paying with subscriptions, you will have this problem, I guarantee it Just because you have that message, doesn't mean they have actually canceled it, so it's quite possible you're still receiving money from them without providing a service... Link to comment Share on other sites More sharing options...
othellotech Posted October 25, 2011 Share Posted October 25, 2011 Would be better if it cancelled the subscription only on product termination rather than at cancel-request-time, as plenty of clients "uncancell" Link to comment Share on other sites More sharing options...
easyhosting Posted October 25, 2011 Share Posted October 25, 2011 When you have enough customers paying with subscriptions, you will have this problem, I guarantee it Just because you have that message, doesn't mean they have actually canceled it, so it's quite possible you're still receiving money from them without providing a service... how dare you insinuate i dont have enough clients on subscriptions. all my clients (300+) are on subscriptions and i have never had this problem if a client has cacelled then they have always cancelled their subscription. i agree with othellotech that this should be on termination and not cancel request as since i started in 1999 i have only had 6 cancel requests and 5 of them reversed the cancel request after i emailed them to find out why and then come to an arrangement so they could stay. Link to comment Share on other sites More sharing options...
JulesR Posted October 25, 2011 Author Share Posted October 25, 2011 Would be better if it cancelled the subscription only on product termination rather than at cancel-request-time, as plenty of clients "uncancell" I disagree. There are many legitimate situations where terminating an account manually is required without wanting to affect the payment. Keeping it on the cancellation level makes the most sense. If a client wants to "uncancel" then they simply need to setup a new subscription; not a big issue. how dare you insinuate i dont have enough clients on subscriptions. all my clients (300+) are on subscriptions and i have never had this problem if a client has cacelled then they have always cancelled their subscription. With respect, 300+ is not that many. When you're dealing with thousands or tens of thousands, you can be sure that people will forget to cancel their subscription, or simply not know how. Link to comment Share on other sites More sharing options...
easyhosting Posted October 25, 2011 Share Posted October 25, 2011 I disagree. There are many legitimate situations where terminating an account manually is required without wanting to affect the payment. Keeping it on the cancellation level makes the most sense. If a client wants to "uncancel" then they simply need to setup a new subscription; not a big issue. With respect, 300+ is not that many. When you're dealing with thousands or tens of thousands, you can be sure that people will forget to cancel their subscription, or simply not know how. well no matter how many clients you have it is not your responsibilty if clients forget or dont know how to cancel subscriptions. the cancellation confirmation and even the termination confirmation i send out tells the clients to cancel any subscriptions. if a client was to ask me how they do this then i will explain to them some hosts will actually charge a client/ex client if they have to refund any payments due to them not cancelling a subscription. Link to comment Share on other sites More sharing options...
JulesR Posted October 25, 2011 Author Share Posted October 25, 2011 well no matter how many clients you have it is not your responsibilty if clients forget or dont know how to cancel subscriptions. I believe you're missing the point here. With the use of an AUTOMATED action hook, you can cancel a subscription on behalf of the client in case they forget; thus preventing the need for any possible refunds and communication in the future. Regardless of whether or not this is a situation that you yourself have experienced, it's certainly something that is useful to those who deal with a huge number of PayPal subscriptions and subsequently those clients who forget to do so. If you don't like the idea and believe its the clients responsibility to take care of it; don't use it and move on. There's nothing to debate here, it's a case of "If you like this contribution, and may find it useful, use it.". Posting to the contrary is nonsensical. the cancellation confirmation and even the termination confirmation i send out tells the clients to cancel any subscriptions. if a client was to ask me how they do this then i will explain to them In an ideal world, all clients will read this and take the relevant action. We don't live in an ideal world, hence the need for this action hook. some hosts will actually charge a client/ex client if they have to refund any payments due to them not cancelling a subscription. That's the hosts prerogative. With this system in place, we don't need to, because their subscription is canceled as a safeguard. Nice to see you acknowledge that it's a situation that actually does occur, despite your own experiences... Link to comment Share on other sites More sharing options...
Seiya Posted October 26, 2011 Share Posted October 26, 2011 JulesR, I'd just like to express my gratitude for this wonderful script. We too have this problem and agree that once you hit a few thousand accounts its inevitable to happen and it causes a lot of frustration. Regardless of who's responsibility it is to cancel, in today's online social world, it's never a good idea to piss off customers who have already decided to leave your service for whatever reason. Thanks again. Link to comment Share on other sites More sharing options...
JulesR Posted October 26, 2011 Author Share Posted October 26, 2011 No problem, I'm glad you find it useful Link to comment Share on other sites More sharing options...
Seiya Posted October 26, 2011 Share Posted October 26, 2011 Just a quick note, I like to use the logactivity function like below on success or failure, just to have a complete record of everything in the activity log. logactivity("Successfully terminated Paypal subscription ID: $subscriptionid"); Link to comment Share on other sites More sharing options...
JulesR Posted October 26, 2011 Author Share Posted October 26, 2011 Good idea, thanks for the suggestion If we take that one stage further and add the Service ID and User ID, it'll be linked to their account and viewable from the individual client 'Log' tab. logactivity("Successfully terminated Paypal Subscription ID: $subscriptionid attached to Service ID: $relid and User ID: $userid"); Attached new version with the above code included, also added activity log logging for failure and when no subscription is detected. cancelsubscription.zip Link to comment Share on other sites More sharing options...
Seiya Posted October 26, 2011 Share Posted October 26, 2011 Awesome Jules, perfect now. I look forward to this hook saving me time! Link to comment Share on other sites More sharing options...
Seiya Posted October 26, 2011 Share Posted October 26, 2011 Also, its worth checking that the payment method is Paypal since some hosts accept multiple payment methods. $q = "SELECT subscriptionid FROM tblhosting WHERE id = '$relid' AND subscriptionid != '' AND paymentmethod='paypal'"; Link to comment Share on other sites More sharing options...
JulesR Posted October 26, 2011 Author Share Posted October 26, 2011 Also, its worth checking that the payment method is Paypal since some hosts accept multiple payment methods. AFAIK, the subscriptionid column in MySQL only applies to PayPal so no verification of payment method is needed Link to comment Share on other sites More sharing options...
Seiya Posted October 26, 2011 Share Posted October 26, 2011 AFAIK, the subscriptionid column in MySQL only applies to PayPal so no verification of payment method is needed Good point, I think you're right but that doesn't mean they wont start using this field for other payment services in the future. Link to comment Share on other sites More sharing options...
JulesR Posted October 26, 2011 Author Share Posted October 26, 2011 If they update the field to be used by other payment services, I'd likely update the hook to take advantage of those too Obviously feel free to make your own adjustments. Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted October 26, 2011 WHMCS Support Manager Share Posted October 26, 2011 IIRC the Subscriptions field is also used for 2Checkout recurring payments. Link to comment Share on other sites More sharing options...
JulesR Posted October 26, 2011 Author Share Posted October 26, 2011 OK, just to be safe and sure, updated to attempt PayPal subscription cancellations only: http://www.thiswebhost.com/cancelsubscription.zip External link so it's simpler/cleaner than attaching a new version to every post. Can a moderator please remove previous links or allow me to edit my original post? Thanks. Link to comment Share on other sites More sharing options...
b.ahmed Posted October 27, 2011 Share Posted October 27, 2011 Thank you so much for this. Link to comment Share on other sites More sharing options...
othellotech Posted October 27, 2011 Share Posted October 27, 2011 IIRC the Subscriptions field is also used for 2Checkout recurring payments. Yes, and Direct-Debits - but the change in the latest version to check the GW solves that Link to comment Share on other sites More sharing options...
ethix Posted October 30, 2011 Share Posted October 30, 2011 Thanks for sharing this Link to comment Share on other sites More sharing options...
cpoalmighty Posted November 1, 2011 Share Posted November 1, 2011 Reading the earlier comments, I would just like to say that it does not matter how many clients you have or dont have, What matters is that you know about true customer service to be caring enough to cancel your client's subscription account so that they dont have to do 2 logins to cancel a service with you. If I had to go through 3 different websites to cancel or signup for something from a provider, I may reconsider going back or try to find an easier solution. As for the OP, thank you very much for this script because it takes into account those people who are not that computer literate to know that they have to cancel their subscriptions via paypal as well. Link to comment Share on other sites More sharing options...
easyhosting Posted November 1, 2011 Share Posted November 1, 2011 Reading the earlier comments, I would just like to say that it does not matter how many clients you have or dont have, What matters is that you know about true customer service to be caring enough to cancel your client's subscription account so that they dont have to do 2 logins to cancel a service with you. If I had to go through 3 different websites to cancel or signup for something from a provider, I may reconsider going back or try to find an easier solution. As for the OP, thank you very much for this script because it takes into account those people who are not that computer literate to know that they have to cancel their subscriptions via paypal as well. so right, if you have a direct debit to pay your water rates, then 1 day you move to another country that has a differnent water company, co you inform yout water company that you are leaving, so they cancel your account. now whos responsibility is it to cancel the DD at your bank. it is not the water company. it is YOURS. the same in hosting a client cancels his hosting it is then the clients responsibily to approach the bank (paypal) to cancel recurring payments. Link to comment Share on other sites More sharing options...
Recommended Posts