latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Delete Recurring PayPal Subscription

Home Forums Community Forum Delete Recurring PayPal Subscription

This topic contains 4 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Sunday Feb 26th, 2012 at 3:54 pm #6467
Robert Funge
Username: godrob

Hi Guys,

Am I right in thinking that if a paid member deletes their profile that their existing recurring paypal subscription will still remain?

If so, can somebody please provide me an S2Hack so that if a paid member deletes their profile that their recurring paypal subscription will also be automatically cancelled?

Thanks
Rob

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Monday Feb 27th, 2012 at 4:05 pm #6536

I’m pretty sure that the subscription would not be affected when deleting his WordPress account.

I’ll email Jason asking if there’s a simple way to make it happen.

Posted: Monday Feb 27th, 2012 at 5:06 pm #6570
Staff Member

Hi Rob & Cristian :-)
Thanks for the heads up on this thread.
Rob, are you running s2Member Pro Forms with a PayPal Pro account, or PayPal Standard Buttons?

Posted: Tuesday Feb 28th, 2012 at 6:17 am #6657
Robert Funge
Username: godrob

Hi Jason,

Yes, that’s correct. I’m running S2Member Pro Forms with a PayPal business account.

The issue I have is if a member deletes their wordpress/buddypress profile, is their recurring paypal subscription still live? I have a feeling it is. If so, is their a hack I can use to automatically delete their paypal subscription if their profile is deleted.

I don’t won’t to be left with charge back problems.

Thanks for your help
Rob

Posted: Tuesday Feb 28th, 2012 at 9:15 pm #6697
Staff Member

Thanks for the follow-up Rob.

Let me start by saying… this has been reported before. The solution that we recommend, is to change your BuddyPress settings in the Dashboard, and do NOT allow Members to delete their own account. Instead, use an s2Member Pro Cancellation Form, so that Members can “cancel” their own account, not delete it. If you want accounts deleted automatically (i.e. after a Member cancels, and at the correct time), you can change your EOT Behavior for s2Member here: Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior

That being said, if you’d like to integrate a more advanced solution, you could automatically cancel a Customer’s billing profile dynamically, via PHP — using s2Member’s integration with the PayPal Pro API. Here is an example.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_action("delete_user", "cancel_future_billing");
function cancel_future_billing($user_id)
	{
		$paypal = (array)array
			(
				"ACTION" => "Cancel",
				"METHOD" => "ManageRecurringPaymentsProfileStatus",
				"PROFILEID" => get_user_option("s2member_subscr_id", $user_id)
			);
		c_ws_plugin__s2member_paypal_utilities::paypal_api_response($paypal);
	}
?>
Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.