add success handler
This commit is contained in:
parent
fdd4d1ed5f
commit
36c1731565
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue