chore: Allow to update refund reason (#372)

This commit is contained in:
Kartikeya Hegde
2023-01-14 22:57:36 +05:30
committed by GitHub
parent 4e00b92dc1
commit 50f16d270a
4 changed files with 12 additions and 3 deletions

View File

@ -49,6 +49,7 @@ impl From<StripeUpdateRefundRequest> for refunds::RefundUpdateRequest {
fn from(req: StripeUpdateRefundRequest) -> Self {
Self {
metadata: req.metadata,
reason: None,
}
}
}

View File

@ -328,8 +328,9 @@ pub async fn refund_update_core(
let response = db
.update_refund(
refund,
storage::RefundUpdate::MetadataUpdate {
storage::RefundUpdate::MetadataAndReasonUpdate {
metadata: req.metadata,
reason: req.reason,
},
merchant_account.storage_scheme,
)