adrienverge / localstripe

A fake but stateful Stripe server that you can run locally, for testing purposes.
GNU General Public License v3.0
192 stars 59 forks source link

NWST-312: Cancel subscription at max payment retries #211

Closed frankyhung93 closed 1 year ago

frankyhung93 commented 1 year ago

Changes:

  1. extended Subscription._on_recurring_payment_failure to cancel the subscription when max retries reached
  2. add "payment_intent.payment_failed" webhook event
  3. update invoice attributes(attempt_count, auto_advance, closed) during payment and retry failures
  4. added Invoice._api_retry_invoice and PaymentIntent._api_retry for the payment retry scenario