diff --git a/browser/components/payments/res/debugging.js b/browser/components/payments/res/debugging.js index 8fa0e828f20f..d01fcda76d82 100644 --- a/browser/components/payments/res/debugging.js +++ b/browser/components/payments/res/debugging.js @@ -178,9 +178,7 @@ let REQUEST_2 = { }, }, ], - data: { - supportedTypes: "credit", - }, + data: {}, }, ], error: "", diff --git a/browser/components/payments/res/paymentRequest.js b/browser/components/payments/res/paymentRequest.js index 06c2d3d31d62..bbd2b412f5b0 100644 --- a/browser/components/payments/res/paymentRequest.js +++ b/browser/components/payments/res/paymentRequest.js @@ -250,7 +250,7 @@ var paymentRequest = { } let modifier = modifiers.find(m => { // take the first matching modifier - // TODO (bug 1429198): match on supportedTypes and supportedNetworks + // TODO (bug 1429198): match on supportedNetworks return m.supportedMethods == "basic-card"; }); return modifier || null; diff --git a/browser/components/payments/test/PaymentTestUtils.jsm b/browser/components/payments/test/PaymentTestUtils.jsm index a32deaa0e7e6..f68ce0d207d0 100644 --- a/browser/components/payments/test/PaymentTestUtils.jsm +++ b/browser/components/payments/test/PaymentTestUtils.jsm @@ -421,9 +421,7 @@ var PaymentTestUtils = { label: "Total due", amount: { currency: "USD", value: "2.50" }, }, - data: { - supportedTypes: "credit", - }, + data: {}, }, { additionalDisplayItems: [ diff --git a/dom/payments/test/ConstructorChromeScript.js b/dom/payments/test/ConstructorChromeScript.js index 22e4cd472f3d..5b8b32920ef4 100644 --- a/dom/payments/test/ConstructorChromeScript.js +++ b/dom/payments/test/ConstructorChromeScript.js @@ -108,20 +108,6 @@ function checkComplexRequest(payRequest) { supportedNetworks[idx] + "'."); } } - const supportedTypes = data.supportedTypes; - const expectedSupportedTypes = ["prepaid", "debit", "credit"]; - if (supportedTypes.length != expectedSupportedTypes.length) { - emitTestFail("supportedTypes.length should be '" + - expectedSupportedTypes.length + "', but got '" + - supportedTypes.length + "'."); - } - for (let idx = 0; idx < supportedTypes.length; idx++) { - if (supportedTypes[idx] != expectedSupportedTypes[idx]) { - emitTestFail("supportedTypes[" + idx + "] should be '" + - expectedSupportedTypes[idx] + "', but got '" + - supportedTypes[idx] + "'."); - } - } // checking the passed PaymentDetails parameter const details = payRequest.paymentDetails; if (details.id != "payment details" ) { diff --git a/dom/payments/test/DefaultData.js b/dom/payments/test/DefaultData.js index f5661d759cd1..56ca1a27615f 100644 --- a/dom/payments/test/DefaultData.js +++ b/dom/payments/test/DefaultData.js @@ -5,7 +5,6 @@ const defaultMethods = [{ supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', 'diners', 'jcb', 'mir', ], - supportedTypes: ['prepaid', 'debit', 'credit'], }, }, { supportedMethods: "testing-payment-method", diff --git a/dom/payments/test/test_basiccard.html b/dom/payments/test/test_basiccard.html index 96afa17bb191..7329dd5e641f 100644 --- a/dom/payments/test/test_basiccard.html +++ b/dom/payments/test/test_basiccard.html @@ -21,13 +21,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345 } gScript.addMessageListener("test-fail", testFailHandler); - const errorTypesMethods = [{ - supportedMethods: "basic-card", - data: { - supportedTypes: ["myType"], - }, - }]; - const errorNetworksMethods = [{ supportedMethods: "basic-card", data: { @@ -55,7 +48,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345 supportedNetworks: ["unionpay", "visa", "mastercard", "amex", "discover", "diners", "jcb", "mir", ], - supportedTypes: ["prepaid", "debit", "credit"], }, }]; const defaultDetails = { @@ -97,19 +89,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345 shippingType: "shipping" }; - function testBasicCardRequestWithErrorTypes() { - return new Promise((resolve, reject) => { - try { - const payRequest = new PaymentRequest(errorTypesMethods, defaultDetails, defaultOptions); - ok(false, "Expected 'TypeError', but got success construction."); - resolve(); - } catch (e) { - is(e.name, "TypeError", "Expected TypeError, but got " + e.name); - resolve(); - } - }); - } - function testBasicCardRequestWithErrorNetworks() { return new Promise((resolve, reject) => { try { @@ -282,8 +261,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345 } function runTests() { - testBasicCardRequestWithErrorTypes() - .then(testBasicCardRequestWithErrorNetworks) + testBasicCardRequestWithErrorNetworks() .then(testBasicCardRequestWithUnconvertableData) .then(testBasicCardRequestWithNullData) .then(testBasicCardRequestWithEmptyData) diff --git a/dom/payments/test/test_constructor.html b/dom/payments/test/test_constructor.html index 1374bba47662..35b8cb6918fa 100644 --- a/dom/payments/test/test_constructor.html +++ b/dom/payments/test/test_constructor.html @@ -40,7 +40,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345361 supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', 'diners', 'jcb', 'mir', ], - supportedTypes: ['prepaid', 'debit', 'credit'], }, }]; diff --git a/dom/payments/test/test_requestShipping.html b/dom/payments/test/test_requestShipping.html index a86a24694760..5f75ad70495b 100644 --- a/dom/payments/test/test_requestShipping.html +++ b/dom/payments/test/test_requestShipping.html @@ -27,7 +27,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1436903 supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', 'diners', 'jcb', 'mir', ], - supportedTypes: ['prepaid', 'debit', 'credit'], }, }, { supportedMethods: "testing-payment-method", diff --git a/dom/payments/test/test_showPayment.html b/dom/payments/test/test_showPayment.html index 1f312bdab367..de957679c6d0 100644 --- a/dom/payments/test/test_showPayment.html +++ b/dom/payments/test/test_showPayment.html @@ -33,7 +33,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345366 supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', 'diners', 'jcb', 'mir', ], - supportedTypes: ['prepaid', 'debit', 'credit'], }, }, { supportedMethods: "testing-payment-method", diff --git a/dom/webidl/BasicCardPayment.webidl b/dom/webidl/BasicCardPayment.webidl index 8d5c0688a463..1d8c7e00c6da 100644 --- a/dom/webidl/BasicCardPayment.webidl +++ b/dom/webidl/BasicCardPayment.webidl @@ -6,15 +6,9 @@ * The origin of this WebIDL file is * https://www.w3.org/TR/payment-request/#paymentrequest-interface */ -enum BasicCardType { - "credit", - "debit", - "prepaid" -}; dictionary BasicCardRequest { sequence supportedNetworks; - sequence supportedTypes; }; dictionary BasicCardResponse {