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