• Hi guys ! Since the last update yesterday all my “lifestime subscription” get the error :

    Sorry, we are unable to process your payment at this time. Please try again later
    

    I had to downgrade to keep it work for my customers.
    The exact name of the plugin is “Woo Subscriptions Variation Lifetime/Onetime Purchase”

    In the stripe log, there was this error :

    invalid_request_error - payment_method_options[card][mandate_options][interval]
    Invalid payment_method_options[card][mandate_options][interval]: must be one of day, week, month, year, or sporadic

    I don’t know if you can do something but thanks anyway?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I experienced this same issue! It appears that the Stripe plugin passes the interval of the subscription to Stripe, which doesn’t accept the “lifetime” option.

    Thread Starter massimodaniele

    (@massimodaniele)

    It’s a very very very light plugin (1 file) and there is not any support since 1 year, we will earn our time to create a new one with ChatGPT ??

    (for the moment I just downgraded the version of stripe plugin)

    Plugin Author logicfire

    (@logicfire)

    Hi
    Sorry for the inconvenience you are facing with plugin but as you can see this plugin is closed by wordpress. So I am not able to provide an update for this issue.
    Though you can provide me your website and logins via any contact if you find on the plugin file or here on support forum. I’ll see what I can do.

    This can actually be fixed with a simple hook into “wc_stripe_generate_create_intent_request” to switch the “lifetime” interval being passed to Stripe to an acceptable value of “sporadic”.

    // Fix bug in WooCommerce Stripe payment intent request with "lifetime" not being a valid interval
    add_filter( 'wc_stripe_generate_create_intent_request', 'woo_lifetime_create_intent_request', 11, 3 );
    function woo_lifetime_create_intent_request( $request, $order, $prepared_source ) {
    	if ( isset( $request['payment_method_options']['card']['mandate_options']['interval'] ) ) {
    		if ( "lifetime" === $request['payment_method_options']['card']['mandate_options']['interval'] ) {
    		    $request['payment_method_options']['card']['mandate_options']['interval'] = 'sporadic';
    		}
    	}
    	return $request;
    }
    

    https://github.com/robertstaddon/woo-subscriptions-variation-lifetimeonetime-purchase/commit/e55c611787bda436c4da3c0fd74cec39b8000b86

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working with new version of Stripe plugin’ is closed to new replies.