Re: [paymentrequest] API needs equivalent of PassKit's paymentAuthorizationViewController:didAuthorizePayment:completion: callback (#23)

Thanks for bringing this up. I'm not quite sure how the spec should handle this case. From an API perspective, it's quite simple. The final `instrumentResponse` object could have a function that the merchant could call that passes arbitrary information back to the payment app. e.g.

```js
.then(function(instrumentResponse){
  instrumentResponse.onCompletion(...);
});
```

The tricky part is figuring out how that works across different platforms. How does the UA pass the data back to the payment instrument? Would we need some way in the request to let merchants know that calling this function is required, or would this just be something that the merchant would have to know as part of accepting apple pay for example? My hunch is the latter, but need to think more. Do you have other thoughts on API design here?

---
Reply to this email directly or view it on GitHub:
https://github.com/WICG/paymentrequest/issues/23#issuecomment-161098863

Received on Tuesday, 1 December 2015 21:19:51 UTC