Re: [w3c/payment-request] Extensibility of PaymentResponse.complete(result) (#817)

> For enums, IDL binding layer just converts whatever you pass into it into a string, so passing an object would become "[object Object]"

Ah, makes sense. 

> `PaymentComplete or Object`

This seems like a good direction. 

> But we should never start at object... object is where we land when all else fails.

The reason I think we have to use the JSON serialisable object is for the same reasons `PaymentMethodData.data` in the request is an `object`. This could take any form, based on the payment method.

On the plus side, it's possible for browsers to enforce validation for known payment methods (like `basic-card`) where there is an IDL definition of the object in the payment method spec.

Would be interesting to explore the possibility of having an IDL definition in the manifest for payment methods that use a URL identifier?

-- 
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/payment-request/issues/817#issuecomment-457298567

Received on Thursday, 24 January 2019 18:09:20 UTC