From 72a39e1ea28feefe67aa48f1f11ef7bd00250fd8 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Sun, 20 Mar 2016 15:01:09 +0000 Subject: [PATCH 1/5] Added card sub-brands to payment method identifier list (based upon my understanding of option 1 in the Payment Method Identifiers spec --- specs/basic-card-payment.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/specs/basic-card-payment.html b/specs/basic-card-payment.html index 0bd9ac9b..436af616 100644 --- a/specs/basic-card-payment.html +++ b/specs/basic-card-payment.html @@ -142,14 +142,21 @@

Payment Method Identifier

- - + + + + + + + - + + +
Identifier StringDescription
visaVisa (Credit, Debit, Delta or Electron)
mastercardMasterCard and EuroCard
visaVisa (Credit, Debit and Electron)
visa/creditVisa Credit
visa/debitVisa Debit
visa/electronVisa Electron
mastercardMasterCard (and EuroCard)
mastercard/creditMasterCard Credit
mastercard/debitMasterCard Debit
amexAmerican Express
discoverDiscover
maestroMaestro
dinersDiners Club
jcbJCB
unionpayUnion Pay
unionpayUnionPay
unionpay/creditUnionPay Credit
unionpay/debitUnionPay Debit
From ff776e823e556b71fa36a59367bb6d4b67889d25 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Sat, 2 Apr 2016 11:13:17 +0100 Subject: [PATCH 2/5] Proposal for dealing with specification of required fields I'm suggesting a sequence string field that allows mandatory fields to be specified and have removed some of the 'required' specifications in the BasicCardResponse, related to discussion on https://github.com/w3c/browser-payment-api/pull/9. I've only left PAN as required as I think that is a safe assumption, then the merchant can specify for example that CSC must be supplied for a particular transaction using the requiredFields sequence in the BaseRequestData dictionary. I'm suggesting that if we like this model, we would move this BaseRequestData dictionary object into the PaymentRequest API spec to allow other payment methods to extend it. I'm sure there are other ways to do this and am a newbie to WebIDL/JavaScript APIs, so please forgive if I've modelled this completely wrong for the language. I'll learn! --- specs/basic-card-payment.html | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/specs/basic-card-payment.html b/specs/basic-card-payment.html index 2531ba15..e7eef6eb 100644 --- a/specs/basic-card-payment.html +++ b/specs/basic-card-payment.html @@ -166,8 +166,33 @@

Payment Method Identifier

Payment Method Specific Data for the PaymentRequest constructor

This section describes payment method specific data that is supplied as part of the data argument to the PaymentRequest constructor.

-

There is no payment method specific data used by the PaymentRequest constructor when processing - Basic Card Payment methods.

+

The PaymentRequest constructor can optionally take a BaseRequest object to indicate where generally optional fields in the BasicCardResponse + must be returned for this instance

+ + +
+

BaseRequestData

+
+        dictionary BaseRequestData {
+          sequence requiredFields;
+        };
+      
+ +

+ The BasicRequestData dictionary contains the following fields: +

+ +
+
requiredFields
+
The requiredFields field contains the list of fields that the Payment App must attempt to return, if this requirements cannot be met, e.g. the payment instrument does not support that field, an empty field must be returned to indicate this
+
+ +
+ +
+ This type should be generic to any PaymentRequest and should be moved to the PaymentRequest API as a base type +
+
@@ -179,10 +204,10 @@

Payment Method Response

BasicCardResponse

         dictionary BasicCardResponse {
-          required DOMString cardholderName;
+          DOMString cardholderName;
           required DOMString cardNumber;
-          required DOMString expiryMonth;
-          required DOMString expiryYear;
+          DOMString expiryMonth;
+          DOMString expiryYear;
 		  DOMString cardSecurityCode;
 		  
           BillingAddress? billingAddress;

From 89591e61c7dd6eb20b6a71d328642143e3fc6b21 Mon Sep 17 00:00:00 2001
From: mattsaxon 
Date: Fri, 8 Apr 2016 13:50:54 +0100
Subject: [PATCH 3/5] Add UML Flow as per issue 32

https://github.com/w3c/browser-payment-api/issues/32

This PR shows how a flow could be usefully included in the spec, it does
currently reference an external flow in a separate repository, but I
will rectify that once we have agreed this is a good idea.
---
 specs/basic-card-payment.html | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/specs/basic-card-payment.html b/specs/basic-card-payment.html
index 1790572b..b99f3292 100644
--- a/specs/basic-card-payment.html
+++ b/specs/basic-card-payment.html
@@ -162,6 +162,15 @@ 

Payment Method Identifier

+
+

Payment Method Flow

+

The following represent the flow for all the supported payment method identifier strings as they could be used by a website

+

The blue call-outs show where and how the API is invoked.

+ + + +
+

Payment Method Specific Data for the PaymentRequest constructor

This section describes payment method specific data that is supplied as part of the data From df1ac1789a0added6f4c67c108d4072b6fab5c90 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Fri, 8 Apr 2016 13:53:06 +0100 Subject: [PATCH 4/5] Revert "Add UML Flow as per issue 32" This reverts commit 89591e61c7dd6eb20b6a71d328642143e3fc6b21. --- specs/basic-card-payment.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specs/basic-card-payment.html b/specs/basic-card-payment.html index b99f3292..1790572b 100644 --- a/specs/basic-card-payment.html +++ b/specs/basic-card-payment.html @@ -162,15 +162,6 @@

Payment Method Identifier

-
-

Payment Method Flow

-

The following represent the flow for all the supported payment method identifier strings as they could be used by a website

-

The blue call-outs show where and how the API is invoked.

- - - -
-

Payment Method Specific Data for the PaymentRequest constructor

This section describes payment method specific data that is supplied as part of the data From d1e70f97baeb8741cef7f3c0e87e155cf70af453 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Fri, 8 Apr 2016 13:57:31 +0100 Subject: [PATCH 5/5] Added UML Flow diagram The flow referenced is in an external repo, but I will address that as the next PR if we are happy to progress this way --- specs/basic-card-payment.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specs/basic-card-payment.html b/specs/basic-card-payment.html index 1790572b..b99f3292 100644 --- a/specs/basic-card-payment.html +++ b/specs/basic-card-payment.html @@ -162,6 +162,15 @@

Payment Method Identifier

+
+

Payment Method Flow

+

The following represent the flow for all the supported payment method identifier strings as they could be used by a website

+

The blue call-outs show where and how the API is invoked.

+ + + +
+

Payment Method Specific Data for the PaymentRequest constructor

This section describes payment method specific data that is supplied as part of the data