- From: Manu Sporny <notifications@github.com>
- Date: Tue, 15 Dec 2015 21:00:15 -0800
- To: w3c/webpayments <webpayments@noreply.github.com>
- Message-ID: <w3c/webpayments/issues/36@github.com>
The paymentRequest API asserts that a payment request is a programmable object: http://wicg.github.io/paymentrequest/specs/paymentrequest.html#paymentrequest-interface that is instantiated like so ```javascript var payment = new PaymentRequest(supportedInstruments, details, options, schemeData); ``` and can have methods called on it like so: ```javascript payment.addEventListener("shippingAddressChange", function (changeEvent) { // Process shipping address change }); ``` The Web Payments CG's Browser API asserts that a payment request is just data: http://wicg.github.io/web-payments-browser-api/#processing-a-payment-request and that data is processed by functions (see example in link above for a clear picture of what this looks like in practice). These are two different general design approaches for the browser API: 1. There is data, and functions act on that data (Web Payments CG approach). 2. There are objects that consist of data, and verbs that hang off of those objects (paymentRequest approach). So, what is our design approach for the browser API? --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webpayments/issues/36
Received on Wednesday, 16 December 2015 05:00:48 UTC