Name the card security code after the card network
Categories
(Toolkit :: Form Autofill, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: mtigley, Assigned: mtigley, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxcm-cvv])
Attachments
(1 external file)
Payment cards name their security code differently: Visa calls it CVV, Mastercard CVC and American Express CID. Firefox currently uses a fixed abbreviation that is also inconsistent ("CVC" in the autocomplete dropdown, "CVV" elsewhere).
Add a helper to CreditCard (toolkit/modules/CreditCard.sys.mjs), next to getNetworkL10nId:
getSecurityCodeL10n(network)returns the Fluent id and arguments for a newcredit-card-security-code-namemessage that selects on the network: Visa "CVV", Mastercard "CVC", American Express "CID", and "Security code" for any other or unknown network.formatSecurityCodeName(network)formats it.
Use it wherever the security code is named:
- the card details in the save/update doorhanger ("… | CVC saved");
- the autocomplete dropdown entry for a security code field;
- the Settings payment methods list and the manage payment methods dialog;
- the security code field in the add/edit payment method dialog, which follows the card number as it is typed ("Security code (optional)" until the network is known).
The affected strings get new ids that take the name as a variable. Their old translations contain a fixed "CVV", so they cannot be migrated.
Tests: test_CreditCard.js for the helper, plus test_profileAutocompleteResult.js, browser_creditCard_doorhanger_cvv.js, browser_editCreditCardDialog_cvv.js, browser_manageCreditCardsDialog_cvv.js, browser_paymentsList_cvv.js and browser_creditCard_cvv.js.
Updated•15 days ago
|
| Assignee | ||
Comment 1•14 days ago
|
||
CreditCard.getSecurityCodeL10n() and formatSecurityCodeName() name the code
the way the card's network does (CVV for Visa, CVC for Mastercard, CID for
American Express, and "Security code" otherwise). The doorhanger card
details, the autocomplete entry, the payment methods list and dialogs, and the
edit dialog's field use it instead of a fixed abbreviation.
Updated•14 days ago
|
Comment 3•9 days ago
|
||
Backed out for causing bc failures @browser_creditCard_capture_cvv.js.
Backed out for causing bc failures at browser_creditCard_doorhanger_cvv.js
Backout link
Push with failures
Failure log(s)
Comment 7•9 days ago
|
||
| bugherder | ||
Description
•