satellite/console: trigger invoice payment on card remove

This change triggers payment when a card is removed.

Issue: https://github.com/storj/storj/issues/6056

Change-Id: Ia1f2b49609ec9d111cbffb0757bec0b513abb79d
This commit is contained in:
Wilfred Asomani 2023-07-19 17:24:34 +00:00 committed by Storj Robot
parent dc1509ee42
commit 2c934d1cfd

View File

@ -304,6 +304,12 @@ func (p *Payments) RemoveCreditCard(w http.ResponseWriter, r *http.Request) {
p.serveJSONError(ctx, w, http.StatusInternalServerError, err) p.serveJSONError(ctx, w, http.StatusInternalServerError, err)
return return
} }
err = p.triggerAttemptPayment(ctx)
if err != nil {
p.serveJSONError(ctx, w, http.StatusInternalServerError, err)
return
}
} }
// BillingHistory returns a list of invoices, transactions and all others billing history items for payment account. // BillingHistory returns a list of invoices, transactions and all others billing history items for payment account.