Skip to content

Commit 92ee1db

Browse files
feat(connector): add surcharge support in paypal connector (#2568)
1 parent 2d5d3b8 commit 92ee1db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/router/src/connector/paypal.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,10 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
370370
let connector_router_data = paypal::PaypalRouterData::try_from((
371371
&self.get_currency_unit(),
372372
req.request.currency,
373-
req.request.amount,
373+
req.request
374+
.surcharge_details
375+
.as_ref()
376+
.map_or(req.request.amount, |surcharge| surcharge.final_amount),
374377
req,
375378
))?;
376379
let req_obj = paypal::PaypalPaymentsRequest::try_from(&connector_router_data)?;

0 commit comments

Comments
 (0)