w3c / webpayments

The document repo for the Web Payments Working Group
https://github.com/w3c/webpayments/wiki
Other
257 stars 63 forks source link

Should payment method specifications contain WebIDL? #133

Closed adrianhopebailie closed 7 years ago

adrianhopebailie commented 8 years ago

Migrated from https://github.com/w3c/browser-payment-api/issues/132

I wonder if we need to use WebIDL in the payment method specifications.

This data is supposed to be passed through the user agent with no processing so I think we could simply use a JSON schema definition of some form or just examples and explanations?

WebIDL is over-kill in my opinion and may be a barrier to payments domain experts defining these specifications (which is what we desire).

AxelNennker commented 8 years ago

Firefox and my favorite json pretty printer do not like the json referenced from @msporny comment on w3c/browser-payment-api#132

http://w3c.github.io/webpayments/proposals/core-messages/schemas/PaymentRequest.json

Firefox says: SyntaxError: JSON.parse: bad escaped character at line 29 column 38 of the JSON data http://jsonprettyprint.com/json-pretty-printer.php says: "null"

AxelNennker commented 8 years ago

I have not seen an argument in the discussion in w3c/browser-payment-api#132 that convinced me not to use the standard WebIDL.

Arguments: Counter Argument

  1. Tests are more difficult: I don't buy that because WebIDL dictionaries are simple
  2. Payment experts don't understand WebIDL: Payment experts don't understand JSON-LD neither
  3. "just use json schema": see 2
  4. ...
adrianhopebailie commented 8 years ago

@AxelNennker - I think the core argument is that WebIDL is limited.

i.e. There may be cases where somebody wants to define a payment method that has a data model for the payment method specific data that cannot be modeled in WebIDL because they want to use some more flexible extensibility mechanism.

Ultimately the payment method spec is an interface contract between the payment app and the payee system (or that of their PSP) so they it could be defined in whatever way makes them both comfortable.

My feeling is that we should not prescribe that it must be WebIDL.

ianbjacobs commented 8 years ago

I propose we close this. So far the answer is "yes".

Ian

ianbjacobs commented 7 years ago

Now closing since answer remains "yes, so far"