add success handler
This commit is contained in:
@@ -34,7 +34,7 @@ export default Ember.Component.extend({
|
||||
if (paymentIntent.error) {
|
||||
this.set("paymentError", paymentIntent.error);
|
||||
} else {
|
||||
// console.log('ok done');
|
||||
this.paymentSuccessHandler();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -9,6 +9,10 @@ export default Ember.Controller.extend({
|
||||
}).catch(() => {
|
||||
return { error: "An error occured while submitting the form." };
|
||||
});
|
||||
},
|
||||
|
||||
paymentSuccessHandler() {
|
||||
DiscourseURL.redirectTo("patrons/thanks");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
<div class="donations-page-payment">
|
||||
{{donation-form
|
||||
paymentSuccessHandler=(action "paymentSuccessHandler")
|
||||
stripePaymentHandler=(action "stripePaymentHandler")
|
||||
}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user