Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Releases: mozilla/fxpay

0.0.16

14 Apr 16:52
Compare
Choose a tag to compare
  • Fix bug where fxpay.errors and fxpay.settings were not defined when using the minified distribution.

0.0.15

14 Apr 15:58
Compare
Choose a tag to compare
  • 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 to product.receiptInfo.
    • New method: product.validateReceipt().then(...).catch(...).
    • New method: product.hasReceipt() -> returns a boolean.
  • Added fxpay.getProduct(productId).then(function(product) {...}).
  • Adapter objects no longer need to define init().

0.0.14

27 Feb 18:28
Compare
Choose a tag to compare
  • 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

25 Feb 13:45
Compare
Choose a tag to compare

0.0.12

25 Feb 10:47
Compare
Choose a tag to compare
  • removed {mozSystem: true} from XHR requests because all Marketplace APIs support CORS properly now. This means packaged apps no longer need the systemXHR 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

11 Feb 17:15
Compare
Choose a tag to compare

Update the args passed to resizeTo so they take into account the window chrome.

0.0.10

04 Feb 16:29
Compare
Choose a tag to compare

Poll for window closure so that when the flow moves to 3rd Party domains we can detect closure.

0.0.9

04 Feb 16:47
Compare
Choose a tag to compare

Fix orphaned payment window (during desktop flow) in some error conditions.

0.0.8

04 Feb 16:48
Compare
Choose a tag to compare

Allow scrollbars in popups.

0.0.7

04 Feb 16:49
Compare
Choose a tag to compare

Fixed popup issues in desktop payment flow.