Closed Bug 2084796 Opened 15 days ago Closed 9 days ago

Name the card security code after the card network

Categories

(Toolkit :: Form Autofill, task)

task

Tracking

()

RESOLVED FIXED
161 Branch
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 new credit-card-security-code-name message 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.

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.

Assignee: nobody → mtigley
Status: NEW → ASSIGNED
Pushed by mtigley@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3e1890faf786 https://hg.mozilla.org/integration/autoland/rev/fe86cb275e76 Name the card security code after the card network. r=credential-management-reviewers,fluent-reviewers,dimi,bolsson

Backed out for causing bc failures @browser_creditCard_capture_cvv.js.

Pushed by mtigley@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7af7175b265b https://hg.mozilla.org/integration/autoland/rev/c586fbca0360 Name the card security code after the card network. r=credential-management-reviewers,fluent-reviewers,dimi,bolsson

Backed out for causing bc failures at browser_creditCard_doorhanger_cvv.js
Backout link
Push with failures
Failure log(s)

Flags: needinfo?(mtigley)
Pushed by mtigley@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/89dd9e24dd51 https://hg.mozilla.org/integration/autoland/rev/76293ba962ab Name the card security code after the card network. r=credential-management-reviewers,fluent-reviewers,dimi,bolsson
Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: