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

        Ext.device.Communicator.send({
            command: 'Purchase#getPurchases',
            callbacks: {
                callback: function(purchases) {
                    var ln = purchases.length,
                        i;

                    for (i = 0; i < ln; i++) {
                        purchases[i].state = 'charged';
                    }

                    var store = Ext.create('Ext.data.Store', {
                        model: 'Ext.device.purchases.Purchase',
                        data: purchases
                    });

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

        Ext.device.Communicator.send({
            command: 'Purchase#getPurchases',
            callbacks: {
                callback: function(purchases) {
                    var ln = purchases.length,
                        i;

                    for (i = 0; i < ln; i++) {
                        purchases[i].state = 'charged';
                    }

                    var store = Ext.create('Ext.data.Store', {
                        model: 'Ext.device.purchases.Purchase',
                        data: purchases
                    });

                    config.callback.call(config.scope || this, store);
                }
            },
            scope: config.scope || this
        });
    }
Returns a {@link Ext.data.Store} instance of all purchases the current user has been charged.

@param {Object} config
@param {Function} config.callback
@param {Ext.data.Store} config.callback.store  A store of all purchases the current user has been charged.
@param {Object} config.scope