Re: [webpayments] What is the appropriate conversational pattern for the API? (#55)

@rsolomakhin -- so that the implementations of those callbacks can run asynchronous code. For example, consider that the `getShippingOptions` function may need to make a call to the merchant site's server to retrieve the shipping options for a given shipping address. If the callback does not return a Promise, then this doesn't work. You could alternatively pass *another* callback function (node.js style for async programming) to the `getShippingOptions` function, but the preferred pattern on the Web is to use Promises.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments/issues/55#issuecomment-183171788

Received on Friday, 12 February 2016 04:03:45 UTC