Allow modification of failed charges on admin billing page (#4045)

* Allow modification of failed charges on admin billing page

Allows cancelling a failed subscription and forcing another charge attempt

* use addNotification
This commit is contained in:
Emma Alexia
2025-07-27 13:30:16 -04:00
committed by GitHub
parent 7dffb352d5
commit ff88724d01
2 changed files with 83 additions and 4 deletions

View File

@@ -276,7 +276,11 @@ pub async fn refund_charge(
subscription_interval: charge.subscription_interval,
payment_platform: charge.payment_platform,
payment_platform_id: id,
parent_charge_id: Some(charge.id),
parent_charge_id: if refund_amount != 0 {
Some(charge.id)
} else {
None
},
net,
}
.upsert(&mut transaction)