Re: [w3c/browser-payment-api] Making this API work with HTML Forms (#330)

@adrianhopebailie, can you help me understand why it doesn't apply to all types? Basically, I'm wondering why ".details" can be collapsed into `FormData`? 

Look at the API:

```JS
interface PaymentResponse {
    serializer = {attribute};

    readonly attribute DOMString       methodName;
    readonly attribute object          details;
    readonly attribute PaymentAddress? shippingAddress;
    readonly attribute DOMString?      shippingOption;
    readonly attribute DOMString?      payerName;
    readonly attribute DOMString?      payerEmail;
    readonly attribute DOMString?      payerPhone;

    Promise<void> complete(optional PaymentComplete result = "unknown");
};
```
All the attributes there can just be collapsed into FormData to the point where all you need is:

```JS
PaymentResponse : FormData {
   Promise<void> complete(optional PaymentComplete result = "unknown");
};
``` 


-- 
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/issues/330#issuecomment-264427920

Received on Friday, 2 December 2016 10:54:35 UTC