Re: [w3c/webpayments-methods-card] Say how we integrate with PaymentRequest (#23)

marcoscaceres commented on this pull request.



> @@ -180,6 +185,22 @@
       </p>
 
       </section>
+
+      <section>
+      <h3>Processing incoming payment method data</h3>
+
+      <p>When the PaymentRequest API is to pass data to a payment app supporting basic-card as part
+      of the <a>paymentRequest.show()</a> algorithm, the payment app must process any non-null
+      incoming data by deserializing it using an algorithm equivalent to that performed by
+      <a>JSON.parse</a>, and then converting the resulting object to a <code>BasicCardRequest</code>
+      dictionary.</p>
+
+      <p>If these steps fail, the payment app must report that it does not support the incoming

Also, I think we should throw the WebIDL exception here that resulted from the conversion. Then, in `.show()` rethrow it.

In .canMakePayment(), we can catch it, and report it as a "false" - optionally, informing the developer that they data is invalid.  

Note: another mention of payment app here. 

-- 
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/webpayments-methods-card/pull/23#pullrequestreview-40197857

Received on Thursday, 25 May 2017 02:52:19 UTC