Add error message
stripeErrorMessage: { errorCode: ‘ERR_STRIPE’, errorMessage: _(‘Card not created in stripe’).translate() }
here we check the condition and if it is not satisfied will throw an error.
result.done(function (model) { self.creditcardView = null; console.log(“this inside if result”, model) ProfileModel.getInstance().get(‘creditcards’).add(model, { silent: true });
self.setCreditCard({ model: model });
console.log(‘newold’, model.ccmemo) var new_temp = model.ccmemo; save_result.resolve(function () { console.log(‘newold’, new_temp) if (!new_temp) {
return jQuery.Deferred().reject(this.stripeErrorMessage); } });
