I posted this here originally on Drupal Answers but was told it might better here since it's not a support request but a bug report...

We are running Drupal 8.6.15 with Commerce 8.x-2.13, using the Commerce Authorize.net module, with Authorize.net as the only payment gateway.

If a user enters incorrect CC information (such as wrong zip code) when checking out, the page loads and gives them the generic error message of an error occurred with payment. However, the card data that they entered gets stored into their payment information for their user profile and there is no way to edit or change it from checkout (I realize that it is on their user profile page with the right permissions, but that doesn't help in this scenario).

The Payment Information pane shows "Card ending in XXX" with a link to edit it, but the link goes nowhere and just reloads the same page. Here is a screenshot. To complicate things, the card data that they just entered shows up below it as a radio button option but the only way they can actually proceed is to add ANOTHER credit card. So multiple payment methods are being created, with no direct way to edit them during checkout, leaving the user confused and unable to proceed AND not knowing exactly what is wrong with their entered data. Here is another screenshot showing what I mean.

I understand the reasoning for storing the last four numbers and making the new payment methods each time as explained in this thread/answer on Drupal Anwers, however the fact that the user has:

  • No way to know what was wrong with their entered information
  • No way to edit what they previously entered, at least from this same checkout screen (see first screenshot)
  • That new credit cards keeps getting generated with no delineation as to which is which (is it the first or last one that they most recently added?) if they are trying to use the same card

makes this an incredibly frustrating user experience if someone makes a mistake when checking out.

There needs to be a way for users to edit their information directly from the checkout page and there doesn't seem to be a way to do that. By fixing the payment information link or not generating more and more payment methods that would seem to be the correct path, but I know how intricately entwined all of Commerce is with itself. Open to any suggestions or help!

*Note: see attached screenshot

CommentFileSizeAuthor
#3 screenshot.png65.59 KB3cwebdev

Comments

hotsaucedesign created an issue. See original summary.

3cwebdev’s picture

To add more information to this issue, the problem is compounded because a new 'stored card' for every failed payment attempt.

For example,

  1. User enter some incorrect payment information (wrong CC #, zip code, etc)
  2. Payment does not go through and an error message is shown
  3. The first failed credit card is shown as a radio button with the last four digits (note that this is a failed and incorrect card)
  4. User has no direct way to view or edit their incorrect information
  5. If the user can figure out to click the 'credit card' link and re-enter their payment info then they can start again
  6. If it fails again now they have yet another failed, saved credit card radio button that they can not directly view or edit
  7. Repeat a few times and now the user has a very confusing list or invalid credit cards saved

Expected Behavior

If the credit card payment fails for some reason then Commerce should not save the credit card info but should rather reopen the payment info form that the user just entered, allowing them the review and edit their information.

Additionally, I think it would make sense to make storing your card optional. Some users may not want their credit card information stored.

3cwebdev’s picture

Issue summary: View changes
StatusFileSize
new65.59 KB
3cwebdev’s picture

Component: Checkout » Payment
embeau’s picture

I've also come across this issue. Great explanation, 3CWebDev. I agree that storing card information should be optional.

3cwebdev’s picture

Title: Payment information not editable » Payment information not editable after failed payment attempt
mglaman’s picture