sandstorm-io / blackrock

Cluster management
Apache License 2.0
74 stars 13 forks source link

Correctly handle failed payments on updating plan to paid. #45

Closed kentonv closed 7 years ago

kentonv commented 7 years ago

Currently the user gets away with another free month.

Sadly like 1/3 of cards are failing so far.

kentonv commented 7 years ago

(I also improved the plan selector to show a comprehensible error when plan switching fails due to the user's card being declined. Previously it would just say "internal server error". This only applied if the user already had a card on file; when entering a new card, a different flow is used that is reasonable.)

kentonv commented 7 years ago

Merging so I can push this now.

paulproteus commented 7 years ago

That's great that you did this!

Out of curiosity, how are you measuring that 1/3 of cards are failing? Via the log messages at https://github.com/sandstorm-io/blackrock/pull/45/files#diff-f68f4fce24d348d611bb272beecdc442R253 ? Or something else?

kentonv commented 7 years ago

@paulproteus By eyeballing the Stripe dashboard. Currently it's sitting at 40 failed, 52 succeeded since we enabled payments...