• Resolved godrob

    (@godrob)


    Hi guys, I want to move away from PayPal and adopt Stripe as my preferred payment processor of choice. At the minute I have the following s2hack setup, provide by Jason. Essentially the hack automatically cancels PayPal’s recurring billing when a member deletes their profile.

    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);
    	}

    How can I achieve the same thing please with Stripe?

    Many thanks
    Regards
    Rob.

    https://www.ads-software.com/plugins/s2member/

    [ No bumping please. ]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author JasWSInc

    (@jaswsinc)

    Here is the equivalent for Stripe… ??

    <?php
    add_action('delete_user', 'cancel_future_billing');
    function cancel_future_billing($user_id)
    	{
    		c_ws_plugin__s2member_pro_stripe_utilities::cancel_customer_subscription(
    			get_user_option('s2member_subscr_cid', $user_id),
    			get_user_option('s2member_subscr_id', $user_id)
    		);
    	}

    In the future, for the fastest response on pro-related matters, please see:
    https://www.s2member.com/contact/

    Thread Starter godrob

    (@godrob)

    Many thanks, Jason!

    Regards
    Rob.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stripe – Automatic Cancelation on Profile Delete’ is closed to new replies.