[w3c/browser-payment-api] Reject acceptedPromise if payment method identifer is invalid (#557)

Per suggestion here for consistency with fail fast design: https://github.com/w3c/browser-payment-api/pull/536#discussion_r124839099

The payment identifiers provided in a request should be valid (per the PMI spec) and can either be checked as part of the `show()` algorithm at step 11 [here](https://w3c.github.io/browser-payment-api/#show-method) or earlier at step 4.2 of the Payment Request constructor [here](https://w3c.github.io/browser-payment-api/#constructor) although this is likely more processing than desired inside a constructor.

Assuming this check is implemented in the `show()` algorithm it should result in the promise being rejected. The error to use is up for debate... 

URL parsing error seems best for a URL identifier unless the issue is specific to payment method identifiers (not using `https` etc)

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

Received on Thursday, 29 June 2017 16:00:15 UTC