Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
customerDelete: function (options) {
var defer = Q.defer();
stripe.customers.del(options.id, function (error, customer) {
if (error) {
defer.reject(error);
} else {
defer.resolve(customer);
}
});
return defer.promise;
},
createCustomer: function (options) {
var defer = Q.defer();
stripe.customers.create(options, function (error, customer) {
if (error) {
defer.reject(error);
} else {
defer.resolve(customer);
}
});
return defer.promise;
},