Commit Graph

54 Commits

Author SHA1 Message Date
Margareta Eliza Balazs
0fc8f9feae Backed out changeset 3fcc7597cd8d (bug 1429198) for ES lint failure in builds/worker/checkouts/gecko/browser/components/payments/res/paymentRequest.js. CLOSED TREE 2018-12-18 15:50:33 +02:00
Diego Pino Garcia
28e3196dab Bug 1429198 - Account for supportedNetworks in payment modifiers. r=MattN 2018-12-17 22:15:00 +02:00
Jared Wein
31ab1285a6 Bug 1477113 - Dispatch paymentmethodchange event from the front-end. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D13740
2018-12-13 18:48:54 +00:00
Narcis Beleuzu
1cc9bcfe4d Backed out changeset 3fa420b71260 (bug 1477113) for bc failures on browser_total.js. CLOSED TREE 2018-12-13 09:53:39 +02:00
Jared Wein
aa27d08ad7 Bug 1477113 - Dispatch paymentmethodchange event from the front-end. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D13740
2018-12-13 06:35:30 +00:00
Matthew Noorenberghe
524f79da6b Bug 1495549 - Clear merchant payer errors when the payer address changes. r=jaws
Depends on D12605

Differential Revision: https://phabricator.services.mozilla.com/D12606
2018-12-11 18:17:31 +00:00
Matthew Noorenberghe
4c5e4ab744 Bug 1505141 - Always preserveOldProperties for payment request but blank mailing address fields by default. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D12190
2018-11-21 00:46:23 +00:00
Timothy Guan-tin Chien
8bbe2361d0 Bug 1504268 - Show proper OS login dialog labels when filling/editing credit cards r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11095
2018-11-19 21:00:02 +00:00
Jared Wein
d785afa3e1 Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844
2018-11-16 04:47:15 +00:00
Csoregi Natalia
367f2a6c44 Backed out changeset 081704356a93 (bug 1495122) for bc failures on browser_shippingaddresschange_error.js. CLOSED TREE 2018-11-16 00:13:55 +02:00
Jared Wein
1e1b4a817a Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844
2018-11-15 21:19:43 +00:00
shindli
e3e5e91546 Backed out changeset 3df92480890e (bug 1495122) as it was requested by the dev on irc 2018-11-15 23:13:12 +02:00
Jared Wein
91d024d18a Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844
2018-11-15 21:08:07 +00:00
Matthew Noorenberghe
967da6d08e Bug 1435880 - Handle moving/detaching tabs between windows when a Payment Request is showing. r=jaws
Depends on D10180

Differential Revision: https://phabricator.services.mozilla.com/D10183
2018-11-15 15:06:21 +00:00
Matthew Noorenberghe
84983d3068 Bug 1435880 - Put the payment dialog <browser> directly in the ChromeWindow. r=jaws
Remove the intermediate <html:iframe> as it makes support of detaching impossible since we would need
to swap both the <browser> and <html:iframe> contents during a tab detach.
Since a docshell swap requires both docshells to have a frame and document loaded and the move of the
tab won't wait on payments code to do async work to get frames and documents ready for swapping, I
couldn't see a way to get detaching to work with the nested frames.

* Swapping the docshell of only the outer <html:iframe> still caused a reload of the inner <browser>.

Differential Revision: https://phabricator.services.mozilla.com/D10180
2018-11-15 15:05:12 +00:00
Matthew Noorenberghe
3145d7de7c Bug 1486954 - Part IV, Recover from decryption errors in some places. r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

Differential Revision: https://phabricator.services.mozilla.com/D5083
2018-10-22 22:57:29 -07:00
Timothy Guan-tin Chien
8bca3c3a1a Bug 1486954 - Part I, Encrypt credit card numbers with OS key store. r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D4498
2018-10-17 02:31:04 +00:00
Matthew Noorenberghe
07253e67b6 Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497
2018-10-20 03:40:05 +00:00
Matthew Noorenberghe
a163a3d254 Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934
2018-10-20 03:39:32 +00:00
Jared Wein
d99da117e9 Bug 1494551 - Sort the formautofill data by the last used time. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9174
2018-10-19 17:00:31 +00:00
Jared Wein
b1d56aadc5 Bug 1420853 - Ensure only fields valid for the given country are saved. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9034
2018-10-19 16:36:45 +00:00
Brindusan Cristian
9d31304003 Backed out 2 changesets (bug 1435871) for multiple browser-chrome failures on payments. CLOSED TREE
Backed out changeset 0f7592b662e2 (bug 1435871)
Backed out changeset 039f6d65036e (bug 1435871)
2018-10-19 12:36:13 +03:00
Matthew Noorenberghe
448fa69c0b Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497
2018-10-19 05:06:30 +00:00
Matthew Noorenberghe
ec5cf1bb78 Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934
2018-10-19 05:06:22 +00:00
Margareta Eliza Balazs
11e1ce43c3 Backed out 4 changesets (bug 1486954) for hangs on Linux. a=backout
Backed out changeset c895888bdddc (bug 1486954)
Backed out changeset 27e9286503e8 (bug 1486954)
Backed out changeset 87e64652386d (bug 1486954)
Backed out changeset 96a6e1ceb697 (bug 1486954)
2018-10-18 12:40:21 +03:00
Timothy Guan-tin Chien
4b48150182 Bug 1486954 - Part IV, Recover from decryption errors in some places r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

Differential Revision: https://phabricator.services.mozilla.com/D5083
2018-10-17 02:34:22 +00:00
Timothy Guan-tin Chien
024a78bd94 Bug 1486954 - Part I, (Nighty-only feature) Encrypt credit card numbers with OS key store r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D4498
2018-10-17 02:31:04 +00:00
Eden Chuang
1d8eac2831 Bug 1441752 - Adding an new attribute regionCode in PaymentAddress. r=baku 2018-09-28 12:21:59 +02:00
Jared Wein
6ee3964cf7 Bug 1470184 - Update the Preferences text and layout for Web Payments. r=flod,MattN
Differential Revision: https://phabricator.services.mozilla.com/D6937
2018-09-28 08:29:01 +00:00
Matthew Noorenberghe
cc38c1b150 Bug 1490805 - Add a required CSC/CVV field to the add card page. r=jaws
Depends on D6882

Differential Revision: https://phabricator.services.mozilla.com/D6883
2018-09-27 17:26:24 +00:00
Matthew Noorenberghe
3b00cb1745 Bug 1432939 - Link to Firefox Options/Preferences from the PaymentRequest dialog. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D6724
2018-09-25 17:26:38 +00:00
Jared Wein
3ec633199f Bug 1481972 - Add remaining countries to address autofill countries list. r=MattN
Saving and filling the countries via Form Autofill will still be limited to certain countries
but this allows the storage to be useful for Web Payments in other countries.

Differential Revision: https://phabricator.services.mozilla.com/D5194
2018-09-23 23:50:03 -07:00
Sam Foster
7906b3732a Bug 1429181 - Fix serialization of payment method data. r=MattN
* Includes a workaround to explicitly cloneInto the paymentMethods data when we create the PaymentRequest object in the content window in tests.

MozReview-Commit-ID: LFy0h3fIXXA

Differential Revision: https://phabricator.services.mozilla.com/D5823
2018-09-14 20:24:08 +00:00
Timothy Guan-tin Chien
67e3dcd7aa Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 17:54:48 +00:00
Csoregi Natalia
a34cf6da92 Backed out changeset 56aa054d4cc0 (bug 1399367) for browser/extensions/formautofill/test/unit/test_activeStatus.js failures. CLOSED TREE 2018-09-05 05:47:21 +03:00
Timothy Guan-tin Chien
6071bf1543 Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 00:32:57 +00:00
Marcos Cáceres
3a73997f97 Bug 1485881 - Drop support for PaymentAddress.languageCode r=smaug 2018-08-27 16:30:00 +03:00
Matthew Noorenberghe
ef8f325b1c Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI
2018-07-25 12:37:51 -07:00
Cosmin Sabou
4d1b71eee6 Backed out 5 changesets (bug 1476204) for browser chrome failures on browser_editCreditCardDialog. CLOSED TREE
Backed out changeset 10f3d1014592 (bug 1476204)
Backed out changeset a88879ea32e8 (bug 1476204)
Backed out changeset 001f13f2dd21 (bug 1476204)
Backed out changeset f0f464e3c27c (bug 1476204)
Backed out changeset ed92000eca20 (bug 1476204)
2018-07-26 04:12:56 +03:00
Matthew Noorenberghe
9e3276d213 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI
2018-07-25 12:37:51 -07:00
Matthew Noorenberghe
4981c7d568 Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I
2018-07-21 22:17:49 -07:00
Gurzau Raul
7bbe193f73 Backed out 4 changesets (bug 1463538) for failing on /payments/test/browser/browser_payments_onboarding_wizard.js
Backed out changeset 1c945ede0071 (bug 1463538)
Backed out changeset 8ccd9f4b230d (bug 1463538)
Backed out changeset e078fb39875e (bug 1463538)
Backed out changeset 798bf0d7928c (bug 1463538)
2018-07-24 11:16:21 +03:00
Matthew Noorenberghe
551547045b Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I
2018-07-21 22:17:49 -07:00
Sam Foster
b0eaf62f75 Bug 1447777 - Add completion fail and timeout error pages. r=MattN
* A new CompletionErrorPage / completion-error-page element which represents the content of the completion error
* Leave the dialog open when complete() results in a 'fail' or 'timeout'.
* The 'done' button on the fail & timeout error page closes the dialog by sending a message up to the paymentDialogWrapper.
* Rewrite the pay button rendering logic to ensure it is disabled when it should be
* Retry handling and UI not addressed here. Will need a new bug when the DOM support has landed.
* Extend completeStatus support in debugging.html and group like actions to tidy up a bit

MozReview-Commit-ID: GDhJqrj14uT

* Add tests to verify that the dialog stays open when completion fails or times out
* Add tests to verify that complete() throws after the timeout
* Rework completeStatus mochitest for PaymentDialog

MozReview-Commit-ID: 4ZNVEYMp7h5
2018-07-20 15:51:52 -07:00
Sam Foster
0e15cd355e Bug 1468644 - cc-numbers are always masked in dialog content; tests to verify this and card details in the payment response. r=jaws
MozReview-Commit-ID: 34MkjyRBth7
2018-07-18 12:45:45 -07:00
Sam Foster
f704ec5021 Bug 1463608 - Expose FormAutofill computeFields methods, use them for temporary records in payments. r=MattN
* Test helpers for cards
* Refactor the test_add_link test to test in private & non-private window

MozReview-Commit-ID: AeVJOkSwQps
2018-05-30 16:56:25 -07:00
Matthew Noorenberghe
4dd71f263a Bug 1466720 - Don't reload l10n.js in the PaymentRequest scope on a refresh. r=sfoster
There was an error trying to redefine variables from l10n.js via loadSubScript. We really only need
it loaded once like a frame script but I had to fix the l10n.js code to handle this properly.

MozReview-Commit-ID: EbNrEaRQJbs
2018-06-11 00:03:47 -07:00
Jared Wein
4f99e1e183 Bug 1429180 - Change selectedStateKey to an array that defines the path within the state object that should be updated. r=MattN
MozReview-Commit-ID: IjJfmUtvjdz
2018-05-21 22:05:47 -04:00
Jared Wein
33bb7942c7 Bug 1429180 - Option to use a new billing address when adding a new payment method. r=MattN
MozReview-Commit-ID: 5LrpUw1LdT3
2018-05-10 15:12:01 -04:00
Sam Foster
f37f93e022 Bug 1427960 - Add temporary addresses to state, add toggle to enable saving/not new addresses. r=MattN
* Implement store in paymentDialogWrapper for temporary addresses & creditCards
* Add the persist checkbox to the add/edit address form. Defaults to unchecked when adding an address in a private session.
* The union of saved and temporary addresses can be retrieved from paymentRequest.getAddresses(). References to state.savedAddresses updated to use this when appropriate
* New tests for adding and editing addresses from a private window


MozReview-Commit-ID: KyD2BPNFYtZ
2018-04-26 15:05:10 -07:00