From 60f66bad60efa5f36a03851b977194fe1746a20a Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Mon, 19 Jun 2017 09:54:15 +1000
Subject: [PATCH 1/2] BREAKING CHANGE: change `supportedMethods` to DOMString
Closes #549.
Changes `supportedMethods` from a sequence to single DOMString.
---
index.html | 42 +++++++++++++++++-------------------------
1 file changed, 17 insertions(+), 25 deletions(-)
diff --git a/index.html b/index.html
index f619858a..8203faf5 100644
--- a/index.html
+++ b/index.html
@@ -302,13 +302,13 @@
const methodData = [{
- supportedMethods: ["basic-card"],
+ supportedMethods: "basic-card",
data: {
supportedNetworks: ['visa, 'mastercard'],
supportedTypes: ['debit']
}
}, {
- supportedMethods: ["https://example.com/bobpay"],
+ supportedMethods: "https://example.com/bobpay",
data: {
merchantIdentifier: "XXXX",
bobPaySpecificField: true
@@ -382,12 +382,6 @@
For each paymentMethod of methodData:
- - If the length of the
- paymentMethod.supportedMethods sequence is
- zero, then throw a TypeError, optionally
- informing the developer that each payment method needs
- to include at least one payment method identifier.
-
- If the data
member of paymentMethod is missing, let
serializedData be null. Otherwise, let
@@ -856,10 +850,9 @@
request.[[\serializedMethodData]]:
- If methodData.supportedMethods
- contains a payment method identifier of a payment
- method that some payment handler supports (including
- its payment method specific capabilities), resolve
+ "PaymentMethodData.supportedMethods">supportedMethods is a
+ supported payment method identifier (including its
+ payment method specific capabilities), resolve
promise with true, and abort this algorithm.
@@ -1053,7 +1046,7 @@
dictionary PaymentMethodData {
- required sequence<DOMString> supportedMethods;
+ required DOMString supportedMethods;
object data;
};
@@ -1071,9 +1064,8 @@
supportedMethods member
-
- supportedMethods is a required sequence of strings containing
- payment method identifiers for payment methods that the
- merchant web site accepts.
+ supportedMethods is a payment method identifier for a
+ payment method that the merchant web site accepts.
-
data member
@@ -1346,7 +1338,7 @@
dictionary PaymentDetailsModifier {
- required sequence<DOMString> supportedMethods;
+ required DOMString supportedMethods;
PaymentItem total;
sequence<PaymentItem> additionalDisplayItems;
object data;
@@ -1354,18 +1346,17 @@
The PaymentDetailsModifier dictionary provides details that
- modify the PaymentDetailsBase based on payment method
- identifier. It contains the following fields:
+ modify the PaymentDetailsBase based on a payment method
+ identifier. It contains the following members:
-
supportedMethods
-
- The supportedMethods member contains a sequence of payment
- method identifiers. The remaining members in the
- PaymentDetailsModifier apply only if the user selects a
- payment method included in this sequence.
+ The supportedMethods is a payment method identifier.
+ The members of the PaymentDetailsModifier only apply if the
+ user select this payment method.
-
total
@@ -1374,7 +1365,7 @@
This PaymentItem value overrides the total member in the
PaymentDetailsInit dictionary for the payment method
- identifiers in the supportedMethods member.
+ identifiers of the supportedMethods member.
-
additionalDisplayItems
@@ -2772,7 +2763,8 @@
-
The term payment method
- identifier is defined by [[!payment-method-id]].
+ identifier is defined by [[!payment-method-id]]. It's an unique
+ identifier for a payment method.
-
HTML
From 2a43dba5cb49b5a06f49ab53a1093bb41ec7b16e Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Tue, 20 Jun 2017 15:19:31 +1000
Subject: [PATCH 2/2] fix typo
---
index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 8203faf5..cdcbc0c0 100644
--- a/index.html
+++ b/index.html
@@ -1354,9 +1354,9 @@
supportedMethods
-
- The supportedMethods is a payment method identifier.
- The members of the PaymentDetailsModifier only apply if the
- user select this payment method.
+ The supportedMethods member is a payment method
+ identifier. The members of the PaymentDetailsModifier only
+ apply if the user select this payment method.
-
total