Closed
Bug 1376623
Opened 8 years ago
Closed 8 years ago
PaymentMethodData.supportedMethods is now DOMString
Categories
(Core :: DOM: Web Payments, enhancement)
Core
DOM: Web Payments
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: marcosc, Assigned: edenchuang)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: [WP-MVP][M4])
Attachments
(1 file)
|
31.75 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
We changed the spec to now use a DOMString.
| Assignee | ||
Comment 1•8 years ago
|
||
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → echuang
| Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8882610 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8882610 -
Flags: review?(amarchesini) → review+
| Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0c719d83c30b
PaymentMethodData.supportedMethods is now DOMString. r=baku
Keywords: checkin-needed
Comment 4•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment 5•8 years ago
|
||
This is already documented here:
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/PaymentRequest
But I'm a little confused - a sequence of DOMStrings seems programmatically more useful than a single DOMString, so why change it? Do we only allow one card to be input at a time, or will the DOMString contains more than one payment method at once?
I've tried updating the parameter description, but I am pretty the example is now wrong and needs to be changed. Can I have a quick tech review before I do anything else?
Thanks.
Flags: needinfo?(mcaceres)
Comment 6•8 years ago
|
||
(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #5)
> This is already documented here:
>
> https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/
> PaymentRequest
>
> I've tried updating the parameter description, but I am pretty the example
> is now wrong and needs to be changed. Can I have a quick tech review before
> I do anything else?
Correction as below. Let me know for any question.
[Parameters]
1) methodData.supportedMethods -
"... it is a single DOMString, and the meaning of the data parameter changes with the supportedMethod."
=> should be supportedMethod's' (I know it's confusing. Please refer to [1])
2) methodData.data.supportedNetworks -
"This property is required if the supportedMethods property is 'basic-card'."
=> the property is optional per NOTE in [2]
3) options => Lets instead of Let's
[Examples]
4) supportedMethods usage should be revised as your 'Chrome 57 later' example. Check [3] for examples in current spec.
5) The total amount 55 is less than displayItems amount 65, though possible [4] but weird.
6) nit: the indention of var supportedInstruments, details and options should be the same level.
---
[1] https://github.com/w3c/browser-payment-api/issues/549#issuecomment-314236618
[2] https://www.w3.org/TR/payment-method-basic-card/#basiccardrequest
"The supportedNetworks and supportedTypes fields are both optional. If neither is provided then any card may be returned."
[3] https://www.w3.org/TR/payment-request/#examples-of-usage
[4] https://www.w3.org/TR/payment-request/#dom-paymentdetailsbase-displayitems
"It is the developer's responsibility to verify that the total amount is the sum of these items. "
Flags: needinfo?(mcaceres)
Comment 7•8 years ago
|
||
(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #5)
> But I'm a little confused - a sequence of DOMStrings seems programmatically
> more useful than a single DOMString, so why change it? Do we only allow one
> card to be input at a time, or will the DOMString contains more than one
> payment method at once?
Please refer to discussions [1][2]. One dilemma to solve was [3].
[1] https://github.com/w3c/browser-payment-api/issues/549
[2] https://github.com/w3c/browser-payment-api/pull/536
[3] https://github.com/w3c/browser-payment-api/pull/536#issuecomment-303996517
Comment 8•8 years ago
|
||
(In reply to Ben Tian [:btian] from comment #7)
> (In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #5)
> > But I'm a little confused - a sequence of DOMStrings seems programmatically
> > more useful than a single DOMString, so why change it? Do we only allow one
> > card to be input at a time, or will the DOMString contains more than one
> > payment method at once?
>
> Please refer to discussions [1][2]. One dilemma to solve was [3].
>
> [1] https://github.com/w3c/browser-payment-api/issues/549
> [2] https://github.com/w3c/browser-payment-api/pull/536
> [3]
> https://github.com/w3c/browser-payment-api/pull/536#issuecomment-303996517
Thanks for the useful comments Ben ... I now understand this ;-)
So, I've updated the page according to your above comments. I've deleted the "Chrome 57 later" example section completely, and just rolled the newest state of things into the main example.
It is probably not worth differentiating spec changes in the different examples when we are this early on in the spec process.
Updated•8 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•8 years ago
|
Whiteboard: [WP-MVP][M4]
You need to log in
before you can comment on or make changes to this bug.
Description
•