Skip to content

Commit 816564b

Browse files
committed
add log for certification
1 parent c9d380b commit 816564b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
274274
event_builder: Option<&mut ConnectorEvent>,
275275
res: Response,
276276
) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
277+
// For certification purposes, to be removed later
278+
router_env::logger::info!(raw_connector_response=?res.response);
277279
let response: worldpayvantiv::CnpOnlineResponse =
278280
connector_utils::deserialize_xml_to_struct(&res.response)?;
279281
event_builder.map(|i| i.set_response_body(&response));

crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ pub struct Sale {
192192
pub id: String,
193193
#[serde(rename = "@reportGroup")]
194194
pub report_group: String,
195+
#[serde(skip_serializing_if = "Option::is_none")]
195196
#[serde(rename = "@customerId")]
196197
pub customer_id: Option<String>,
197198
pub order_id: String,
@@ -212,6 +213,7 @@ pub struct RefundRequest {
212213
pub report_group: String,
213214
#[serde(rename = "@id")]
214215
pub id: String,
216+
#[serde(skip_serializing_if = "Option::is_none")]
215217
#[serde(rename = "@customerId")]
216218
pub customer_id: Option<String>,
217219
pub cnp_txn_id: String,
@@ -695,6 +697,7 @@ pub struct CaptureResponse {
695697
pub id: String,
696698
#[serde(rename = "@reportGroup")]
697699
pub report_group: String,
700+
#[serde(skip_serializing_if = "Option::is_none")]
698701
#[serde(rename = "@customerId")]
699702
pub customer_id: Option<String>,
700703
#[serde(rename = "cnpTxnId")]
@@ -719,6 +722,7 @@ pub struct PaymentResponse {
719722
pub id: String,
720723
#[serde(rename = "@reportGroup")]
721724
pub report_group: String,
725+
#[serde(skip_serializing_if = "Option::is_none")]
722726
#[serde(rename = "@customerId")]
723727
pub customer_id: Option<String>,
724728
pub cnp_txn_id: String,
@@ -738,6 +742,7 @@ pub struct AuthReversalResponse {
738742
pub id: String,
739743
#[serde(rename = "@reportGroup")]
740744
pub report_group: String,
745+
#[serde(skip_serializing_if = "Option::is_none")]
741746
#[serde(rename = "@customerId")]
742747
pub customer_id: Option<String>,
743748
pub cnp_txn_id: String,

0 commit comments

Comments
 (0)