• Resolved Anonymous User 18819390

    (@anonymized-18819390)


    I had an order fail a couple of times. The error on Woocommerce order says the payment method does not belong to the customer.

    “Error processing payment. Reason: The PaymentMethod pm_1Kih9lI8gxwwW3i0ikFe83Rt does not belong to the Customer you supplied cus_M5p9qxBSPrrc2P. Please use this PaymentMethod with the Customer that it belongs to instead. Order status changed from Pending payment to Failed.”

    The order went through after the customer entered the info of the same card manually instead of using it as saved.

    • This topic was modified 3 years, 10 months ago by Anonymous User 18819390.
    • This topic was modified 3 years, 10 months ago by Anonymous User 18819390.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Clayton R

    (@mrclayton)

    @tomster999

    Have you changed the Stripe account that the plugin was connected to? That error message can happen if you change the account because the payment methods associated to the customer exist in the old Stripe account.

    Kind Regards,

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    The account is the same, but I did change to test mode and connected to the same stripe account again as I was having issues testing. Could that still be the cause and how should I go about fixing it?

    Plugin Author Clayton R

    (@mrclayton)

    @tomster999

    Can you please share your website url or your Stripe Account ID?

    but I did change to test mode and connected to the same stripe account again

    When switching to test mode, you don’t need to connect to a different account. It sounds like that might be your issue.

    If you provide your Account ID I can look at the logs and better understand what you’re describing.

    Kind Regards,

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    acct_19YMiJI8gxwwW3i0

    I reconnected to the same account, not to a new one. I see no failed payment in Stripe dashboard and only on Woocommerce orders.

    Plugin Author Clayton R

    (@mrclayton)

    @tomster999 This particular customer has three customer ID’s in Stripe.

    cus_KBsrlJVVFPAvyh created 9/8/21

    cus_KBsradmizWiNfz created 9/8/21

    cus_M5p9qxBSPrrc2P created 7/20/22

    Customer ID cus_KBsradmizWiNfz is the one that has the payment methods associated with it but it’s customer ID cus_M5p9qxBSPrrc2P that’s associated with the WordPress user. Were you using another Stripe plugin previously?

    Or is this a user that you have changed database data for perhaps?

    The Stripe plugin stores the Stripe customer ID in the usermeta table as {$databaseprefix}wc_stripe_customer_live. I’d recommend checking to see if you have more than one record in your usermeta table for that user.

    Thanks,

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    I have used this Plugin from the start and never used any other Stripe plugin. I don’t believe I changed any database data, at least not intentional. How do I check the customer ID and the usermeta table you mentioned?

    Plugin Author Clayton R

    (@mrclayton)

    You can review your WordPress tables using something like phpMyAdmin which is usually provided by your hosting company.

    It’s odd that this particular user would have 3 separate customer ID’s in Stripe, because the plugin only creates a customer ID if the usermeta table entry isn’t found. An instance where I’ve seen this happen before would be when an administrator deleted the usermeta table entry so the plugin then creates a new customer ID for the user.

    Kind Regards,

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    When he entered the Credit Card info manually instead of using saved card that’s when it created the new ID today.

    Plugin Author Clayton R

    (@mrclayton)

    @tomster999 cards are only saved if the customer checks the checkbox to save a payment method. During that process, if the plugin detects the WordPress user doesn’t have a Stripe customer ID, it will create one. So the query for fetching the customer ID from your usermeta table returned an empty value.

    Do you have any custom code on your site that’s modifying the plugin via filters?

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    I don’t believe I have any custom code that is interfering with it. I’m still having issues as I’m getting more reports with the same issue. Is there a way to delete the saved payment methods for all users or a better solution where I don’t have to do that?

    Plugin Author Clayton R

    (@mrclayton)

    Hi @tomster999

    Can you reach out to us via the support page within the Stripe Plugin? This will be easier to troubleshoot if we can work with you via our support system.

    I believe there is something specific with your site that’s causing this behavior. The customer creation code within the plugin has not changed in a very long time and is very stable.

    Kind regards

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    Here is the ID for the newly reported if you can see anything else by looking the user up. I see under wordpress users he just has one payment method. I did recently have custom code added about 2 weeks ago before this started happening but also been changing and adding other features as well. The custom code is jquery and is for a slider used for quantity on products.

    cus_M7O8XhgfSRXYO5

    Thread Starter Anonymous User 18819390

    (@anonymized-18819390)

    I opened a support ticket as well.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Saved Card error Failed order’ is closed to new replies.