The payment method gateway class already contains code to discard user-entered credit card types and base it on the number instead. If the user doesn't need to enter the card type, we should auto-select it for them on the front-end also. This patch ports the same function to JavaScript, and then uses it when filling out a credit card number. It also converts the pay_cc.js file to using behaivors, and is more specific than the previous code which should allow multiple credit card entries on the same page without class conflicts.

Comments

quicksketch’s picture

StatusFileSize
new44.82 KB
new3.74 KB

While navigating the payment forms, I'm thrown off by the credit card images being skipped over. From a usability perspective, this could cause confusion for users that are used to navigating forms with the keyboard alone or are unable to use a mouse. Even though the card-type is auto-selected for you based on number, it would be handy to be able to select these images through the keyboard for consistency.

This updated patch wraps the images in anchor tags, so that they may be selected with the keyboard like other types of links.

jerdavis’s picture

Status: Needs review » Fixed

Committed to HEAD, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.