~singpolyma/sgx-jmp

ref: 4178a87a901cbf00cddbf9671c2f99aa79dfd3a8 sgx-jmp/lib/registration.rb -rw-r--r-- 9.9 KiB
Add missing require

To allow these modules to be used in isolation (especially when
testing).
Refactor BuyAccountCreditForm

add_to_form no longer needs a promise or a network call, instead we use
a factory to get that data up front and inject the dependency.

New BuyAccountCreditForm#parse to get the relevant data back out of an
XMPP form.

Some changes to Transaction and sgx_jmp.rb to use the new method
semantics.
Merge branch 'wording'

* wording:
  Update instructions to be closer to what is in current web signup
Update instructions to be closer to what is in current web signup
Set execting status properly
ergonomics for testing credit card
Merge branch 'create_customer_id'

* create_customer_id:
  Create customer_id if it does not exist before we start registration
  Break out CustomerPlan
  Inject BackendSgx per customer
Create customer_id if it does not exist before we start registration
Merge branch 'invites'

* invites:
  Block repeated invite code tries by customer id
  Allow user to activate using invite code
Block repeated invite code tries by customer id

So it's not as trivial to brute-force the space and find an open one. Limit is
10 tries per hour.
Allow user to activate using invite code

Checks if the code is available and marks it used, then activates. Tracks who
invited and who used in the table for later reward or punishment.
Fix for credit card flow
Merge branch 'set-forwarding-on-finish'

* set-forwarding-on-finish:
  Configure number for inbound calls
Merge branch 'show-ratecenter-during-signup'

* show-ratecenter-during-signup:
  Show rate center during signup
Merge branch 'activated-users-to-finish'

* activated-users-to-finish:
  Test that registered users get the Registered step
  Already activated user goes straight to finish
Show rate center during signup

Fetch from bandwidth so we can show it to the user, in case they happen to care.
Already activated user goes straight to finish

If not registered, but activated, they must have paid but failed to get their
number setup. Maybe the number was already taken. Maybe they paid manually. In
any case we can skip all intervening steps and go straight to buying and
configuring their number for them.
Configure number for inbound calls

Adds the settings to redis that jmp-fwdcalls will use to route inbound calls.
Not done by the sgx registration even though fwdcalls is currently a plug-over,
and of course won't be once fwdcalls dies so do it here.
Merge branch 'new-signup-credit-card-decline'

* new-signup-credit-card-decline:
  Block repeated declines for 24 hours
  Handle credit card decline
Block repeated declines for 24 hours
Next