W3C home > Mailing lists > Public > public-payments-wg@w3.org > May 2017

Data models in Payment Method Specs

From: Adrian Hope-Bailie <adrian@hopebailie.com>
Date: Tue, 9 May 2017 14:19:09 +0200
Message-ID: <CA+eFz_+JphoQsozww7P-B8czPQ5nOOXVm4tiEiSF78fkL4vxKA@mail.gmail.com>
To: Payments WG <public-payments-wg@w3.org>
Hi all,

This may have been obvious to you all but it was not to me so I want to
point it out and make sure we document it for others.

When writing a payment method spec it's important to define the input and
output data models using a dictionary (not an interface) and I avoid
defining custom interfaces altogether. As Marcos explains in this issue [1]
a dictionary, when constructed and consumed by the website is just a
regular Javascript object so there is no need to look for special types.

Adrian

[1] https://github.com/w3c/browser-payment-api/issues/526
Received on Tuesday, 9 May 2017 12:19:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:43:25 UTC