-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
appRequest
attribute should not be a dictionary
#111
Comments
Thanks; I'm fixing like this in my current round of edits: interface PaymentAppRequest {
readonly attribute DOMString origin;
readonly attribute DOMString id;
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute PaymentItem total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
readonly attribute DOMString optionId;
}; (Needed to change Sequence to FrozenArray since you can't have sequences in interfaces). |
Why not keep this as a dictionary, but just add a |
What is |
This also seems to be missing the shipping options and the selected shipping option? |
(the selected shipping option can be derived from |
Renamed to instrumentId by subsequent edits, it is described as: This attribute indicates the
I don't think we've had any conversation about whether those are to be provided to the payment app. My inclination is that they should not be -- we should have a discussion in the WG before making changes. |
Sorry, I'm still confused. To which member or attribute does it map in Payment Request?
Ok, I don't mind. If we reduce this further, it might end up that we don't end up having to spin up a new browsing context at all (and we only show a native payment sheet). That would probably be a good thing. |
It doesn't. This is part of what we've been trying to explain with regards to it necessarily being a different object type than the So, let me try again to explain what the There are three wallets registered: two on www.americanexpress.com, and one on Bank of America's origin (they have an EV cert, so they get a name rather than a domain displayed in my example, but I'll note this is non-normative). When www.americanexpress.com added the "Account ending in 9004", they did so with something like the following: registration.paymentManager.instruments.set(
"dc2de27a-ca5e-4fbd-883e-b6ded6c69d4f", // This is the implementId
{
name: "Account ending in 9004",
enabledMethods: ["basic-card"],
capabilities: {
supportedNetworks: ['amex'],
supportedTypes: ['credit']
}
}), They would have registered the other payment instruments ("Account ending in 7195" and "Account ending in 3015") similarly, although the first parameter to "set" would have been different. That first parameter, that key, is the So, when I, as a user, click on the "Account ending in 9004" option, we're going to pass that information ( |
ah, got it. Thanks for the clarification. Note that "capabilities" member maps to "data" on the Payment Request side. I wonder if we should change it to |
That is: maybe it's possible to reuse "PaymentMethodData" there, so we don't need define a new thing?
|
I'm satisfied with the outcome (PaymentAppRequest is no longer a dictionary). @marcoscaceres Let's think some more about reusing |
PaymentRequestEvent.idl
contains the following declaration:According to https://heycam.github.io/webidl/#idl-dictionaries, "Dictionaries must not be used as the type of an attribute or constant." Originally filed in http://crbug.com/702581.
The text was updated successfully, but these errors were encountered: