show a bootbox message instead of console log

This commit is contained in:
Rimian Perkins 2019-10-24 16:37:14 +11:00
parent eead6fd345
commit 21b27f169a
1 changed files with 2 additions and 10 deletions

View File

@ -13,13 +13,9 @@ export default Ember.Controller.extend({
actions: {
stripePaymentHandler() {
// https://stripe.com/docs/billing/subscriptions/payment#signup-flow
this.stripe.createToken(this.get("cardElement")).then(result => {
if (result.error) {
// Inform the customer that there was an error.
// var errorElement = document.getElementById('card-errors');
// errorElement.textContent = result.error.message;
bootbox.alert(result.error.message);
} else {
const customerData = {
source: result.token.id
@ -38,11 +34,7 @@ export default Ember.Controller.extend({
}
subscription.save().then(() => {
console.log('ok');
// return DiscourseURL.redirectTo(
// Discourse.SiteSettings
// .discourse_patrons_subscription_group_landing_page
// );
bootbox.alert("ok payment good... some kind of message");
});
});
}