This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
Releases: mozilla/fxpay
Releases · mozilla/fxpay
0.0.16
0.0.15
- Breaking change: All errors are now returned as subclasses of
Error
instead of uppercase codes. See the error documentation for details. - fxpay now includes a small shim to polyfill ES6 promises when they aren't available natively.
- fxpay is now defined as a UMD module.
fxpay.getProducts(callback)
has been deprecated. Use the returned promise instead of a callback, like this:
fxpay.getProducts().then(function(products) {
products.forEach(function(product) {
// ...
});
}).catch(function(error) {
console.error('Error getting products:', error.toString());
});
fxpay.init()
has been deprecated. You can now restore purchased products when you fetch them, like this:
fxpay.getProducts().then(function(products) {
products.forEach(function(product) {
if (product.hasReceipt()) {
product.validateReceipt()
.then(function(restoredProduct) {
console.log('product restored:', restoredProduct);
}).catch(function(error) {
console.error('error restoring product ' + error);
});
}
});
});
fxpay.purchase(productId, callback)
has been deprecated. Use the returned promise instead of a callback, like this:
fxpay.purchase(productId).then(function(product) {
// product has been purchased
}).catch(function(error) {
console.error('Error purchasing product: ' + error);
});
- Changes to the product object:
- Added
product.receiptInfo.receipt
toproduct.receiptInfo
. - New method:
product.validateReceipt().then(...).catch(...)
. - New method:
product.hasReceipt()
-> returns a boolean.
- Added
- Added
fxpay.getProduct(productId).then(function(product) {...})
. - Adapter objects no longer need to define
init()
.
0.0.14
- Added
location=yes
to popup opener for desktop purchases. - Exposed
pricePointId
in productInfo object. - Removed the
allowAnyAppReceipt
setting because it was insecure and we couldn't think of a valid use case for it. - Adapters must now define
configure()
. See the default adapter for details.
0.0.13
- Add XSSI chaff to generated sourcemap as per spec. See http://goo.gl/XS3fXz
0.0.12
- removed
{mozSystem: true}
from XHR requests because all Marketplace APIs support CORS properly now. This means packaged apps no longer need thesystemXHR
permission. - added
fxpay.validateAppReceipt()
for paid apps - A debug build is generated alongside the minified build. The sourcemap now uses this as it's point of reference. As a result 3 files are now supplied in the dist directory via bower:
- fxpay.min.js
- fxpay.min.js.map
- fxpay.debug.js
- More files are excluded from the bower package.
- Fixed bug 1135331
0.0.11
Update the args passed to resizeTo so they take into account the window chrome.
0.0.10
Poll for window closure so that when the flow moves to 3rd Party domains we can detect closure.
0.0.9
Fix orphaned payment window (during desktop flow) in some error conditions.
0.0.8
Allow scrollbars in popups.
0.0.7
Fixed popup issues in desktop payment flow.