transition to billing after payment

This commit is contained in:
Rimian Perkins 2019-10-25 13:40:03 +11:00
parent edd6449105
commit 948399662d
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,3 @@
import DiscourseURL from "discourse/lib/url";
import { ajax } from "discourse/lib/ajax";
export default Ember.Controller.extend({
@ -13,7 +12,8 @@ export default Ember.Controller.extend({
},
paymentSuccessHandler(paymentIntentId) {
DiscourseURL.redirectTo(`patrons/${paymentIntentId}`);
bootbox.alert("ok payment good... some kind of message");
this.transitionToRoute("user.billing", Discourse.User.current().username.toLowerCase());
}
}
});

View File

@ -35,6 +35,7 @@ export default Ember.Controller.extend({
subscription.save().then(() => {
bootbox.alert("ok payment good... some kind of message");
this.transitionToRoute("user.billing", Discourse.User.current().username.toLowerCase());
});
});
}

View File

@ -1,7 +1,6 @@
export default Discourse.Route.extend({
model() {
console.log('billing');
return {};
},