• Resolved deepakwisi

    (@deepakwisi)


    Hi, I am using Woocommerce with WordPress and having subscription products.

    Someone can buy subscription products without any issue but this is a monthly subscription and when it comes to that renewal date, automatic order is not being placed and it is getting failed.

    In my woocommerce admin, I am getting below error message in order note’s section:

    Recurring payment for order failed. Reason: You passed an empty string for ‘payment_method’. We assume empty values are an attempt to unset a parameter; however ‘payment_method’ cannot be unset. You should remove ‘payment_method’ from your request or supply a non-empty value.

    And when I go to the payment method’s log file I am getting this error:

    Could not complete payment_intent.succeeded event for payment_intent pi_3Pyern2nCFOQSR1l0E4Gck9t. No order ID (No Order ID in metadata) was found in your WordPress database. This typically happens when you have multiple webhooks setup for the same Stripe account. This order most likely originated from a different site.

    I have talked with Stripe support and there is nothing from their side and I have checked the webhook in the stripe account, I see there is only one webhook.

    I have got this information from stripe log: https://pastebin.com/xLbjFTWe

    Here is my Woocommerce System report: https://pastebin.com/kkNQBJei

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @deepakwisi

    In my woocommerce admin, I am getting below error message in order note’s section:

    That means the _payment_method_token metakey has an empty value when it should be populated. If you go to the Edit Subscription page and click the pencil icon next to the billing details you will probably find that the payment method input field is empty. You can copy and paste the payment method ID from Stripe into that field to prevent that error.

    Once you do that, you will need to determine why that field is empty. The Stripe plugin doesn’t have code that removes payment method ID’s from subscriptions.

    And when I go to the payment method’s log file I am getting this error:

    This message is unrelated to the empty payment method ID issue. Are you in any way customizing the metadata that’s added by this plugin? The order_id property should never be empty but in your case it is which would indicate you have some custom code that’s manipulating that data.

    Thanks

    Thread Starter deepakwisi

    (@deepakwisi)

    I have checked there is already payment method selected at below the billing address, please check the below screenshot here:

    Plugin Author Payment Plugins

    (@mrclayton)

    please check the below screenshot here

    There is no screenshot.

    Thread Starter deepakwisi

    (@deepakwisi)

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @deepakwisi

    Your screenshot is showing the payment_method field. I am referring to the following fields:

    Notice there are fields for the Payment Method Token and Stripe Customer ID.

    Kind Regards

    Thread Starter deepakwisi

    (@deepakwisi)

    Here is the detailed screenshot:

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @deepakwisi

    Your screenshot confirms my previous reply which is that the payment method token field is empty. That should be populated with the payment method ID and the Stripe Customer ID field should be populated.

    You will need to login to stripe.com and copy and paste those values into the input fields. In my experience the fields are empty when some 3rd party plugin is interfering with how WooCommerce Subscriptions works.

    For the subscription in your screenshot, please provide exact steps of how it was created. For example, was it created manually or did the customer purchase it via your checkout page?

    Kind Regards

    Thread Starter deepakwisi

    (@deepakwisi)

    Yes, customer is purchasing it from the checkout page after adding subscription product to the cart.

    If I need to add these 2 fields manually, I have lots of subscription customer, is there any way to sync these 2 fields automatically from stripe?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @deepakwisi

    Yes, customer is purchasing it from the checkout page after adding subscription product to the cart.

    I recommend you perform a test using test mode and then see if those fields are populated correctly. Please perform that test and then reply back with the results.

    is there any way to sync these 2 fields automatically from stripe?

    No there isn’t a way to sync them. It’s important that you troubleshoot the checkout flow and narrow down what might be causing those fields to be empty. If they are empty after your test, then I recommend you deactivate all plugins except for WooCommerce, WCS, and Stripe and test again. You can then start re-activating plugins and performing your test to find the plugin that’s responsible.

    Kind Regards

    Thread Starter deepakwisi

    (@deepakwisi)

    I made a test purchase and yes both field is coming properly. Here is the screenshot:

    So, I think there is no any issue with other plugin.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @deepakwisi

    I think there is no any issue with other plugin.

    That means something is contributing to the deletion of those fields at some point. For the next step, you should process a renewal payment for that test subscription and see what happens to the fields.

    There isn’t any code in the Stripe plugin that would remove those fields so it’s important to understand what’s causing those values to be blanked out.

    Kind Regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Woocommerce Subscription Renewal orders are getting failed’ is closed to new replies.