upgrade strip gem ~> 2.0
This commit is contained in:
parent
b490a94b82
commit
72a35cd738
|
@ -7,12 +7,6 @@ module DiscoursePayments
|
||||||
skip_before_filter :verify_authenticity_token, only: [:create]
|
skip_before_filter :verify_authenticity_token, only: [:create]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
# badge = Badge.find_by_name('Consumer Defender')
|
|
||||||
#
|
|
||||||
# if badge.nil?
|
|
||||||
# head 422 and return
|
|
||||||
# end
|
|
||||||
|
|
||||||
customer = Stripe::Customer.create(
|
customer = Stripe::Customer.create(
|
||||||
:email => current_user.email,
|
:email => current_user.email,
|
||||||
:source => params[:stripeToken]
|
:source => params[:stripeToken]
|
||||||
|
@ -24,9 +18,6 @@ module DiscoursePayments
|
||||||
:description => 'Consumer Defender',
|
:description => 'Consumer Defender',
|
||||||
:currency => 'aud'
|
:currency => 'aud'
|
||||||
)
|
)
|
||||||
|
|
||||||
# BadgeGranter.grant(badge, current_user)
|
|
||||||
|
|
||||||
render :json => charge
|
render :json => charge
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default Ember.Component.extend({
|
||||||
else {
|
else {
|
||||||
var params = {
|
var params = {
|
||||||
stripeToken: result.token.id,
|
stripeToken: result.token.id,
|
||||||
amount: 1234
|
amount: 1235
|
||||||
};
|
};
|
||||||
|
|
||||||
ajax('/charges', { data: params, method: 'post' }).then(data => {
|
ajax('/charges', { data: params, method: 'post' }).then(data => {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# name: discourse-payments
|
# name: discourse-payments
|
||||||
# about: Integrating Discourse with Stripe
|
# about: Integrating Discourse with Stripe
|
||||||
# version: 1.2.1
|
# version: 1.3.0
|
||||||
# url: https://github.com/choiceaustralia/discourse-payments
|
# url: https://github.com/choiceaustralia/discourse-payments
|
||||||
|
# authors: Rimian Perkins
|
||||||
|
|
||||||
gem 'stripe', '1.58.0'
|
gem 'stripe', '2.0.1'
|
||||||
|
|
||||||
load File.expand_path('../lib/discourse_payments/engine.rb', __FILE__)
|
load File.expand_path('../lib/discourse_payments/engine.rb', __FILE__)
|
||||||
load File.expand_path('../config/stripe.rb', __FILE__)
|
load File.expand_path('../config/stripe.rb', __FILE__)
|
||||||
|
|
Loading…
Reference in New Issue