[w3c/browser-payment-api] Is PaymentResponse.details the result of a JSON.parse() (#526)

The `PaymentMethodData.data` member  (in the request) is described as being an object that is "JSON.serialized" but the definition for `PaymentResponse.details` (in the response) doesn't indicate if this will be a deserialized JSON string or how the API will behave if the data is a String and cannot be deserialized.

The algorithm describes `details` says: 

> _Set the details attribute value of response to an object containing the payment method specific message that will be used by the merchant to process the transaction. The format of this response will be defined for each payment method._

Currently only 1 payment method has been implemented, `basic-card` and the format of the response data is defined as an instance of the `BasicCardResponse` dictionary.

As a developer, can I type check this response? Can I check for the presence of the `BasicCardResponse` dictionary type in the global namespace? If so, will the same be true for other payment methods like `credit-transfer` and `tokenization`?

Alternatively, is the result just an object and the WebIDL just defines the basic structure?

-- 
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/526

Received on Monday, 8 May 2017 10:33:03 UTC