~singpolyma/sgx-jmp

ref: f7efec39c42d749f110490a74c69dda2af875393 sgx-jmp/test/test_registration.rb -rw-r--r-- 11.8 KiB
Merge branch 'import-to-catapult'

* import-to-catapult:
  Import newly-purchased numbers to Catapult
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.
Test that registered users get the Registered step
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.
Import newly-purchased numbers to Catapult

Since we still use Catapult ("v1") for voice application, we need to import all
numbers there and set their applicationId to match.
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
Handle credit card decline

Show user error on decline and give the chance to pick another card.
Merge branch 'new-signup-add-credit-card'

* new-signup-add-credit-card:
  Happy path for credit card signup
  Panic should work on any value for error
  Allow getting default payment method, not just index
  Object representing the backend SGX to use
  Stop polluting Object namespace with Blather DSL
  Work in the presence of em-synchrony
  Helper to allow ordering phone number from Bandwidth v2
  Helper to get a promise that resolves after N seconds
  Every payment kind will need the plan, so put it at the top
  Use registration pattern for Payment kinds
  Method to bill the plan of a Customer
  Use Forwardable for simple delegations
  Helper to allow using sync-style code in a Promise context
  New signup: go to web to choose credit card
  OOB helper
  Reject promise on stanza error
  Fix typo
Happy path for credit card signup

Assuming credit card payment works, you can now activate a new account by paying
with one.
New signup: go to web to choose credit card

This step, if chosen, directs the user to the jmp-pay webapp to add a credit
card.  It includes an OOB element for use by user agents that can handle
that (possibly for webview embed, etc) with a note-based fallback as per XEP.
Once the user chooses "next" the code checks if they have actually added a card,
and if so continues to a yet-unimplemented step and if not repeats the
instruction to go to the web app.
Merge branch 'register-command-first-pass'

* register-command-first-pass:
  Add sourcehut CI
  Add Rakefile to run all tests
  Initial registration flow for Bitcoin
  Registrations that start on the web will have a tel selected already
  Helpers for doing Electrum RPC
  Add helper to fetch current BTC sell prices
  Allow skipping tests without being caught in pry
Initial registration flow for Bitcoin

This is the Bitcoin "happy path" where there is already a tel and a customer_id.
Gets all the way to generating a BTC address for payment and quoting an amount.
Stubs out flows for credit card and activation code as well, but does not
implement those flows.

TBD: after bitcoin payment comes in and jmp-pay activates the account, we should
come back here to actually buy the number, select a new one if no longer
available, etc.