Re: [w3c/webpayments-methods-card] Clarify the required behaviour for options parameters (#26)

@marcoscaceres and @rsolomakhin,

(I hope this summary makes sense!)

BasicCard implementations (whether browsers or third party payment apps) construct a BasicCardResponse. That is used to populate the Details field of the PaymentResponse.

(
Suggested edit in BasicCard section 5: change:
   "The BasicCardResponse dictionary contains the response from the PaymentRequest API"
to
   "The BasicCardResponse dictionary is used to populate the Details field of the PaymentResponse in [Payment Request API]."
)

@rsolomakhin has let us know that Chrome REQUIRES that the user provide all five fields, and
that all five fields are used to populate the PaymentResponse Details. Other implementations
of Basic Card are licensed to behave differently because the WebIDL defines four of the
response fields as optional.

Here are a few options we might consider:

 1) Make all the BasicCardResponse fields required. That would likely increase interop somewhat, but might overconstrain implementations. And my recollection (though I don't have the details) is that some card networks do not use one of the fields and therefore, the implementation cannot collect that piece of data for those networks (and the value would be null).

 2) Leave the WebIDL as is, but state that if an implementation of BasicCard has a value for a BasicCardResponse field, it SHOULD return it.

 3) Leave the WebIDL as is, but state that if an implementation of BasicCard has a value for a BasicCardResponse field, it MUST return it.

Another view of this is to explain what a "null" value means:

 * If the BasicCard implementation must return data, then null might mean only "the card network does not support this field."

 * If the BasicCard implementation is not required to return data for some fields, then null might mean either "the BasicCard implementation chose not to provide a value for this field" or "the card network does not support this field."

So:

 * I don't think @rsolomakhin is talking about data validation. Rather I suspect he would support option #3 above.

 * I think @mattsaxon is asking us to choose between options #2 and #3.

Ian


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments-methods-card/issues/26#issuecomment-290087157

Received on Wednesday, 29 March 2017 13:20:51 UTC