Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(refund): change amount to refund_amount (#1268)
Arvind Patel24c3a42898a3
diff --git a/connector-template/transformers.rs b/connector-template/transformers.rsindex 3a4f5c5e3a..dcf9dbcc2e 100644--- a/connector-template/transformers.rs+++ b/connector-template/transformers.rs@@ -115,7 +115,7 @@ impl<F> TryFrom<&types::RefundsRouterData<F>> for {{project-name | downcase | patype Error = error_stack::Report<errors::ConnectorError>;fn try_from(item: &types::RefundsRouterData<F>) -> Result<Self,Self::Error> {Ok(Self {- amount: item.request.amount,+ amount: item.request.refund_amount,})}}diff --git a/crates/router/src/connector/bitpay/transformers.rs b/crates/router/src/connector/bitpay/transformers.rsindex 92626abd7d..a113c5e201 100644--- a/crates/router/src/connector/bitpay/transformers.rs+++ b/crates/router/src/connector/bitpay/transformers.rs@@ -154,7 +154,7 @@ impl<F> TryFrom<&types::RefundsRouterData<F>> for BitpayRefundRequest {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(item: &types::RefundsRouterData<F>) -> Result<Self, Self::Error> {Ok(Self {- amount: item.request.amount,+ amount: item.request.refund_amount,})}}diff --git a/crates/router/src/connector/iatapay/transformers.rs b/crates/router/src/connector/iatapay/transformers.rsindex f76da1c667..7b7fc0ccfd 100644--- a/crates/router/src/connector/iatapay/transformers.rs+++ b/crates/router/src/connector/iatapay/transformers.rs@@ -236,7 +236,7 @@ impl<F> TryFrom<&types::RefundsRouterData<F>> for IatapayRefundRequest {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(item: &types::RefundsRouterData<F>) -> Result<Self, Self::Error> {Ok(Self {- amount: item.request.amount,+ amount: item.request.refund_amount,merchant_id: IatapayAuthType::try_from(&item.connector_auth_type)?.merchant_id,merchant_refund_id: match item.request.connector_refund_id.clone() {Some(val) => val,