mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-04 05:59:48 +08:00
fix: decide refund type by the request and not defaults (#505)
This commit is contained in:
@ -491,7 +491,7 @@ pub async fn validate_and_create_refund(
|
||||
.set_merchant_id(merchant_account.merchant_id.clone())
|
||||
.set_connector_transaction_id(connecter_transaction_id.to_string())
|
||||
.set_connector(connector)
|
||||
.set_refund_type(enums::RefundType::RegularRefund)
|
||||
.set_refund_type(req.refund_type.unwrap_or_default().foreign_into())
|
||||
.set_total_amount(payment_attempt.amount)
|
||||
.set_refund_amount(refund_amount)
|
||||
.set_currency(currency)
|
||||
|
||||
Reference in New Issue
Block a user