- From: Dave Longley <notifications@github.com>
- Date: Thu, 01 Jun 2017 21:42:43 -0700
- To: w3c/browser-payment-api <browser-payment-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/browser-payment-api/pull/536/c305688115@github.com>
@marcoscaceres you seem to be saying (paraphrasing):
"You can just mint a new payment method identifier and put out a spec with new Web IDL for every new bitcoin version."
Which seems to ignore @adrianhopebailie's second point, which was:
> BIP 70 (the mechanism for doing Bitcoin payments) is designed to be extensible so **its unlikely that each new version is going to be supported by a new revision of a payment method specification published by the WG to update the WebIDL.**
(emphasis added)
I think the response to that point should be this:
If bitcoin wants to do things that way then they should publish one spec and the Web IDL for their payment method "data" should just be a "plain JS object". We could even say that if a spec doesn't say anything about their "data" that it will fall back to the default Web IDL for a plain JS object (it is understood that it has to move between JS and C++ somehow).
The only question that remains: Will browsers reject simple string payment method identifiers if they have not implemented the Web IDL for those methods?
Will the browser do this:
```js
if(isPaymentMethodIdentifierAString()) {
if(isPaymentMethodIdentifierKnown()) {
// we know this, use appropriate Web IDL
} else {
// throw error
}
} else {
// use plain JS object Web IDL to coerce "data"
}
```
Or will it do this:
```js
if(isPaymentMethodIdentifierAString()) {
if(isPaymentMethodIdentifierKnown()) {
// we know this, use appropriate Web IDL
} else {
// use plain JS object Web IDL to coerce "data"
}
} else {
// use plain JS object Web IDL to coerce "data"
}
```
The problem with the former is that it means that people now can't use bitcoin (without a polyfill) until every browser implements it. They could use some URI (if URIs were permitted not just URLs) like "urn:payment-method:bitcoin" but that would be unfortunate for a variety of reasons.
With the second approach, it's true that you won't get certain types of checks for certain types of payment methods on certain browsers -- but those checks can be progressively added over time. What you will avoid is blocking people from using certain payment methods.
--
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/browser-payment-api/pull/536#issuecomment-305688115
Received on Friday, 2 June 2017 04:43:17 UTC