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(connectors): [worldpayvantiv] change endpoint, add billing address and fix 5xx incase of psync (#8354)
AkshayaFoiger5f7055fc8c0d
diff --git a/config/config.example.toml b/config/config.example.tomlindex 083a1724bc..84f423714a 100644--- a/config/config.example.toml+++ b/config/config.example.toml@@ -297,7 +297,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"wise.base_url = "https://api.sandbox.transferwise.tech/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"zsl.base_url = "https://api.sitoffalb.net/"diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.tomlindex 601cad2446..492de9d9a8 100644--- a/config/deployments/integration_test.toml+++ b/config/deployments/integration_test.toml@@ -132,7 +132,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"wise.base_url = "https://api.sandbox.transferwise.tech/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"zen.base_url = "https://api.zen-test.com/"diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex f9b884489b..368e388db6 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -136,7 +136,7 @@ wellsfargopayout.base_url = "https://api.wellsfargo.com/"wise.base_url = "https://api.wise.com/"worldline.base_url = "https://eu.api-ingenico.com/"worldpay.base_url = "https://access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivcnp.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivcnp.com/vap/communicator/online"worldpayxml.base_url = "https://secure.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"zen.base_url = "https://api.zen.com/"diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.tomlindex 6e361b0b2f..bb8e48868f 100644--- a/config/deployments/sandbox.toml+++ b/config/deployments/sandbox.toml@@ -136,7 +136,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"wise.base_url = "https://api.sandbox.transferwise.tech/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"zen.base_url = "https://api.zen-test.com/"diff --git a/config/development.toml b/config/development.tomlindex c5e56a1b3a..49228eb25d 100644--- a/config/development.toml+++ b/config/development.toml@@ -321,7 +321,7 @@ stripe.base_url_file_upload = "https://files.stripe.com/"wise.base_url = "https://api.sandbox.transferwise.tech/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"trustpay.base_url = "https://test-tpgw.trustpay.eu/"diff --git a/config/docker_compose.toml b/config/docker_compose.tomlindex ab334751a7..06211cd2db 100644--- a/config/docker_compose.toml+++ b/config/docker_compose.toml@@ -223,7 +223,7 @@ wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"wise.base_url = "https://api.sandbox.transferwise.tech/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"zen.base_url = "https://api.zen-test.com/"diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rsindex 5e80093332..80e2361b32 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs@@ -150,6 +150,18 @@ pub struct Capture {pub amount: MinorUnit,}+#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct BillToAddressData {+ pub name: Secret<String>,+ pub address_line1: Option<Secret<String>>,+ pub city: Option<String>,+ pub state: Option<Secret<String>>,+ pub zip: Option<Secret<String>>,+ pub email: Option<common_utils::pii::Email>,+ pub phone: Option<Secret<String>>,+}+#[derive(Debug, Serialize)]#[serde(rename_all = "camelCase")]pub struct Authorization {@@ -157,9 +169,12 @@ pub struct Authorization {pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub order_id: String,pub amount: MinorUnit,pub order_source: OrderSource,+ pub bill_to_address: Option<BillToAddressData>,pub card: WorldpayvantivCardData,}@@ -170,9 +185,12 @@ pub struct Sale {pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub order_id: String,pub amount: MinorUnit,pub order_source: OrderSource,+ pub bill_to_address: Option<BillToAddressData>,pub card: WorldpayvantivCardData,}@@ -183,6 +201,8 @@ pub struct RefundRequest {pub report_group: String,#[serde(rename = "@id")]pub id: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub cnp_txn_id: String,pub amount: MinorUnit,}@@ -194,6 +214,8 @@ pub struct TransactionQuery {pub report_group: String,#[serde(rename = "@id")]pub id: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub orig_cnp_txn_id: String,}@@ -306,6 +328,10 @@ impl TryFrom<&PaymentsSyncRouterData> for CnpOnlineRequest {let query_transaction = Some(TransactionQuery {id: api_call_id,report_group,+ customer_id: item+ .customer_id+ .clone()+ .map(|customer_id| customer_id.get_string_repr().to_string()),orig_cnp_txn_id: item.request.connector_transaction_id@@ -348,190 +374,190 @@ impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsSyncData, Payme.get_connector_transaction_id().change_context(errors::ConnectorError::MissingConnectorTransactionID)?;- match item.response.query_transaction_response {- Some(query_transaction_response) => {+ match item+ .response+ .query_transaction_response+ .and_then(|query_transaction_response| {query_transaction_response.results- .first()- .map(|result| {- if let Some(void_response) = &result.void_response {- let status = get_attempt_status(- WorldpayvantivPaymentFlow::Void,- void_response.response,- )?;- if connector_utils::is_payment_failure(status) {- Ok(Self {- status,- response: Err(ErrorResponse {- code: void_response.response.to_string(),- message: void_response.message.clone(),- reason: Some(void_response.message.clone()),- status_code: item.http_code,- attempt_status: None,- connector_transaction_id: None,- network_advice_code: None,- network_decline_code: None,- network_error_message: None,- }),- ..item.data- })- } else {- Ok(Self {- status,- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(- connector_transaction_id,- ),- redirection_data: Box::new(None),- mandate_reference: Box::new(None),- connector_metadata: None,- network_txn_id: None,- connector_response_reference_id: None,- incremental_authorization_allowed: None,- charges: None,- }),- ..item.data- })- }- } else if let Some(capture_response) = &result.capture_response {- let status = get_attempt_status(- WorldpayvantivPaymentFlow::Capture,- capture_response.response,- )?;- if connector_utils::is_payment_failure(status) {- Ok(Self {- status,- response: Err(ErrorResponse {- code: capture_response.response.to_string(),- message: capture_response.message.clone(),- reason: Some(capture_response.message.clone()),- status_code: item.http_code,- attempt_status: None,- connector_transaction_id: None,- network_advice_code: None,- network_decline_code: None,- network_error_message: None,- }),- ..item.data- })- } else {- Ok(Self {- status,- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(- connector_transaction_id,- ),- redirection_data: Box::new(None),- mandate_reference: Box::new(None),- connector_metadata: None,- network_txn_id: None,- connector_response_reference_id: None,- incremental_authorization_allowed: None,- charges: None,- }),- ..item.data- })- }- } else if let Some(sale_response) = &result.sale_response {- let status = get_attempt_status(- WorldpayvantivPaymentFlow::Sale,- sale_response.response_code,- )?;- if connector_utils::is_payment_failure(status) {- Ok(Self {- status,- response: Err(ErrorResponse {- code: sale_response.response_code.to_string(),- message: sale_response.message.clone(),- reason: Some(sale_response.message.clone()),- status_code: item.http_code,- attempt_status: None,- connector_transaction_id: None,- network_advice_code: None,- network_decline_code: None,- network_error_message: None,- }),- ..item.data- })- } else {- Ok(Self {- status,- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(- connector_transaction_id,- ),- redirection_data: Box::new(None),- mandate_reference: Box::new(None),- connector_metadata: None,- network_txn_id: None,- connector_response_reference_id: None,- incremental_authorization_allowed: None,- charges: None,- }),- ..item.data- })- }- } else if let Some(authorization_response) = &result.authorization_response- {- let status = get_attempt_status(- WorldpayvantivPaymentFlow::Auth,- authorization_response.response_code,- )?;- if connector_utils::is_payment_failure(status) {- Ok(Self {- status,- response: Err(ErrorResponse {- code: authorization_response.response_code.to_string(),- message: authorization_response.message.clone(),- reason: Some(authorization_response.message.clone()),- status_code: item.http_code,- attempt_status: None,- connector_transaction_id: None,- network_advice_code: None,- network_decline_code: None,- network_error_message: None,- }),- ..item.data- })- } else {- Ok(Self {- status,- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(- connector_transaction_id,- ),- redirection_data: Box::new(None),- mandate_reference: Box::new(None),- connector_metadata: None,- network_txn_id: None,- connector_response_reference_id: None,- incremental_authorization_allowed: None,- charges: None,- }),- ..item.data- })- }- } else {- // In case of Psync failure- Ok(Self {- status: item.data.status,- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(- connector_transaction_id,- ),- redirection_data: Box::new(None),- mandate_reference: Box::new(None),- connector_metadata: None,- network_txn_id: None,- connector_response_reference_id: None,- incremental_authorization_allowed: None,- charges: None,- }),- ..item.data- })- }+ .and_then(|query_response| query_response.first().cloned())+ }) {+ Some(result) => {+ if let Some(void_response) = &result.void_response {+ let status = get_attempt_status(+ WorldpayvantivPaymentFlow::Void,+ void_response.response,+ )?;+ if connector_utils::is_payment_failure(status) {+ Ok(Self {+ status,+ response: Err(ErrorResponse {+ code: void_response.response.to_string(),+ message: void_response.message.clone(),+ reason: Some(void_response.message.clone()),+ status_code: item.http_code,+ attempt_status: None,+ connector_transaction_id: None,+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(+ connector_transaction_id,+ ),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata: None,+ network_txn_id: None,+ connector_response_reference_id: None,+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ } else if let Some(capture_response) = &result.capture_response {+ let status = get_attempt_status(+ WorldpayvantivPaymentFlow::Capture,+ capture_response.response,+ )?;+ if connector_utils::is_payment_failure(status) {+ Ok(Self {+ status,+ response: Err(ErrorResponse {+ code: capture_response.response.to_string(),+ message: capture_response.message.clone(),+ reason: Some(capture_response.message.clone()),+ status_code: item.http_code,+ attempt_status: None,+ connector_transaction_id: None,+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(+ connector_transaction_id,+ ),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata: None,+ network_txn_id: None,+ connector_response_reference_id: None,+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ } else if let Some(sale_response) = &result.sale_response {+ let status = get_attempt_status(+ WorldpayvantivPaymentFlow::Sale,+ sale_response.response_code,+ )?;+ if connector_utils::is_payment_failure(status) {+ Ok(Self {+ status,+ response: Err(ErrorResponse {+ code: sale_response.response_code.to_string(),+ message: sale_response.message.clone(),+ reason: Some(sale_response.message.clone()),+ status_code: item.http_code,+ attempt_status: None,+ connector_transaction_id: None,+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(+ connector_transaction_id,+ ),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata: None,+ network_txn_id: None,+ connector_response_reference_id: None,+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ } else if let Some(authorization_response) = &result.authorization_response {+ let status = get_attempt_status(+ WorldpayvantivPaymentFlow::Auth,+ authorization_response.response_code,+ )?;+ if connector_utils::is_payment_failure(status) {+ Ok(Self {+ status,+ response: Err(ErrorResponse {+ code: authorization_response.response_code.to_string(),+ message: authorization_response.message.clone(),+ reason: Some(authorization_response.message.clone()),+ status_code: item.http_code,+ attempt_status: None,+ connector_transaction_id: None,+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(+ connector_transaction_id,+ ),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata: None,+ network_txn_id: None,+ connector_response_reference_id: None,+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ } else {+ // In case of Psync failure+ Ok(Self {+ status: item.data.status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(+ connector_transaction_id,+ ),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata: None,+ network_txn_id: None,+ connector_response_reference_id: None,+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data})- .ok_or(errors::ConnectorError::ResponseHandlingFailed)?+ }}None => {// In case of 2xx Psync failure@@ -554,6 +580,24 @@ impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsSyncData, Payme}}+fn get_bill_to_address(item: &PaymentsAuthorizeRouterData) -> Option<BillToAddressData> {+ let billing_address = item.get_optional_billing();+ billing_address.and_then(|billing_address| {+ billing_address.address.clone().and_then(|address| {+ let full_name = address.get_optional_full_name();+ full_name.map(|name| BillToAddressData {+ name,+ address_line1: item.get_optional_billing_line1(),+ city: item.get_optional_billing_city(),+ state: item.get_optional_billing_state(),+ zip: item.get_optional_billing_zip(),+ email: item.get_optional_billing_email(),+ phone: item.get_optional_billing_phone_number(),+ })+ })+ })+}+impl TryFrom<&WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>> for CnpOnlineRequest {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(@@ -606,15 +650,24 @@ impl TryFrom<&WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>> for CnpOnlformat!("auth_{:?}", connector_utils::generate_12_digit_number())};+ let customer_id = item+ .router_data+ .customer_id+ .clone()+ .map(|customer_id| customer_id.get_string_repr().to_string());+ let bill_to_address = get_bill_to_address(item.router_data);+let (authorization, sale) = if item.router_data.request.is_auto_capture()? {(None,Some(Sale {id: api_call_id.clone(),report_group: report_group.clone(),+ customer_id,order_id: item.router_data.payment_id.clone(),amount: item.amount,order_source: OrderSource::Ecommerce,+ bill_to_address,card: card.clone(),}),)@@ -623,9 +676,11 @@ impl TryFrom<&WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>> for CnpOnlSome(Authorization {id: api_call_id.clone(),report_group: report_group.clone(),+ customer_id,order_id: item.router_data.payment_id.clone(),amount: item.amount,order_source: OrderSource::Ecommerce,+ bill_to_address,card: card.clone(),}),None,@@ -705,10 +760,17 @@ impl<F> TryFrom<&WorldpayvantivRouterData<&RefundsRouterData<F>>> for CnpOnlineR),)?;+ let customer_id = item+ .router_data+ .customer_id+ .clone()+ .map(|customer_id| customer_id.get_string_repr().to_string());+let api_call_id = format!("ref_{:?}", connector_utils::generate_12_digit_number());let credit = Some(RefundRequest {id: api_call_id,report_group,+ customer_id,cnp_txn_id: item.router_data.request.connector_transaction_id.clone(),amount: item.amount,});@@ -745,10 +807,16 @@ impl TryFrom<&RefundSyncRouterData> for CnpOnlineRequest {"Failed to obtain report_group from metadata".to_string(),),)?;+ let customer_id = item+ .customer_id+ .clone()+ .map(|customer_id| customer_id.get_string_repr().to_string());+let api_call_id = format!("rsync_{:?}", connector_utils::generate_12_digit_number());let query_transaction = Some(TransactionQuery {id: api_call_id,report_group,+ customer_id,orig_cnp_txn_id: item.request.get_connector_refund_id()?,});@@ -790,71 +858,85 @@ pub struct CnpOnlineResponse {pub query_transaction_response: Option<QueryTransactionResponse>,}-#[derive(Debug, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct CaptureResponse {#[serde(rename = "@id")]pub id: String,-#[serde(rename = "@reportGroup")]pub report_group: String,-+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,#[serde(rename = "cnpTxnId")]pub cnp_txn_id: String,-pub response: WorldpayvantivResponseCode,-pub response_time: String,-pub message: String,+ pub location: Option<String>,}-#[derive(Debug, Serialize, Deserialize, PartialEq)]+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]+#[serde(rename_all = "camelCase")]+pub struct FraudResult {+ pub avs_result: String,+ pub card_validation_result: String,+}++#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]#[serde(rename_all = "camelCase")]pub struct AuthorizationResponse {#[serde(rename = "@id")]pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub cnp_txn_id: String,pub order_id: String,#[serde(rename = "response")]pub response_code: WorldpayvantivResponseCode,pub message: String,pub response_time: String,- pub auth_code: Secret<String>,- pub network_transaction_id: Secret<String>,+ pub auth_code: Option<Secret<String>>,+ pub fraud_result: Option<FraudResult>,+ pub network_transaction_id: Option<Secret<String>>,}-#[derive(Debug, Serialize, Deserialize, PartialEq)]+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]#[serde(rename_all = "camelCase")]pub struct SaleResponse {#[serde(rename = "@id")]pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub cnp_txn_id: String,pub order_id: String,#[serde(rename = "response")]pub response_code: WorldpayvantivResponseCode,pub message: String,pub response_time: String,- pub auth_code: Secret<String>,- pub network_transaction_id: Secret<String>,+ pub auth_code: Option<Secret<String>>,+ pub fraud_result: Option<FraudResult>,+ pub network_transaction_id: Option<Secret<String>>,}-#[derive(Debug, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct VoidResponse {#[serde(rename = "@id")]pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub cnp_txn_id: String,pub response: WorldpayvantivResponseCode,pub response_time: String,pub post_date: String,pub message: String,+ pub location: Option<String>,}#[derive(Debug, Serialize, Deserialize)]@@ -864,16 +946,18 @@ pub struct QueryTransactionResponse {pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub response: WorldpayvantivResponseCode,pub response_time: String,pub message: String,pub match_count: u32,#[serde(rename = "results_max10")]- pub results: Vec<ResultsMax10>,+ pub results: Option<Vec<ResultsMax10>>,pub location: String,}-#[derive(Debug, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize)]pub struct ResultsMax10 {pub authorization_response: Option<AuthorizationResponse>,pub sale_response: Option<SaleResponse>,@@ -882,21 +966,26 @@ pub struct ResultsMax10 {pub credit_response: Option<CreditResponse>,}-#[derive(Debug, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct CreditResponse {#[serde(rename = "@id")]pub id: String,#[serde(rename = "@reportGroup")]pub report_group: String,+ #[serde(rename = "@customerId")]+ pub customer_id: Option<String>,pub cnp_txn_id: String,pub response: WorldpayvantivResponseCode,pub response_time: String,pub message: String,+ pub location: Option<String>,}impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsCaptureData, PaymentsResponseData>>for RouterData<F, PaymentsCaptureData, PaymentsResponseData>+where+ F: Send,{type Error = error_stack::Report<errors::ConnectorError>;fn try_from(@@ -1235,12 +1324,15 @@ impl TryFrom<RefundsResponseRouterData<RSync, CnpOnlineResponse>> for RefundsRoufn try_from(item: RefundsResponseRouterData<RSync, CnpOnlineResponse>,) -> Result<Self, Self::Error> {- match item.response.query_transaction_response {- Some(query_transaction_response) => {- let results = query_transaction_response+ match item+ .response+ .query_transaction_response+ .and_then(|query_transaction_response| {+ query_transaction_response.results- .first()- .ok_or(errors::ConnectorError::ResponseHandlingFailed)?;+ .and_then(|results| results.first().cloned())+ }) {+ Some(results) => {if let Some(refund_response) = &results.credit_response {let refund_status = get_refund_status(refund_response.response)?;if connector_utils::is_refund_failure(refund_status) {diff --git a/loadtest/config/development.toml b/loadtest/config/development.tomlindex 160e6490ef..99655bacaf 100644--- a/loadtest/config/development.toml+++ b/loadtest/config/development.toml@@ -189,7 +189,7 @@ wellsfargo.base_url = "https://apitest.cybersource.com/"wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"worldline.base_url = "https://eu.sandbox.api-ingenico.com/"worldpay.base_url = "https://try.access.worldpay.com/"-worldpayvantiv.base_url = "https://payments.vantivprelive.com/vap/communicator/online"+worldpayvantiv.base_url = "https://transact.vantivprelive.com/vap/communicator/online"worldpayxml.base_url = "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"xendit.base_url = "https://api.xendit.co"wise.base_url = "https://api.sandbox.transferwise.tech/"