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

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

            Ext.device.Communicator.send({
                command: 'Purchase#purchase',
                identifier: this.get('productIdentifier'),
                callbacks: {
                    success: config.success,
                    failure: config.failure
                },
                scope: config.scope || this
            });
        }
function(config) {
            if (!config.success) {
                Ext.Logger.error('You must specify a `success` callback for `#purchase` to work.');
                return false;
            }

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

            Ext.device.Communicator.send({
                command: 'Purchase#purchase',
                identifier: this.get('productIdentifier'),
                callbacks: {
                    success: config.success,
                    failure: config.failure
                },
                scope: config.scope || this
            });
        }
Will attempt to purchase this product.

## Example

product.purchase({
success: function() {
console.log(product.get('localizedTitle') + ' purchased!');
},
failure: function() {
console.log('Something went wrong while trying to purchase ' + product.get('localizedTitle'));
}
});

@param {Object} config
@param {Ext.data.Model/String} config.product
@param {Function} config.success
@param {Function} config.failure