lib/Ext/device/purchases/Sencha.js
function(config) {
            var me = this;

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

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

            if (this.get('state') != 'charged') {
                config.failure.call(config.scope || this, 'purchase is not charged');
            }

            Ext.device.Communicator.send({
                command: 'Purchase#complete',
                identifier: me.get('transactionIdentifier'),
                callbacks: {
                    success: function() {
                        me.set('state', 'completed');
                        config.success.call(config.scope || this);
                    },
                    failure: function() {
                        me.set('state', 'charged');
                        config.failure.call(config.scope || this);
                    }
                },
                scope: config.scope || this
            });
        }
function(config) {
            var me = this;

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

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

            if (this.get('state') != 'charged') {
                config.failure.call(config.scope || this, 'purchase is not charged');
            }

            Ext.device.Communicator.send({
                command: 'Purchase#complete',
                identifier: me.get('transactionIdentifier'),
                callbacks: {
                    success: function() {
                        me.set('state', 'completed');
                        config.success.call(config.scope || this);
                    },
                    failure: function() {
                        me.set('state', 'charged');
                        config.failure.call(config.scope || this);
                    }
                },
                scope: config.scope || this
            });
        }
Attempts to mark this purchase as complete
@param {Object} config
@param {Function} config.success
@param {Function} config.failure
@param {Object} config.scope