lib/Ext/device/purchases/Sencha.js
function(config) {
        if (!config.success) {
            Ext.Logger.error('You must specify a `success` callback for `#getProducts` to work.');
            return false;
        }

        if (!config.failure) {
            Ext.Logger.error('You must specify a `failure` callback for `#getProducts` to work.');
            return false;
        }

        Ext.device.Communicator.send({
            command: 'Purchase#getProducts',
            productInfos: JSON.stringify(config.productInfos),
            callbacks: {
                success: function(products) {
                    var store = Ext.create('Ext.data.Store', {
                        model: 'Ext.device.Purchases.Product',
                        data: products
                    });

                    config.success.call(config.scope || this, store);
                },
                failure: config.failure
            },
            scope: config.scope || this
        });
    }
function(config) {
        if (!config.success) {
            Ext.Logger.error('You must specify a `success` callback for `#getProducts` to work.');
            return false;
        }

        if (!config.failure) {
            Ext.Logger.error('You must specify a `failure` callback for `#getProducts` to work.');
            return false;
        }

        Ext.device.Communicator.send({
            command: 'Purchase#getProducts',
            productInfos: JSON.stringify(config.productInfos),
            callbacks: {
                success: function(products) {
                    var store = Ext.create('Ext.data.Store', {
                        model: 'Ext.device.Purchases.Product',
                        data: products
                    });

                    config.success.call(config.scope || this, store);
                },
                failure: config.failure
            },
            scope: config.scope || this
        });
    }
Returns a {@link Ext.data.Store} instance of all products available to purchase.

## Example

Ext.device.Purchases.getProducts({
success: function(store) {
console.log('Got the store! You have ' + store.getCount() + ' products.');
},
failure: function() {
console.log('Oops. Looks like something went wrong.');
}
});

@param {Object} config
@param {Object[]} config.productInfos An array of all products productInfos
@param {Function} config.success
@param {Ext.data.Store} config.success.store A store of all products available to purchase.
@param {Function} config.failure
@param {Object} config.scope