Restore product from receipt (bug 981235) - #16
Conversation
There was a problem hiding this comment.
Is there any documentation on what the info object is? Is it just an object with a productId?
There was a problem hiding this comment.
It just has productId for now but I would like to document the info object. I should add that to the docs.
|
r+wc Still not crazy about node-style callbacks though. It might be nice for Weird suggestion for the possibly future promises: use fxpay.init().forEach(function (receipt) {
// Do stuff.
}).done(function (receipts) {
// Got all of them!
}).fail(function (error) {
// Oops.
}); |
|
I think moving to promises might be worthwhile. As for passing a restoration callback an array of products (or receipts), I thought about this and I don't think it's practical. I think you'd want one callback per product so that you can enable/disable each one independently of the others. Also, the |
|
The thing I like about node style callbacks is you don't have to define a separate error callback. It seems more concise. Also, it forces the caller to at least think about errors. |
|
r+ |
Restore product from receipt (bug 981235)
No description provided.