If uc_stripe is one of several payment methods offered to the user, like, in our case, next to PayPal and bank transfers, there is no need to mount and initialise the Stripe card element if those other payment methods have been selected by the user. However, having uc_stripe mount them always, as it does at present, causes a major issue for the other payment methods if uc_stripe decides to display its "Sorry, for security reasons your card cannot be processed. Please refresh this page and try again. If the problem persists please check that Javascript is enabled your browser." message.

The issue is that that message is invisible when another payment method is selected, but it still prevents the Review order checkout button from working (it disables it). As a result the user cannot use other payment methods.

Ideally, uc_stripe would mount and destroy the Stripe card element as it is being selected/deselected as their chosen payment method.

On another note, reloading the page never fixes the problem. Most of the time using the browser's back button helps, but often the user has to start a new transaction.

Comments

Rafal Lukawiecki created an issue. See original summary.

Rafal Lukawiecki’s picture

Category: Feature request » Bug report
Rafal Lukawiecki’s picture

Regarding my comment "On another note, reloading the page never fixes the problem. Most of the time using the browser's back button helps, but often the user has to start a new transaction." the fix for #3168978: JS - Stripe makes the checkout form unusable when there's a form error corrects that behaviour.

However, it still would be better if Stripe was not loaded unless it is selected as the active payment method.

Rafal Lukawiecki’s picture

Category: Bug report » Feature request

Thanks to the fix for the other issue, the frequency of this situation has decreased dramatically. I am unsure if implementing this feature request is economical. I will monitor for it whilst testing our site over the next couple of weeks, and if it does not seem necessary, I would be inclined to close it as "won't fix" for the time being. What do the maintainers think?