load model

This commit is contained in:
Rimian Perkins 2019-09-13 13:52:41 +10:00
parent 404bede398
commit 4287e8aa5d
2 changed files with 14 additions and 12 deletions

View File

@ -38,15 +38,13 @@ export default Ember.Component.extend({
receiptEmail: this.receiptEmail receiptEmail: this.receiptEmail
}; };
this.stripePaymentHandler(data).then( this.stripePaymentHandler(data).then(paymentIntent => {
paymentIntent => {
if (paymentIntent.error) { if (paymentIntent.error) {
this.set("paymentError", paymentIntent.error); this.set("paymentError", paymentIntent.error);
} else { } else {
this.paymentSuccessHandler(); this.paymentSuccessHandler();
} }
} });
);
} }
} }
}); });

View File

@ -2,7 +2,7 @@
# name: discourse-patrons # name: discourse-patrons
# about: Integrates Stripe into Discourse to allow visitors to make payments # about: Integrates Stripe into Discourse to allow visitors to make payments
# version: 1.0.0 # version: 1.1.0
# url: https://github.com/rimian/discourse-patrons # url: https://github.com/rimian/discourse-patrons
# authors: Rimian Perkins # authors: Rimian Perkins
@ -25,9 +25,13 @@ after_initialize do
::Stripe.api_version = "2019-08-14" ::Stripe.api_version = "2019-08-14"
::Stripe.set_app_info('Discourse Patrons', version: '1.0.0', url: 'https://github.com/rimian/discourse-patrons') ::Stripe.set_app_info('Discourse Patrons', version: '1.0.0', url: 'https://github.com/rimian/discourse-patrons')
load File.expand_path('../lib/discourse_patrons/engine.rb', __FILE__) [
load File.expand_path('../config/routes.rb', __FILE__) "../lib/discourse_patrons/engine",
load File.expand_path('../app/controllers/patrons_controller.rb', __FILE__) "../config/routes",
"../app/controllers/patrons_controller",
"../app/models/payment",
].each { |path| require File.expand_path(path, __FILE__) }
Discourse::Application.routes.append do Discourse::Application.routes.append do
mount ::DiscoursePatrons::Engine, at: 'patrons' mount ::DiscoursePatrons::Engine, at: 'patrons'