From 72a39e1ea28feefe67aa48f1f11ef7bd00250fd8 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Sun, 20 Mar 2016 15:01:09 +0000 Subject: [PATCH 1/2] 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/2] 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;