We used to have them add card in web then charge after, but these days
we charge them in web for this first tx to get 3DS, so this code path is
all but dead and we can remove it.
Using the optional field on Activation or the InviteCode flow now use
the same code and do the same things. Always check balance and proceed
to bill if we've used a parent code, otherwise never do that.
Fixes the subaccount-from-onboarding guard as well.
Was only being used for PayPal transitions (which are mostly done) and
only when transitioning to BTC (which they usually don't) and only
provided extra reinforcement of a message they've already seen by now.
Let's not complicate the code for that.
We used to have them add card in web then charge after, but these days
we charge them in web for this first tx to get 3DS, so this code path is
all but dead and we can remove it.
46d9022
Merge branch '388-warn-about-top-up-limits' of https://git.sr.ht/~amolith/sgx-jmp
Click to expand commit body
* '388-warn-about-top-up-limits' of https://git.sr.ht/~amolith/sgx-jmp:
feat(form): conditionally display max top-up amount
test(credit-card-sale): add missing openstruct require
style: wrap YARD comment lines
refactor: remove duplicated logic from BuyAccountCreditForm
refactor: set DeclinedError defaults to nil
fix: raise and check for errors correctly
refactor: protect max_declines
fix: redo amount validation in the form
docs: add Yard documentation to code we touched
feat: add upper limit to top-ups based on trust level
Stephen Paul Weber
created
32f038a
feat(form): conditionally display max top-up amount
Click to expand commit body
Remove range from the form, but pass max_top_up_amount through and only display
it if the user isn't tombed.
Replace incorrect `CreditCardSale::TooLowError` and
`CreditCardSale::TooHighError` with correct `AmountTooLowError` and
`AmountTooHighError` respectively.