mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-06 09:39:51 +00:00
whoops did not set currency
This commit is contained in:
parent
325ca5d7b3
commit
57a18f5a4e
@ -26,7 +26,7 @@ module DiscoursePatrons
|
||||
interval: params[:interval],
|
||||
product: params[:product],
|
||||
trial_period_days: params[:trial_period_days],
|
||||
currency: SiteSetting.discourse_patrons_currency,
|
||||
currency: params[:currency],
|
||||
active: params[:active],
|
||||
metadata: { group_name: params[:metadata][:group_name] }
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# name: discourse-patrons
|
||||
# about: Integrates Stripe into Discourse to allow visitors to make payments and Subscribe
|
||||
# version: 2.3.0
|
||||
# version: 2.3.1
|
||||
# url: https://github.com/rimian/discourse-patrons
|
||||
# authors: Rimian Perkins
|
||||
|
||||
@ -41,7 +41,7 @@ end
|
||||
|
||||
after_initialize do
|
||||
::Stripe.api_version = "2019-11-05"
|
||||
::Stripe.set_app_info('Discourse Patrons', version: '2.3.0', url: 'https://github.com/rimian/discourse-patrons')
|
||||
::Stripe.set_app_info('Discourse Patrons', version: '2.3.1', url: 'https://github.com/rimian/discourse-patrons')
|
||||
|
||||
[
|
||||
"../lib/discourse_patrons/engine",
|
||||
|
@ -109,9 +109,8 @@ module DiscoursePatrons
|
||||
end
|
||||
|
||||
it "creates a plan with a currency" do
|
||||
SiteSetting.stubs(:discourse_patrons_currency).returns('aud')
|
||||
::Stripe::Plan.expects(:create).with(has_entry(:currency, 'aud'))
|
||||
post "/patrons/admin/plans.json", params: { metadata: { group_name: '' } }
|
||||
::Stripe::Plan.expects(:create).with(has_entry(:currency, 'AUD'))
|
||||
post "/patrons/admin/plans.json", params: { currency: 'AUD', metadata: { group_name: '' } }
|
||||
end
|
||||
|
||||
it "creates a plan with an interval" do
|
||||
|
Loading…
x
Reference in New Issue
Block a user