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