From 35bce210a2bb145381cd5d53c0db1d7cc48676ab Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 2 Aug 2021 13:50:37 -0500 Subject: [PATCH] monthly_price is in 10000ths of a dollar, not 1000ths --- lib/plan.rb | 2 +- test/test_helper.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plan.rb b/lib/plan.rb index 3d1a4a2c3aa4588e825231421ae8e3ec9f45bfec..1554b1221f96e469461f9eb9d5f13df07377c1dc 100644 --- a/lib/plan.rb +++ b/lib/plan.rb @@ -21,7 +21,7 @@ class Plan end def monthly_price - BigDecimal.new(@plan[:monthly_price]) / 1000 + BigDecimal.new(@plan[:monthly_price]) / 10000 end def merchant_account diff --git a/test/test_helper.rb b/test/test_helper.rb index 899b690700688a7dd47bd86eacb553172828eab8..fb0d6739ec7290c0b7afe32b5776b7af285dac89 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -57,7 +57,7 @@ CONFIG = { { name: "test_usd", currency: :USD, - monthly_price: 1000 + monthly_price: 10000 }, { name: "test_bad_currency", @@ -66,7 +66,7 @@ CONFIG = { { name: "test_cad", currency: :CAD, - monthly_price: 1000 + monthly_price: 10000 } ], braintree: {