M config.ru => config.ru +6 -0
@@ 291,6 291,12 @@ class JmpPay < Roda
request.ip
)
end
+ if request.params["auto_top_up_amount"].to_i >= 15
+ REDIS.set(
+ "jmp_customer_auto_top_up_amount-#{gateway.customer_id}",
+ request.params["auto_top_up_amount"].to_i
+ )
+ end
if result
r.redirect request.params["return_to"], 303
else
M views/activate.slim => views/activate.slim +11 -0
@@ 16,6 16,11 @@ scss:
}
}
+ details {
+ margin: 2em auto;
+ input { max-width: 3em; }
+ }
+
button {
display: block;
width: 10em;
@@ 56,6 61,12 @@ form method="post" action=""
' $17.95 CAD
input type="radio" name="plan_name" value="cad_beta_unlimited-v20210223" required="required"
+ details
+ summary Auto top-up when account balance is low?
+ label
+ | When balance drops below $5, add $
+ input type="number" name="auto_top_up_amount" min="15" value=""
+
input type="hidden" name="customer_id" value=customer_id
input type="hidden" name="braintree_nonce"