- From: Marcos Cáceres <notifications@github.com>
- Date: Tue, 07 Nov 2017 22:14:52 +0000 (UTC)
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 November 2017 22:15:16 UTC
```javascript await canMakePayment = PaymentRequest.canMakePayment(methodData); const pr = new PaymentRequest({ supportedMethod: "apple-pay", }); pr.canMakePayment(); pr.addEventListener('merchantvalidation', (evt) => { evt.complete(new Promise((resolve, reject) => { return fetch(severUrl + evt.merchantValidationUrl).then((r) => r.text()); }); }); response = await pr.show(promise(someOtherDetails)); let paymentMethod = response.methodName; try { response = await response.complete("retry", {"errorField": "postalCode"}); } catch (error) { console.log('retry rejected'); if (isPush(paymentMethod)) { /* custom logic */ } } ``` ```javascript registration.paymentManager.retryable = false; registration.paymentManager.userHint = '$$$'; registration.payentManager.instruments.set(/* ... */); ``` -- 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/646#issuecomment-342641012
Received on Tuesday, 7 November 2017 22:15:16 UTC