Update Credit Card Stripe Form Bug

There seems to be a bug with the update credit card for ( [s2Member-Pro-Stripe-Form update=“1” … /] ).

When trying to update, a browser alert says “No Billing Method; please try again.”. Sometimes it still goes through, but sometimes it requires the customer to click the submit button 3 times before it actually works. In those cases the browser alert still comes up every time.

Is there a fix for this?

Hi Corey.

I haven’t seen that behavior myself, or remember another reporting it. Could you help me reproduce it?

Could you tell me the steps to follow to make it happen? That way I can start pulling the string to see what is causing it.

I look forward to your update. :slight_smile:

I’m not sure I have much more info on how to reproduce the issue. I just used that shortcode to create the update CC form. And when I try to update, that is what happens.

I ended up fixing it by commenting out the following from \s2member-pro\src\includes\separates\gateways\stripe\stripe.js

                    if(!$(sourceTokenInput).val())
                    {
                        alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("No Billing Method; please try again.", "s2member-front", "s2member")); ?>');
                        return false; // Error; cannot continue in this scenario.
                    }
1 Like

Very good. Thank you for the additional info. I’ll look closer into it.

:slight_smile:

I have found a bug here. If user has subscription with Stripe, and changes to another email, he cannot change credit card data anymore. Can you check if this is affected here, and do some trials with this?

Thanks for the heads-up, Felix. I will look into that. I need to ask the Stripe guys about this scenario and see what they recommend or say is possible.

Well I think s2 needs to store user email and stripe email separately (or the changed email can be carried over to stripe)

But s2 stores the Stripe customer ID, and the subscription ID, which would be enough to update the payment method…

well maybe do some tests yourself. I right now have no fast internet to test many things (Nepal). I just got concerned after second time a customer told me updating does not work - and I found out that in both cases they changed their email address.
Maybe this only happens when customer select to save credit card data with stripe for future purchases? There are quite a few scenarios possible and I’m not sure if this happens all the time - or only in specific cases.

1 Like

Just to confirm I understood: the email change was in their wordpress profile on your site, correct?

Yes correct. With active yearly subscription via stripe. Then they got information from stripe to their old email address to update credit card and it would not work

Okay. Thanks. So:

  • User subscribes via Stripe pro-form, with email address 1.
  • Updates his user profile with email address 2.
  • Stripe sends “update card” notice to email address 1.
  • Tries to update card with pro-form and can’t.

Do you know if he gets a message or error, and what it is? Do you see a related entry in your Stripe or s2Member logs? I’ll do my own tests with Stripe in Test mode, but would like to know what you get with your Live Stripe account.

:slight_smile:

Yes, they get some error message. Not sure right now if they get the you cannot update it in Form loading,or after clicking on change

:slight_smile:

Hi Felix.

I’ve been trying to reproduce this behavior, but haven’t been able to. The test cards don’t have one that will send an expiration email. But I reviewed the billing update pro-form’s code and can’t see how the changed email would affect the behavior… s2 uses the Stripe customer ID and the subscription ID to look up the Stripe customer, not the email address. Those would still be the same in the user’s profile even if he changes emails.

If you can reproduce it, or get another customer report it, please get as much info as possible, so I can attempt to reproduce it, or at least understand it better, that way I can approach the Stripe devs for help.

Thanks! :slight_smile: