mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 15:22:46 +00:00
load model
This commit is contained in:
parent
404bede398
commit
4287e8aa5d
@ -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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
12
plugin.rb
12
plugin.rb
@ -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'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user