Skip to content

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

fix(connector): fix url_encode issue for paypal and payu (#1534)

Shankar Singh Ce296a49b6230
diff --git a/crates/router/src/connector/paypal.rs b/crates/router/src/connector/paypal.rs
index 2547947c20..28188ae640 100644
--- a/crates/router/src/connector/paypal.rs
+++ b/crates/router/src/connector/paypal.rs
@@ -248,7 +248,7 @@ impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, t
let req_obj = paypal::PaypalAuthUpdateRequest::try_from(req)?;
let paypal_req = types::RequestBody::log_and_get_request_body(
&req_obj,
- utils::Encode::<paypal::PaypalAuthUpdateRequest>::encode_to_string_of_json,
+ utils::Encode::<paypal::PaypalAuthUpdateRequest>::url_encode,
)
.change_context(errors::ConnectorError::RequestEncodingFailed)?;
diff --git a/crates/router/src/connector/payu.rs b/crates/router/src/connector/payu.rs
index 959dcd5939..0875fe29b4 100644
--- a/crates/router/src/connector/payu.rs
+++ b/crates/router/src/connector/payu.rs
@@ -225,7 +225,7 @@ impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, t
let req_obj = payu::PayuAuthUpdateRequest::try_from(req)?;
let payu_req = types::RequestBody::log_and_get_request_body(
&req_obj,
- utils::Encode::<payu::PayuAuthUpdateRequest>::encode_to_string_of_json,
+ utils::Encode::<payu::PayuAuthUpdateRequest>::url_encode,
)
.change_context(errors::ConnectorError::RequestEncodingFailed)?;