M config-schema.dhall => config-schema.dhall +1 -0
@@ 1,4 1,5 @@
{ activation_amount : Natural
+, activation_amount_accept : Natural
, admins : List Text
, adr : Text
, approved_domains : List { mapKey : Text, mapValue : Optional Text }
M config.dhall.sample => config.dhall.sample +1 -0
@@ 66,6 66,7 @@ in
},
oxr_app_id = "",
activation_amount = 15,
+ activation_amount_accept = 15,
credit_card_url = \(jid: Text) -> \(customer_id: Text) ->
"https://pay.jmp.chat/${jid}/credit_cards?customer_id=${customer_id}",
electrum_notify_url = \(address: Text) -> \(customer_id: Text) ->
M lib/registration.rb => lib/registration.rb +2 -0
@@ 38,6 38,8 @@ class Registration
jid = ProxiedJID.new(customer.jid).unproxied
if customer.active?
Finish.new(customer, tel)
+ elsif customer.balance >= CONFIG[:activation_amount_accept]
+ BillPlan.new(customer, tel)
elsif CONFIG[:approved_domains].key?(jid.domain.to_sym)
Allow.for(customer, tel, jid)
else
M test/test_helper.rb => test/test_helper.rb +1 -0
@@ 68,6 68,7 @@ CONFIG = {
},
notify_from: "notify_from@example.org",
activation_amount: 1,
+ activation_amount_accept: 1,
plans: [
{
name: "test_usd",