@@ 110,6 110,8 @@ class Registration
end
def self.for(iq, customer, tel)
+ plan_name = iq.form.field("plan_name").value.to_s
+ customer = customer.with_plan(plan_name)
kinds.fetch(iq.form.field("activation_method")&.value&.to_s&.to_sym) {
raise "Invalid activation method"
}.call(iq, customer, tel)
@@ 123,8 125,7 @@ class Registration
reply.note_type = :info
reply.status = :completed
- plan_name = iq.form.field("plan_name").value.to_s
- @customer = customer.with_plan(plan_name)
+ @customer = customer
@customer_id = customer.customer_id
@tel = tel
@addr = ELECTRUM.createnewaddress