fix(connector): [TrustPay] change the request encoding (#1530)

This commit is contained in:
SamraatBansal
2023-06-23 18:38:08 +05:30
committed by GitHub
parent ff17b62dc2
commit 692d370497

View File

@ -202,7 +202,7 @@ impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, t
let connector_req = trustpay::TrustpayAuthUpdateRequest::try_from(req)?; let connector_req = trustpay::TrustpayAuthUpdateRequest::try_from(req)?;
let trustpay_req = types::RequestBody::log_and_get_request_body( let trustpay_req = types::RequestBody::log_and_get_request_body(
&connector_req, &connector_req,
utils::Encode::<trustpay::TrustpayAuthUpdateRequest>::encode_to_string_of_json, utils::Encode::<trustpay::TrustpayAuthUpdateRequest>::url_encode,
) )
.change_context(errors::ConnectorError::RequestEncodingFailed)?; .change_context(errors::ConnectorError::RequestEncodingFailed)?;
Ok(Some(trustpay_req)) Ok(Some(trustpay_req))
@ -513,7 +513,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
} }
_ => types::RequestBody::log_and_get_request_body( _ => types::RequestBody::log_and_get_request_body(
&connector_req, &connector_req,
utils::Encode::<trustpay::PaymentRequestCards>::encode_to_string_of_json, utils::Encode::<trustpay::PaymentRequestCards>::url_encode,
) )
.change_context(errors::ConnectorError::RequestEncodingFailed)?, .change_context(errors::ConnectorError::RequestEncodingFailed)?,
}; };
@ -617,7 +617,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
_ => _ =>
types::RequestBody::log_and_get_request_body( types::RequestBody::log_and_get_request_body(
&connector_req, &connector_req,
utils::Encode::<trustpay::TrustpayRefundRequestCards>::encode_to_string_of_json, utils::Encode::<trustpay::TrustpayRefundRequestCards>::url_encode,
) )
.change_context(errors::ConnectorError::RequestEncodingFailed)?, .change_context(errors::ConnectorError::RequestEncodingFailed)?,
}; };