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
feat(connectors): [Worldpayvantiv] add card support (#8219)
AkshayaFoigerf5c4f6106f6e
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.jsonindex e3b41ce389..26cde7c6c2 100644--- a/api-reference-v2/openapi_spec.json+++ b/api-reference-v2/openapi_spec.json@@ -8157,6 +8157,7 @@"wise","worldline","worldpay",+ "worldpayvantiv","worldpayxml","signifyd","plaid",@@ -22091,6 +22092,7 @@"wise","worldline","worldpay",+ "worldpayvantiv","worldpayxml","xendit","zen",diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.jsonindex 518e9123f2..bf997d7fed 100644--- a/api-reference/openapi_spec.json+++ b/api-reference/openapi_spec.json@@ -10020,6 +10020,7 @@"wise","worldline","worldpay",+ "worldpayvantiv","worldpayxml","signifyd","plaid",@@ -26135,6 +26136,7 @@"wise","worldline","worldpay",+ "worldpayvantiv","worldpayxml","xendit","zen",diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.tomlindex 593415b3c4..812dca1275 100644--- a/config/deployments/integration_test.toml+++ b/config/deployments/integration_test.toml@@ -562,6 +562,10 @@ apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,Ddebit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,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,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" }+[pm_filters.zen]boleto = { country = "BR", currency = "BRL" }efecty = { country = "CO", currency = "COP" }diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex c64ec0034a..72ca305629 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -578,6 +578,10 @@ debit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,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Y,ZMW,ZWL" }+[pm_filters.zen]boleto = { country = "BR", currency = "BRL" }efecty = { country = "CO", currency = "COP" }diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.tomlindex 7de9575d56..f0229e1e73 100644--- a/config/deployments/sandbox.toml+++ b/config/deployments/sandbox.toml@@ -585,6 +585,10 @@ apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,Ddebit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD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OK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" }+[pm_filters.zen]boleto = { country = "BR", currency = "BRL" }efecty = { country = "CO", currency = "COP" }diff --git a/config/development.toml b/config/development.tomlindex 910426e964..c686a93994 100644--- a/config/development.toml+++ b/config/development.toml@@ -756,6 +756,11 @@ apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,Ddebit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,G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F,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" }+[file_upload_config]bucket_name = ""region = ""diff --git a/config/docker_compose.toml b/config/docker_compose.tomlindex f2ac842c08..f217c2df4a 100644--- a/config/docker_compose.toml+++ b/config/docker_compose.toml@@ -707,6 +707,11 @@ apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,Ddebit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD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ZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" }+[pm_filters.fiuu]duit_now = { country = "MY", currency = "MYR" }apple_pay = { country = "MY", currency = "MYR" }diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rsindex 6e2a9904ed..147e2111f1 100644--- a/crates/common_enums/src/connector_enums.rs+++ b/crates/common_enums/src/connector_enums.rs@@ -151,7 +151,7 @@ pub enum RoutableConnectors {Wise,Worldline,Worldpay,- // Worldpayvantiv,+ Worldpayvantiv,Worldpayxml,Xendit,Zen,@@ -308,7 +308,7 @@ pub enum Connector {Wise,Worldline,Worldpay,- // Worldpayvantiv,+ Worldpayvantiv,Worldpayxml,Signifyd,Plaid,@@ -471,7 +471,7 @@ impl Connector {| Self::Wise| Self::Worldline| Self::Worldpay- // | Self::Worldpayvantiv+ | Self::Worldpayvantiv| Self::Worldpayxml| Self::Xendit| Self::Zen@@ -627,7 +627,7 @@ impl From<RoutableConnectors> for Connector {RoutableConnectors::Wise => Self::Wise,RoutableConnectors::Worldline => Self::Worldline,RoutableConnectors::Worldpay => Self::Worldpay,- // RoutableConnectors::Worldpayvantiv => Self::Worldpayvantiv,+ RoutableConnectors::Worldpayvantiv => Self::Worldpayvantiv,RoutableConnectors::Worldpayxml => Self::Worldpayxml,RoutableConnectors::Zen => Self::Zen,RoutableConnectors::Plaid => Self::Plaid,@@ -741,7 +741,7 @@ impl TryFrom<Connector> for RoutableConnectors {Connector::Wise => Ok(Self::Wise),Connector::Worldline => Ok(Self::Worldline),Connector::Worldpay => Ok(Self::Worldpay),- // Connector::Worldpayvantiv => Ok(Self::Worldpayvantiv),+ Connector::Worldpayvantiv => Ok(Self::Worldpayvantiv),Connector::Worldpayxml => Ok(Self::Worldpayxml),Connector::Xendit => Ok(Self::Xendit),Connector::Zen => Ok(Self::Zen),diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rsindex 731cd24517..93e4e455d1 100644--- a/crates/connector_configs/src/connector.rs+++ b/crates/connector_configs/src/connector.rs@@ -444,7 +444,7 @@ impl ConnectorConfig {Connector::Wise => Err("Use get_payout_connector_config".to_string()),Connector::Worldline => Ok(connector_data.worldline),Connector::Worldpay => Ok(connector_data.worldpay),- // Connector::Worldpayvantiv => Ok(connector_data.worldpayvantiv),+ Connector::Worldpayvantiv => Ok(connector_data.worldpayvantiv),Connector::Worldpayxml => Ok(connector_data.worldpayxml),Connector::Zen => Ok(connector_data.zen),Connector::Zsl => Ok(connector_data.zsl),diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.tomlindex 5c7f780818..884f9aca6b 100644--- a/crates/connector_configs/toml/development.toml+++ b/crates/connector_configs/toml/development.toml@@ -6015,4 +6015,50 @@ type = "Text"[worldpayxml.connector_auth.SignatureKey]api_secret="Merchant Code"api_key="API Username"-key1="API Password"\ No newline at end of file+key1="API Password"++[worldpayvantiv]+[[worldpayvantiv.credit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.credit]]+ payment_method_type = "Visa"+[[worldpayvantiv.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.credit]]+ payment_method_type = "JCB"+[[worldpayvantiv.credit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.credit]]+ payment_method_type = "Discover"+[[worldpayvantiv.debit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.debit]]+ payment_method_type = "Visa"+[[worldpayvantiv.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.debit]]+ payment_method_type = "JCB"+[[worldpayvantiv.debit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.debit]]+ payment_method_type = "Discover"++[worldpayvantiv.connector_auth.SignatureKey]+api_key="Username"+api_secret="Password"+key1="Merchant ID"++[worldpayvantiv.metadata.report_group]+name="report_group"+label="Default Report Group"+placeholder="Enter Default Report Group"+required=true+type="Text"++[worldpayvantiv.metadata.merchant_config_currency]+name="merchant_config_currency"+label="Currency"+placeholder="Enter Currency"+required=true+type="Select"+options=[]\ No newline at end of filediff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.tomlindex 85598589ba..a070ce95be 100644--- a/crates/connector_configs/toml/production.toml+++ b/crates/connector_configs/toml/production.toml@@ -4591,4 +4591,50 @@ type = "Text"[worldpayxml.connector_auth.SignatureKey]api_secret="Merchant Code"api_key="API Username"-key1="API Password"\ No newline at end of file+key1="API Password"+++[worldpayvantiv]+[[worldpayvantiv.credit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.credit]]+ payment_method_type = "Visa"+[[worldpayvantiv.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.credit]]+ payment_method_type = "JCB"+[[worldpayvantiv.credit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.credit]]+ payment_method_type = "Discover"+[[worldpayvantiv.debit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.debit]]+ payment_method_type = "Visa"+[[worldpayvantiv.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.debit]]+ payment_method_type = "JCB"+[[worldpayvantiv.debit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.debit]]+ payment_method_type = "Discover"++[worldpayvantiv.connector_auth.SignatureKey]+api_key="Username"+api_secret="Password"+key1="Merchant ID"+[worldpayvantiv.metadata.report_group]+name="report_group"+label="Default Report Group"+placeholder="Enter Default Report Group"+required=true+type="Text"++[worldpayvantiv.metadata.merchant_config_currency]+name="merchant_config_currency"+label="Currency"+placeholder="Enter Currency"+required=true+type="Select"+options=[]\ No newline at end of filediff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.tomlindex af8a19c8be..83110fd91a 100644--- a/crates/connector_configs/toml/sandbox.toml+++ b/crates/connector_configs/toml/sandbox.toml@@ -5988,4 +5988,50 @@ type = "Text"[worldpayxml.connector_auth.SignatureKey]api_secret="Merchant Code"api_key="API Username"-key1="API Password"\ No newline at end of file+key1="API Password"++[worldpayvantiv]+[[worldpayvantiv.credit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.credit]]+ payment_method_type = "Visa"+[[worldpayvantiv.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.credit]]+ payment_method_type = "JCB"+[[worldpayvantiv.credit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.credit]]+ payment_method_type = "Discover"+[[worldpayvantiv.debit]]+ payment_method_type = "Mastercard"+[[worldpayvantiv.debit]]+ payment_method_type = "Visa"+[[worldpayvantiv.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayvantiv.debit]]+ payment_method_type = "JCB"+[[worldpayvantiv.debit]]+ payment_method_type = "DinersClub"+[[worldpayvantiv.debit]]+ payment_method_type = "Discover"++[worldpayvantiv.connector_auth.SignatureKey]+api_key="Username"+api_secret="Password"+key1="Merchant ID"++[worldpayvantiv.metadata.report_group]+name="report_group"+label="Default Report Group"+placeholder="Enter Default Report Group"+required=true+type="Text"++[worldpayvantiv.metadata.merchant_config_currency]+name="merchant_config_currency"+label="Currency"+placeholder="Enter Currency"+required=true+type="Select"+options=[]\ No newline at end of filediff --git a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rsindex 24dd76b730..0cd1f236e5 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs@@ -1,14 +1,15 @@pub mod transformers;+use std::sync::LazyLock;+use common_utils::{errors::CustomResult,- ext_traits::BytesExt,request::{Method, Request, RequestBuilder, RequestContent},- types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector},+ types::{AmountConvertor, MinorUnit, MinorUnitForConnector},};-use error_stack::{report, ResultExt};+use error_stack::report;use hyperswitch_domain_models::{- router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},+ router_data::{AccessToken, ErrorResponse, RouterData},router_flow_types::{access_token_auth::AccessTokenAuth,payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},@@ -19,10 +20,13 @@ use hyperswitch_domain_models::{PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,RefundsData, SetupMandateRequestData,},- router_response_types::{PaymentsResponseData, RefundsResponseData},+ router_response_types::{+ ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData,+ SupportedPaymentMethods, SupportedPaymentMethodsExt,+ },types::{- PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,- RefundSyncRouterData, RefundsRouterData,+ PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,+ PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,},};use hyperswitch_interfaces::{@@ -36,20 +40,19 @@ use hyperswitch_interfaces::{types::{self, Response},webhooks,};-use masking::{ExposeInterface, Mask};use transformers as worldpayvantiv;-use crate::{constants::headers, types::ResponseRouterData, utils};+use crate::{constants::headers, types::ResponseRouterData, utils as connector_utils};#[derive(Clone)]pub struct Worldpayvantiv {- amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),+ amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),}impl Worldpayvantiv {pub fn new() -> &'static Self {&Self {- amount_converter: &StringMinorUnitForConnector,+ amount_converter: &MinorUnitForConnector,}}}@@ -79,15 +82,13 @@ where{fn build_headers(&self,- req: &RouterData<Flow, Request, Response>,+ _req: &RouterData<Flow, Request, Response>,_connectors: &Connectors,) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {- let mut header = vec![(+ let header = vec![(headers::CONTENT_TYPE.to_string(),self.get_content_type().to_string().into(),)];- let mut api_key = self.get_auth_header(&req.connector_auth_type)?;- header.append(&mut api_key);Ok(header)}}@@ -102,49 +103,43 @@ impl ConnectorCommon for Worldpayvantiv {}fn common_get_content_type(&self) -> &'static str {- "application/json"+ "text/xml"}fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {connectors.worldpayvantiv.base_url.as_ref()}- fn get_auth_header(- &self,- auth_type: &ConnectorAuthType,- ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {- let auth = worldpayvantiv::WorldpayvantivAuthType::try_from(auth_type)- .change_context(errors::ConnectorError::FailedToObtainAuthType)?;- Ok(vec![(- headers::AUTHORIZATION.to_string(),- auth.api_key.expose().into_masked(),- )])- }-fn build_error_response(&self,res: Response,event_builder: Option<&mut ConnectorEvent>,) -> CustomResult<ErrorResponse, errors::ConnectorError> {- let response: worldpayvantiv::WorldpayvantivErrorResponse = res- .response- .parse_struct("WorldpayvantivErrorResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;-- event_builder.map(|i| i.set_response_body(&response));- router_env::logger::info!(connector_response=?response);-- Ok(ErrorResponse {- status_code: res.status_code,- code: response.code,- message: response.message,- reason: response.reason,- attempt_status: None,- connector_transaction_id: None,- network_decline_code: None,- network_advice_code: None,- network_error_message: None,- })+ let response: Result<worldpayvantiv::CnpOnlineResponse, _> =+ connector_utils::deserialize_xml_to_struct(&res.response);++ match response {+ Ok(response_data) => {+ event_builder.map(|i| i.set_response_body(&response_data));+ router_env::logger::info!(connector_response=?response_data);+ Ok(ErrorResponse {+ status_code: res.status_code,+ code: response_data.response_code,+ message: response_data.message.clone(),+ reason: Some(response_data.message.clone()),+ attempt_status: None,+ connector_transaction_id: None,+ network_decline_code: None,+ network_advice_code: None,+ network_error_message: None,+ })+ }+ Err(error_msg) => {+ event_builder.map(|event| event.set_error(serde_json::json!({"error": res.response.escape_ascii().to_string(), "status_code": res.status_code})));+ router_env::logger::error!(deserialization_error =? error_msg);+ connector_utils::handle_json_response_deserialization_failure(res, "worldpayvantiv")+ }+ }}}@@ -161,6 +156,16 @@ impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken>impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>for Worldpayvantiv{+ fn build_request(+ &self,+ _req: &RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>,+ _connectors: &Connectors,+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {+ Err(errors::ConnectorError::NotImplemented(+ "Setup Mandate flow for Worldpayvantiv".to_string(),+ )+ .into())+ }}impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData>@@ -181,9 +186,9 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseDatafn get_url(&self,_req: &PaymentsAuthorizeRouterData,- _connectors: &Connectors,+ connectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())+ Ok(self.base_url(connectors).to_owned())}fn get_request_body(@@ -191,16 +196,26 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseDatareq: &PaymentsAuthorizeRouterData,_connectors: &Connectors,) -> CustomResult<RequestContent, errors::ConnectorError> {- let amount = utils::convert_amount(+ let amount = connector_utils::convert_amount(self.amount_converter,req.request.minor_amount,req.request.currency,)?;let connector_router_data = worldpayvantiv::WorldpayvantivRouterData::from((amount, req));- let connector_req =- worldpayvantiv::WorldpayvantivPaymentsRequest::try_from(&connector_router_data)?;- Ok(RequestContent::Json(Box::new(connector_req)))+ let connector_req_object =+ worldpayvantiv::CnpOnlineRequest::try_from(&connector_router_data)?;++ router_env::logger::info!(raw_connector_request=?connector_req_object);+ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;++ Ok(RequestContent::RawBytes(connector_req))}fn build_request(@@ -231,10 +246,8 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseDataevent_builder: Option<&mut ConnectorEvent>,res: Response,) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {- let response: worldpayvantiv::WorldpayvantivPaymentsResponse = res- .response- .parse_struct("Worldpayvantiv PaymentsAuthorizeResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;event_builder.map(|i| i.set_response_body(&response));router_env::logger::info!(connector_response=?response);RouterData::try_from(ResponseRouterData {@@ -269,9 +282,26 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Worfn get_url(&self,_req: &PaymentsSyncRouterData,- _connectors: &Connectors,+ connectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())+ Ok(self.base_url(connectors).to_owned())+ }++ fn get_request_body(+ &self,+ req: &PaymentsSyncRouterData,+ _connectors: &Connectors,+ ) -> CustomResult<RequestContent, errors::ConnectorError> {+ let connector_req_object = worldpayvantiv::CnpOnlineRequest::try_from(req)?;+ router_env::logger::info!(raw_connector_request=?connector_req_object);+ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;+ Ok(RequestContent::RawBytes(connector_req))}fn build_request(@@ -281,10 +311,13 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Wor) -> CustomResult<Option<Request>, errors::ConnectorError> {Ok(Some(RequestBuilder::new()- .method(Method::Get)+ .method(Method::Post).url(&types::PaymentsSyncType::get_url(self, req, connectors)?).attach_default_headers().headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)+ .set_body(types::PaymentsSyncType::get_request_body(+ self, req, connectors,+ )?).build(),))}@@ -295,10 +328,8 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Worevent_builder: Option<&mut ConnectorEvent>,res: Response,) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {- let response: worldpayvantiv::WorldpayvantivPaymentsResponse = res- .response- .parse_struct("worldpayvantiv PaymentsSyncResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;event_builder.map(|i| i.set_response_body(&response));router_env::logger::info!(connector_response=?response);RouterData::try_from(ResponseRouterData {@@ -333,17 +364,35 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> fofn get_url(&self,_req: &PaymentsCaptureRouterData,- _connectors: &Connectors,+ connectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())+ Ok(self.base_url(connectors).to_owned())}fn get_request_body(&self,- _req: &PaymentsCaptureRouterData,+ req: &PaymentsCaptureRouterData,_connectors: &Connectors,) -> CustomResult<RequestContent, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into())+ let amount = connector_utils::convert_amount(+ self.amount_converter,+ req.request.minor_amount_to_capture,+ req.request.currency,+ )?;++ let connector_router_data = worldpayvantiv::WorldpayvantivRouterData::from((amount, req));+ let connector_req_object =+ worldpayvantiv::CnpOnlineRequest::try_from(&connector_router_data)?;+ router_env::logger::info!(raw_connector_request=?connector_req_object);+ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;++ Ok(RequestContent::RawBytes(connector_req))}fn build_request(@@ -372,10 +421,8 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> foevent_builder: Option<&mut ConnectorEvent>,res: Response,) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> {- let response: worldpayvantiv::WorldpayvantivPaymentsResponse = res- .response- .parse_struct("Worldpayvantiv PaymentsCaptureResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;event_builder.map(|i| i.set_response_body(&response));router_env::logger::info!(connector_response=?response);RouterData::try_from(ResponseRouterData {@@ -394,7 +441,89 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> fo}}-impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Worldpayvantiv {}+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Worldpayvantiv {+ fn get_headers(+ &self,+ req: &PaymentsCancelRouterData,+ connectors: &Connectors,+ ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {+ self.build_headers(req, connectors)+ }++ fn get_content_type(&self) -> &'static str {+ self.common_get_content_type()+ }++ fn get_url(+ &self,+ _req: &PaymentsCancelRouterData,+ connectors: &Connectors,+ ) -> CustomResult<String, errors::ConnectorError> {+ Ok(self.base_url(connectors).to_owned())+ }++ fn get_request_body(+ &self,+ req: &PaymentsCancelRouterData,+ _connectors: &Connectors,+ ) -> CustomResult<RequestContent, errors::ConnectorError> {+ let connector_req_object = worldpayvantiv::CnpOnlineRequest::try_from(req)?;+ router_env::logger::info!(raw_connector_request=?connector_req_object);++ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;++ Ok(RequestContent::RawBytes(connector_req))+ }++ fn build_request(+ &self,+ req: &PaymentsCancelRouterData,+ connectors: &Connectors,+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {+ Ok(Some(+ RequestBuilder::new()+ .method(Method::Post)+ .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)+ .attach_default_headers()+ .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)+ .set_body(types::PaymentsVoidType::get_request_body(+ self, req, connectors,+ )?)+ .build(),+ ))+ }++ fn handle_response(+ &self,+ data: &PaymentsCancelRouterData,+ event_builder: Option<&mut ConnectorEvent>,+ res: Response,+ ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;+ event_builder.map(|i| i.set_response_body(&response));+ router_env::logger::info!(connector_response=?response);+ RouterData::try_from(ResponseRouterData {+ response,+ data: data.clone(),+ http_code: res.status_code,+ })+ }++ fn get_error_response(+ &self,+ res: Response,+ event_builder: Option<&mut ConnectorEvent>,+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {+ self.build_error_response(res, event_builder)+ }+}impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpayvantiv {fn get_headers(@@ -412,9 +541,9 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpafn get_url(&self,_req: &RefundsRouterData<Execute>,- _connectors: &Connectors,+ connectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())+ Ok(self.base_url(connectors).to_owned())}fn get_request_body(@@ -422,7 +551,7 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpareq: &RefundsRouterData<Execute>,_connectors: &Connectors,) -> CustomResult<RequestContent, errors::ConnectorError> {- let refund_amount = utils::convert_amount(+ let refund_amount = connector_utils::convert_amount(self.amount_converter,req.request.minor_refund_amount,req.request.currency,@@ -430,9 +559,18 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpalet connector_router_data =worldpayvantiv::WorldpayvantivRouterData::from((refund_amount, req));- let connector_req =- worldpayvantiv::WorldpayvantivRefundRequest::try_from(&connector_router_data)?;- Ok(RequestContent::Json(Box::new(connector_req)))+ let connector_req_object =+ worldpayvantiv::CnpOnlineRequest::try_from(&connector_router_data)?;+ router_env::logger::info!(connector_request=?connector_req_object);+ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;++ Ok(RequestContent::RawBytes(connector_req))}fn build_request(@@ -460,10 +598,8 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpaevent_builder: Option<&mut ConnectorEvent>,res: Response,) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {- let response: worldpayvantiv::RefundResponse = res- .response- .parse_struct("worldpayvantiv RefundResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;event_builder.map(|i| i.set_response_body(&response));router_env::logger::info!(connector_response=?response);RouterData::try_from(ResponseRouterData {@@ -498,9 +634,28 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayvfn get_url(&self,_req: &RefundSyncRouterData,- _connectors: &Connectors,+ connectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {- Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())+ Ok(self.base_url(connectors).to_owned())+ }++ fn get_request_body(+ &self,+ req: &RefundSyncRouterData,+ _connectors: &Connectors,+ ) -> CustomResult<RequestContent, errors::ConnectorError> {+ let connector_req_object = worldpayvantiv::CnpOnlineRequest::try_from(req)?;+ router_env::logger::info!(raw_connector_request=?connector_req_object);++ let connector_req = connector_utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayvantiv::worldpayvantiv_constants::XML_VERSION,+ Some(worldpayvantiv::worldpayvantiv_constants::XML_ENCODING),+ None,+ None,+ )?;++ Ok(RequestContent::RawBytes(connector_req))}fn build_request(@@ -510,7 +665,7 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayv) -> CustomResult<Option<Request>, errors::ConnectorError> {Ok(Some(RequestBuilder::new()- .method(Method::Get)+ .method(Method::Post).url(&types::RefundSyncType::get_url(self, req, connectors)?).attach_default_headers().headers(types::RefundSyncType::get_headers(self, req, connectors)?)@@ -527,10 +682,8 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayvevent_builder: Option<&mut ConnectorEvent>,res: Response,) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {- let response: worldpayvantiv::RefundResponse = res- .response- .parse_struct("worldpayvantiv RefundSyncResponse")- .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;+ let response: worldpayvantiv::CnpOnlineResponse =+ connector_utils::deserialize_xml_to_struct(&res.response)?;event_builder.map(|i| i.set_response_body(&response));router_env::logger::info!(connector_response=?response);RouterData::try_from(ResponseRouterData {@@ -573,4 +726,83 @@ impl webhooks::IncomingWebhook for Worldpayvantiv {}}-impl ConnectorSpecifications for Worldpayvantiv {}+static WORLDPAYVANTIV_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =+ LazyLock::new(|| {+ let supported_capture_methods = vec![+ common_enums::CaptureMethod::Automatic,+ common_enums::CaptureMethod::Manual,+ common_enums::CaptureMethod::SequentialAutomatic,+ ];++ let supported_card_network = vec![+ common_enums::CardNetwork::AmericanExpress,+ common_enums::CardNetwork::DinersClub,+ common_enums::CardNetwork::JCB,+ common_enums::CardNetwork::Mastercard,+ common_enums::CardNetwork::Visa,+ common_enums::CardNetwork::Discover,+ ];++ let mut worldpayvantiv_supported_payment_methods = SupportedPaymentMethods::new();++ worldpayvantiv_supported_payment_methods.add(+ common_enums::PaymentMethod::Card,+ common_enums::PaymentMethodType::Credit,+ PaymentMethodDetails {+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::NotSupported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );++ worldpayvantiv_supported_payment_methods.add(+ common_enums::PaymentMethod::Card,+ common_enums::PaymentMethodType::Debit,+ PaymentMethodDetails {+ mandates: common_enums::FeatureStatus::NotSupported,+ refunds: common_enums::FeatureStatus::Supported,+ supported_capture_methods: supported_capture_methods.clone(),+ specific_features: Some(+ api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({+ api_models::feature_matrix::CardSpecificFeatures {+ three_ds: common_enums::FeatureStatus::NotSupported,+ no_three_ds: common_enums::FeatureStatus::Supported,+ supported_card_networks: supported_card_network.clone(),+ }+ }),+ ),+ },+ );+ worldpayvantiv_supported_payment_methods+ });++static WORLDPAYVANTIV_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {+ display_name: "Worldpay Vantiv",+ description: "Worldpay Vantiv, also known as the Worldpay CNP API, is a robust XML-based interface used to process online (card-not-present) transactions such as e-commerce purchases, subscription billing, and digital payments",+ connector_type: common_enums::PaymentConnectorCategory::PaymentGateway,+};++static WORLDPAYVANTIV_SUPPORTED_WEBHOOK_FLOWS: [common_enums::EventClass; 0] = [];++impl ConnectorSpecifications for Worldpayvantiv {+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {+ Some(&WORLDPAYVANTIV_CONNECTOR_INFO)+ }++ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {+ Some(&*WORLDPAYVANTIV_SUPPORTED_PAYMENT_METHODS)+ }++ fn get_supported_webhook_flows(&self) -> Option<&'static [common_enums::EventClass]> {+ Some(&WORLDPAYVANTIV_SUPPORTED_WEBHOOK_FLOWS)+ }+}diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rsindex fcff68890b..554955ec18 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs@@ -1,12 +1,18 @@-use common_enums::enums;-use common_utils::types::StringMinorUnit;+use common_utils::{ext_traits::Encode, types::MinorUnit};+use error_stack::ResultExt;use hyperswitch_domain_models::{payment_method_data::PaymentMethodData,- router_data::{ConnectorAuthType, RouterData},+ router_data::{ConnectorAuthType, ErrorResponse, RouterData},router_flow_types::refunds::{Execute, RSync},- router_request_types::ResponseId,+ router_request_types::{+ PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSyncData,+ ResponseId,+ },router_response_types::{PaymentsResponseData, RefundsResponseData},- types::{PaymentsAuthorizeRouterData, RefundsRouterData},+ types::{+ PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,+ PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,+ },};use hyperswitch_interfaces::errors;use masking::Secret;@@ -14,18 +20,27 @@ use serde::{Deserialize, Serialize};use crate::{types::{RefundsResponseRouterData, ResponseRouterData},- utils::PaymentsAuthorizeRequestData,+ utils::{+ self as connector_utils, CardData, PaymentsAuthorizeRequestData, RefundsRequestData,+ RouterData as _,+ },};-//TODO: Fill the struct with respective fields+pub mod worldpayvantiv_constants {+ pub const WORLDPAYVANTIV_VERSION: &str = "12.23";+ pub const XML_VERSION: &str = "1.0";+ pub const XML_ENCODING: &str = "UTF-8";+ pub const XMLNS: &str = "http://www.vantivcnp.com/schema";+ pub const MAX_ID_LENGTH: usize = 26;+}+pub struct WorldpayvantivRouterData<T> {- pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.+ pub amount: MinorUnit,pub router_data: T,}-impl<T> From<(StringMinorUnit, T)> for WorldpayvantivRouterData<T> {- fn from((amount, item): (StringMinorUnit, T)) -> Self {- //Todo : use utils to convert the amount to the type of amount that a connector accepts+impl<T> From<(MinorUnit, T)> for WorldpayvantivRouterData<T> {+ fn from((amount, item): (MinorUnit, T)) -> Self {Self {amount,router_data: item,@@ -33,200 +48,2534 @@ impl<T> From<(StringMinorUnit, T)> for WorldpayvantivRouterData<T> {}}-//TODO: Fill the struct with respective fields-#[derive(Default, Debug, Serialize, PartialEq)]-pub struct WorldpayvantivPaymentsRequest {- amount: StringMinorUnit,- card: WorldpayvantivCard,+pub struct WorldpayvantivAuthType {+ pub(super) user: Secret<String>,+ pub(super) password: Secret<String>,+ pub(super) merchant_id: Secret<String>,}-#[derive(Default, Debug, Serialize, Eq, PartialEq)]-pub struct WorldpayvantivCard {- number: cards::CardNumber,- expiry_month: Secret<String>,- expiry_year: Secret<String>,- cvc: Secret<String>,- complete: bool,+impl TryFrom<&ConnectorAuthType> for WorldpayvantivAuthType {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {+ match auth_type {+ ConnectorAuthType::SignatureKey {+ api_key,+ api_secret,+ key1,+ } => Ok(Self {+ user: api_key.to_owned(),+ password: api_secret.to_owned(),+ merchant_id: key1.to_owned(),+ }),+ _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),+ }+ }}-impl TryFrom<&WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>>- for WorldpayvantivPaymentsRequest-{+// Represents the payment metadata for Worldpay Vantiv.+// The `report_group` field is an Option<String> to account for cases where the report group might not be provided in the metadata.+#[derive(Debug, Default, Serialize, Deserialize)]+pub struct WorldpayvantivPaymentMetadata {+ pub report_group: Option<String>,+}++// Represents the merchant connector account metadata for Worldpay Vantiv+#[derive(Debug, Default, Serialize, Deserialize)]+pub struct WorldpayvantivMetadataObject {+ pub report_group: String,+ pub merchant_config_currency: common_enums::Currency,+}++impl TryFrom<&Option<common_utils::pii::SecretSerdeValue>> for WorldpayvantivMetadataObject {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(- item: &WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>,+ meta_data: &Option<common_utils::pii::SecretSerdeValue>,) -> Result<Self, Self::Error> {- match item.router_data.request.payment_method_data.clone() {- PaymentMethodData::Card(req_card) => {- let card = WorldpayvantivCard {- number: req_card.card_number,- expiry_month: req_card.card_exp_month,- expiry_year: req_card.card_exp_year,- cvc: req_card.card_cvc,- complete: item.router_data.request.is_auto_capture()?,- };- Ok(Self {- amount: item.amount.clone(),- card,- })- }- _ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()),- }+ let metadata = connector_utils::to_connector_meta_from_secret::<Self>(meta_data.clone())+ .change_context(errors::ConnectorError::InvalidConnectorConfig {+ config: "metadata",+ })?;+ Ok(metadata)}}-//TODO: Fill the struct with respective fields-// Auth Struct-pub struct WorldpayvantivAuthType {- pub(super) api_key: Secret<String>,+#[derive(Debug, Serialize)]+#[serde(rename = "cnpOnlineRequest", rename_all = "camelCase")]+pub struct CnpOnlineRequest {+ #[serde(rename = "@version")]+ pub version: String,+ #[serde(rename = "@xmlns")]+ pub xmlns: String,+ #[serde(rename = "@merchantId")]+ pub merchant_id: Secret<String>,+ pub authentication: Authentication,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub authorization: Option<Authorization>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub sale: Option<Sale>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub capture: Option<Capture>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub void: Option<Void>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub credit: Option<RefundRequest>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub query_transaction: Option<TransactionQuery>,}-impl TryFrom<&ConnectorAuthType> for WorldpayvantivAuthType {+#[derive(Debug, Serialize)]+pub struct Authentication {+ pub user: Secret<String>,+ pub password: Secret<String>,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct Void {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub cnp_txn_id: String,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct Capture {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub cnp_txn_id: String,+ pub amount: MinorUnit,+}++#[derive(Debug, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct Authorization {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub order_id: String,+ pub amount: MinorUnit,+ pub order_source: OrderSource,+ pub card: WorldpayvantivCardData,+}++#[derive(Debug, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct Sale {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub order_id: String,+ pub amount: MinorUnit,+ pub order_source: OrderSource,+ pub card: WorldpayvantivCardData,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct RefundRequest {+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ #[serde(rename = "@id")]+ pub id: String,+ pub cnp_txn_id: String,+ pub amount: MinorUnit,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct TransactionQuery {+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ #[serde(rename = "@id")]+ pub id: String,+ pub orig_cnp_txn_id: String,+}++#[derive(Debug, Serialize)]+#[serde(rename_all = "lowercase")]+pub enum OrderSource {+ Ecommerce,+}++#[derive(Debug, Clone, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct WorldpayvantivCardData {+ #[serde(rename = "type")]+ pub card_type: WorldpayvativCardType,+ pub number: cards::CardNumber,+ pub exp_date: Secret<String>,+ pub card_validation_num: Secret<String>,+}++#[derive(Debug, Clone, Serialize)]++pub enum WorldpayvativCardType {+ #[serde(rename = "VI")]+ Visa,+ #[serde(rename = "MC")]+ MasterCard,+ #[serde(rename = "AX")]+ AmericanExpress,+ #[serde(rename = "DI")]+ Discover,+ #[serde(rename = "DC")]+ DinersClub,+ #[serde(rename = "JCB")]+ JCB,+}++impl TryFrom<common_enums::CardNetwork> for WorldpayvativCardType {type Error = error_stack::Report<errors::ConnectorError>;- fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {- match auth_type {- ConnectorAuthType::HeaderKey { api_key } => Ok(Self {- api_key: api_key.to_owned(),- }),- _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),+ fn try_from(card_network: common_enums::CardNetwork) -> Result<Self, Self::Error> {+ match card_network {+ common_enums::CardNetwork::Visa => Ok(Self::Visa),+ common_enums::CardNetwork::Mastercard => Ok(Self::MasterCard),+ common_enums::CardNetwork::AmericanExpress => Ok(Self::AmericanExpress),+ common_enums::CardNetwork::Discover => Ok(Self::Discover),+ common_enums::CardNetwork::DinersClub => Ok(Self::DinersClub),+ common_enums::CardNetwork::JCB => Ok(Self::JCB),+ _ => Err(errors::ConnectorError::NotSupported {+ message: "Card network".to_string(),+ connector: "worldpayvantiv",+ }+ .into()),}}}-// PaymentsResponse-//TODO: Append the remaining status flags-#[derive(Debug, Copy, Clone, Default, Serialize, Deserialize, PartialEq)]-#[serde(rename_all = "lowercase")]-pub enum WorldpayvantivPaymentStatus {- Succeeded,- Failed,- #[default]- Processing,-}--impl From<WorldpayvantivPaymentStatus> for common_enums::AttemptStatus {- fn from(item: WorldpayvantivPaymentStatus) -> Self {- match item {- WorldpayvantivPaymentStatus::Succeeded => Self::Charged,- WorldpayvantivPaymentStatus::Failed => Self::Failure,- WorldpayvantivPaymentStatus::Processing => Self::Authorizing,++impl TryFrom<&connector_utils::CardIssuer> for WorldpayvativCardType {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(card_issuer: &connector_utils::CardIssuer) -> Result<Self, Self::Error> {+ match card_issuer {+ connector_utils::CardIssuer::Visa => Ok(Self::Visa),+ connector_utils::CardIssuer::Master => Ok(Self::MasterCard),+ connector_utils::CardIssuer::AmericanExpress => Ok(Self::AmericanExpress),+ connector_utils::CardIssuer::Discover => Ok(Self::Discover),+ connector_utils::CardIssuer::DinersClub => Ok(Self::DinersClub),+ connector_utils::CardIssuer::JCB => Ok(Self::JCB),+ _ => Err(errors::ConnectorError::NotSupported {+ message: "Card network".to_string(),+ connector: "worldpayvantiv",+ }+ .into()),+ }+ }+}++impl TryFrom<&PaymentMethodData> for WorldpayvantivCardData {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(payment_method_data: &PaymentMethodData) -> Result<Self, Self::Error> {+ match payment_method_data {+ PaymentMethodData::Card(card) => {+ let card_type = match card.card_network.clone() {+ Some(card_type) => WorldpayvativCardType::try_from(card_type)?,+ None => WorldpayvativCardType::try_from(&card.get_card_issuer()?)?,+ };++ let exp_date = card.get_expiry_date_as_mmyy()?;++ Ok(Self {+ card_type,+ number: card.card_number.clone(),+ exp_date,+ card_validation_num: card.card_cvc.clone(),+ })+ }+ _ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()),}}}-//TODO: Fill the struct with respective fields-#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]-pub struct WorldpayvantivPaymentsResponse {- status: WorldpayvantivPaymentStatus,- id: String,+impl TryFrom<&PaymentsSyncRouterData> for CnpOnlineRequest {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(item: &PaymentsSyncRouterData) -> Result<Self, Self::Error> {+ let report_group_metadata: WorldpayvantivPaymentMetadata =+ connector_utils::to_connector_meta(item.request.connector_meta.clone())?;+ let report_group = report_group_metadata.report_group.clone().ok_or(+ errors::ConnectorError::RequestEncodingFailedWithReason(+ "Failed to obtain report_group from metadata".to_string(),+ ),+ )?;+ let api_call_id = format!("psync_{:?}", connector_utils::generate_12_digit_number());+ let query_transaction = Some(TransactionQuery {+ id: api_call_id,+ report_group,+ orig_cnp_txn_id: item+ .request+ .connector_transaction_id+ .get_connector_transaction_id()+ .change_context(errors::ConnectorError::MissingConnectorTransactionID)?,+ });++ let worldpayvantiv_auth_type = WorldpayvantivAuthType::try_from(&item.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };++ Ok(Self {+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization: None,+ sale: None,+ capture: None,+ void: None,+ credit: None,+ query_transaction,+ })+ }}-impl<F, T> TryFrom<ResponseRouterData<F, WorldpayvantivPaymentsResponse, T, PaymentsResponseData>>- for RouterData<F, T, PaymentsResponseData>+impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsSyncData, PaymentsResponseData>>+ for RouterData<F, PaymentsSyncData, PaymentsResponseData>{type Error = error_stack::Report<errors::ConnectorError>;fn try_from(- item: ResponseRouterData<F, WorldpayvantivPaymentsResponse, T, PaymentsResponseData>,+ item: ResponseRouterData<F, CnpOnlineResponse, PaymentsSyncData, PaymentsResponseData>,+ ) -> Result<Self, Self::Error> {+ let connector_transaction_id = item+ .data+ .request+ .connector_transaction_id+ .get_connector_transaction_id()+ .change_context(errors::ConnectorError::MissingConnectorTransactionID)?;++ match item.response.query_transaction_response {+ Some(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+ })+ }+ })+ .ok_or(errors::ConnectorError::ResponseHandlingFailed)?+ }+ None => {+ // In case of 2xx 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+ })+ }+ }+ }+}++impl TryFrom<&WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>> for CnpOnlineRequest {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: &WorldpayvantivRouterData<&PaymentsAuthorizeRouterData>,) -> Result<Self, Self::Error> {+ if item.router_data.is_three_ds() {+ Err(errors::ConnectorError::NotSupported {+ message: "Card 3DS".to_string(),+ connector: "Worldpayvantiv",+ })?+ };+ let worldpayvantiv_metadata =+ WorldpayvantivMetadataObject::try_from(&item.router_data.connector_meta_data)?;++ if worldpayvantiv_metadata.merchant_config_currency != item.router_data.request.currency {+ Err(errors::ConnectorError::CurrencyNotSupported {+ message: item.router_data.request.currency.to_string(),+ connector: "Worldpayvantiv",+ })?+ };++ let card = WorldpayvantivCardData::try_from(+ &item.router_data.request.payment_method_data.clone(),+ )?;+ let report_group = item+ .router_data+ .request+ .metadata+ .clone()+ .map(|payment_metadata| {+ connector_utils::to_connector_meta::<WorldpayvantivPaymentMetadata>(Some(+ payment_metadata,+ ))+ })+ .transpose()?+ .and_then(|worldpayvantiv_metadata| worldpayvantiv_metadata.report_group)+ .unwrap_or(worldpayvantiv_metadata.report_group);++ let worldpayvantiv_auth_type =+ WorldpayvantivAuthType::try_from(&item.router_data.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };++ let api_call_id =+ if item.router_data.attempt_id.len() < worldpayvantiv_constants::MAX_ID_LENGTH {+ item.router_data.attempt_id.clone()+ } else {+ format!("auth_{:?}", connector_utils::generate_12_digit_number())+ };++ let (authorization, sale) = if item.router_data.request.is_auto_capture()? {+ (+ None,+ Some(Sale {+ id: api_call_id.clone(),+ report_group: report_group.clone(),+ order_id: item.router_data.payment_id.clone(),+ amount: item.amount,+ order_source: OrderSource::Ecommerce,+ card: card.clone(),+ }),+ )+ } else {+ (+ Some(Authorization {+ id: api_call_id.clone(),+ report_group: report_group.clone(),+ order_id: item.router_data.payment_id.clone(),+ amount: item.amount,+ order_source: OrderSource::Ecommerce,+ card: card.clone(),+ }),+ None,+ )+ };+Ok(Self {- status: common_enums::AttemptStatus::from(item.response.status),- response: Ok(PaymentsResponseData::TransactionResponse {- resource_id: ResponseId::ConnectorTransactionId(item.response.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+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization,+ sale,+ capture: None,+ void: None,+ credit: None,+ query_transaction: None,})}}-//TODO: Fill the struct with respective fields-// REFUND :-// Type definition for RefundRequest-#[derive(Default, Debug, Serialize)]-pub struct WorldpayvantivRefundRequest {- pub amount: StringMinorUnit,+impl TryFrom<&WorldpayvantivRouterData<&PaymentsCaptureRouterData>> for CnpOnlineRequest {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: &WorldpayvantivRouterData<&PaymentsCaptureRouterData>,+ ) -> Result<Self, Self::Error> {+ let report_group_metadata: WorldpayvantivPaymentMetadata =+ connector_utils::to_connector_meta(item.router_data.request.connector_meta.clone())?;+ let report_group = report_group_metadata.report_group.clone().ok_or(+ errors::ConnectorError::RequestEncodingFailedWithReason(+ "Failed to obtain report_group from metadata".to_string(),+ ),+ )?;+ let api_call_id = format!("capture_{:?}", connector_utils::generate_12_digit_number());+ let capture = Some(Capture {+ id: api_call_id,+ report_group,+ cnp_txn_id: item.router_data.request.connector_transaction_id.clone(),+ amount: item.amount,+ });++ let worldpayvantiv_auth_type =+ WorldpayvantivAuthType::try_from(&item.router_data.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };++ Ok(Self {+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization: None,+ sale: None,+ capture,+ void: None,+ credit: None,+ query_transaction: None,+ })+ }}-impl<F> TryFrom<&WorldpayvantivRouterData<&RefundsRouterData<F>>> for WorldpayvantivRefundRequest {+impl<F> TryFrom<&WorldpayvantivRouterData<&RefundsRouterData<F>>> for CnpOnlineRequest {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(item: &WorldpayvantivRouterData<&RefundsRouterData<F>>,) -> Result<Self, Self::Error> {+ let report_group_metadata: WorldpayvantivPaymentMetadata =+ connector_utils::to_connector_meta(+ item.router_data.request.connector_metadata.clone(),+ )?;++ let report_group = report_group_metadata.report_group.clone().ok_or(+ errors::ConnectorError::RequestEncodingFailedWithReason(+ "Failed to obtain report_group from metadata".to_string(),+ ),+ )?;++ let api_call_id = format!("ref_{:?}", connector_utils::generate_12_digit_number());+ let credit = Some(RefundRequest {+ id: api_call_id,+ report_group,+ cnp_txn_id: item.router_data.request.connector_transaction_id.clone(),+ amount: item.amount,+ });++ let worldpayvantiv_auth_type =+ WorldpayvantivAuthType::try_from(&item.router_data.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };++ Ok(Self {+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization: None,+ sale: None,+ capture: None,+ void: None,+ credit,+ query_transaction: None,+ })+ }+}++impl TryFrom<&RefundSyncRouterData> for CnpOnlineRequest {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(item: &RefundSyncRouterData) -> Result<Self, Self::Error> {+ let report_group_metadata: WorldpayvantivPaymentMetadata =+ connector_utils::to_connector_meta(item.request.connector_metadata.clone())?;+ let report_group = report_group_metadata.report_group.clone().ok_or(+ errors::ConnectorError::RequestEncodingFailedWithReason(+ "Failed to obtain report_group from metadata".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,+ orig_cnp_txn_id: item.request.get_connector_refund_id()?,+ });++ let worldpayvantiv_auth_type = WorldpayvantivAuthType::try_from(&item.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };+Ok(Self {- amount: item.amount.to_owned(),+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization: None,+ sale: None,+ capture: None,+ void: None,+ credit: None,+ query_transaction,})}}-// Type definition for Refund Response+#[derive(Debug, Serialize, Deserialize)]+#[serde(rename = "cnpOnlineResponse", rename_all = "camelCase")]+pub struct CnpOnlineResponse {+ #[serde(rename = "@version")]+ pub version: String,+ #[serde(rename = "@response")]+ pub response_code: String,+ #[serde(rename = "@message")]+ pub message: String,+ pub authorization_response: Option<AuthorizationResponse>,+ pub sale_response: Option<SaleResponse>,+ pub capture_response: Option<CaptureResponse>,+ pub void_response: Option<VoidResponse>,+ pub credit_response: Option<CreditResponse>,+ pub query_transaction_response: Option<QueryTransactionResponse>,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct CaptureResponse {+ #[serde(rename = "@id")]+ pub id: String,++ #[serde(rename = "@reportGroup")]+ pub report_group: String,++ #[serde(rename = "cnpTxnId")]+ pub cnp_txn_id: String,++ pub response: WorldpayvantivResponseCode,++ pub response_time: String,++ pub message: String,+}++#[derive(Debug, Serialize, Deserialize, PartialEq)]+#[serde(rename_all = "camelCase")]+pub struct AuthorizationResponse {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: 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>,+}++#[derive(Debug, Serialize, Deserialize, PartialEq)]+#[serde(rename_all = "camelCase")]+pub struct SaleResponse {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: 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>,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct VoidResponse {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub cnp_txn_id: String,+ pub response: WorldpayvantivResponseCode,+ pub response_time: String,+ pub post_date: String,+ pub message: String,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct QueryTransactionResponse {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub response: WorldpayvantivResponseCode,+ pub response_time: String,+ pub message: String,+ pub match_count: u32,+ #[serde(rename = "results_max10")]+ pub results: Vec<ResultsMax10>,+ pub location: String,+}++#[derive(Debug, Serialize, Deserialize)]+pub struct ResultsMax10 {+ pub authorization_response: Option<AuthorizationResponse>,+ pub sale_response: Option<SaleResponse>,+ pub capture_response: Option<CaptureResponse>,+ pub void_response: Option<VoidResponse>,+ pub credit_response: Option<CreditResponse>,+}-#[allow(dead_code)]-#[derive(Debug, Copy, Serialize, Default, Deserialize, Clone)]-pub enum RefundStatus {- Succeeded,- Failed,- #[default]- Processing,+#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct CreditResponse {+ #[serde(rename = "@id")]+ pub id: String,+ #[serde(rename = "@reportGroup")]+ pub report_group: String,+ pub cnp_txn_id: String,+ pub response: WorldpayvantivResponseCode,+ pub response_time: String,+ pub message: String,}-impl From<RefundStatus> for enums::RefundStatus {- fn from(item: RefundStatus) -> Self {- match item {- RefundStatus::Succeeded => Self::Success,- RefundStatus::Failed => Self::Failure,- RefundStatus::Processing => Self::Pending,- //TODO: Review mapping+impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsCaptureData, PaymentsResponseData>>+ for RouterData<F, PaymentsCaptureData, PaymentsResponseData>+{+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: ResponseRouterData<F, CnpOnlineResponse, PaymentsCaptureData, PaymentsResponseData>,+ ) -> Result<Self, Self::Error> {+ match item.response.capture_response {+ Some(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: Some(capture_response.cnp_txn_id),+ 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(+ capture_response.cnp_txn_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+ })+ }+ }+ None => Ok(Self {+ status: common_enums::AttemptStatus::CaptureFailed,+ response: Err(ErrorResponse {+ code: item.response.response_code,+ message: item.response.message.clone(),+ reason: Some(item.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+ }),}}}-//TODO: Fill the struct with respective fields-#[derive(Default, Debug, Clone, Serialize, Deserialize)]-pub struct RefundResponse {- id: String,- status: RefundStatus,+impl<F> TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsCancelData, PaymentsResponseData>>+ for RouterData<F, PaymentsCancelData, PaymentsResponseData>+{+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: ResponseRouterData<F, CnpOnlineResponse, PaymentsCancelData, PaymentsResponseData>,+ ) -> Result<Self, Self::Error> {+ match item.response.void_response {+ Some(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: Some(void_response.cnp_txn_id),+ 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(+ void_response.cnp_txn_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+ })+ }+ }+ None => Ok(Self {+ status: common_enums::AttemptStatus::VoidFailed,+ response: Err(ErrorResponse {+ code: item.response.response_code,+ message: item.response.message.clone(),+ reason: Some(item.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+ }),+ }+ }}-impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> {+impl TryFrom<RefundsResponseRouterData<Execute, CnpOnlineResponse>> for RefundsRouterData<Execute> {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(- item: RefundsResponseRouterData<Execute, RefundResponse>,+ item: RefundsResponseRouterData<Execute, CnpOnlineResponse>,) -> Result<Self, Self::Error> {- Ok(Self {- response: Ok(RefundsResponseData {- connector_refund_id: item.response.id.to_string(),- refund_status: enums::RefundStatus::from(item.response.status),+ match item.response.credit_response {+ Some(credit_response) => {+ let refund_status = get_refund_status(credit_response.response)?;+ if connector_utils::is_refund_failure(refund_status) {+ Ok(Self {+ response: Err(ErrorResponse {+ code: credit_response.response.to_string(),+ message: credit_response.message.clone(),+ reason: Some(credit_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 {+ response: Ok(RefundsResponseData {+ connector_refund_id: credit_response.cnp_txn_id,+ refund_status,+ }),+ ..item.data+ })+ }+ }+ None => Ok(Self {+ response: Err(ErrorResponse {+ code: item.response.response_code,+ message: item.response.message.clone(),+ reason: Some(item.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}),- ..item.data+ }+ }+}++impl TryFrom<&PaymentsCancelRouterData> for CnpOnlineRequest {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(item: &PaymentsCancelRouterData) -> Result<Self, Self::Error> {+ let report_group_metadata: WorldpayvantivPaymentMetadata =+ connector_utils::to_connector_meta(item.request.connector_meta.clone())?;+ let report_group = report_group_metadata.report_group.clone().ok_or(+ errors::ConnectorError::RequestEncodingFailedWithReason(+ "Failed to obtain report_group from metadata".to_string(),+ ),+ )?;+ let api_call_id = format!("void_{:?}", connector_utils::generate_12_digit_number());+ let void = Some(Void {+ id: api_call_id,+ report_group,+ cnp_txn_id: item.request.connector_transaction_id.clone(),+ });++ let worldpayvantiv_auth_type = WorldpayvantivAuthType::try_from(&item.connector_auth_type)?;+ let authentication = Authentication {+ user: worldpayvantiv_auth_type.user,+ password: worldpayvantiv_auth_type.password,+ };++ Ok(Self {+ version: worldpayvantiv_constants::WORLDPAYVANTIV_VERSION.to_string(),+ xmlns: worldpayvantiv_constants::XMLNS.to_string(),+ merchant_id: worldpayvantiv_auth_type.merchant_id,+ authentication,+ authorization: None,+ sale: None,+ capture: None,+ void,+ credit: None,+ query_transaction: None,})}}-impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> {+impl<F>+ TryFrom<ResponseRouterData<F, CnpOnlineResponse, PaymentsAuthorizeData, PaymentsResponseData>>+ for RouterData<F, PaymentsAuthorizeData, PaymentsResponseData>+{type Error = error_stack::Report<errors::ConnectorError>;fn try_from(- item: RefundsResponseRouterData<RSync, RefundResponse>,+ item: ResponseRouterData<F, CnpOnlineResponse, PaymentsAuthorizeData, PaymentsResponseData>,) -> Result<Self, Self::Error> {- Ok(Self {- response: Ok(RefundsResponseData {- connector_refund_id: item.response.id.to_string(),- refund_status: enums::RefundStatus::from(item.response.status),+ match (item.response.sale_response, item.response.authorization_response) {+ (Some(sale_response), None) => {+ 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: Some(sale_response.order_id),+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ let report_group = WorldpayvantivPaymentMetadata {+ report_group: Some(sale_response.report_group.clone()),+ };+ let connector_metadata = Some(report_group.encode_to_value()+ .change_context(errors::ConnectorError::ResponseHandlingFailed)?);++ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(sale_response.cnp_txn_id),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata,+ network_txn_id: None,+ connector_response_reference_id: Some(sale_response.order_id),+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ },+ (None, Some(auth_response)) => {+ let status = get_attempt_status(WorldpayvantivPaymentFlow::Auth, auth_response.response_code)?;+ if connector_utils::is_payment_failure(status) {+ Ok(Self {+ status,+ response: Err(ErrorResponse {+ code: auth_response.response_code.to_string(),+ message: auth_response.message.clone(),+ reason: Some(auth_response.message.clone()),+ status_code: item.http_code,+ attempt_status: None,+ connector_transaction_id: Some(auth_response.order_id),+ network_advice_code: None,+ network_decline_code: None,+ network_error_message: None,+ }),+ ..item.data+ })+ } else {+ let report_group = WorldpayvantivPaymentMetadata {+ report_group: Some(auth_response.report_group.clone()),+ };+ let connector_metadata = Some(report_group.encode_to_value()+ .change_context(errors::ConnectorError::ResponseHandlingFailed)?);++ Ok(Self {+ status,+ response: Ok(PaymentsResponseData::TransactionResponse {+ resource_id: ResponseId::ConnectorTransactionId(auth_response.cnp_txn_id),+ redirection_data: Box::new(None),+ mandate_reference: Box::new(None),+ connector_metadata,+ network_txn_id: None,+ connector_response_reference_id: Some(auth_response.order_id),+ incremental_authorization_allowed: None,+ charges: None,+ }),+ ..item.data+ })+ }+ },+ (None, None) => { Ok(Self {+ status: common_enums::AttemptStatus::Failure,+ response: Err(ErrorResponse {+ code: item.response.response_code.clone(),+ message: item.response.message.clone(),+ reason: Some(item.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+ })},+ (_, _) => { Err(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from("Only one of 'sale_response' or 'authorisation_response' is expected, but both were recieved".to_string()),+ ))?+ },+ }+ }+}++impl TryFrom<RefundsResponseRouterData<RSync, CnpOnlineResponse>> for RefundsRouterData<RSync> {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn 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+ .results+ .first()+ .ok_or(errors::ConnectorError::ResponseHandlingFailed)?;+ 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) {+ Ok(Self {+ response: Err(ErrorResponse {+ code: refund_response.response.to_string(),+ message: refund_response.message.clone(),+ reason: Some(refund_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 {+ response: Ok(RefundsResponseData {+ connector_refund_id: item+ .data+ .request+ .connector_refund_id+ .clone()+ .ok_or(errors::ConnectorError::MissingConnectorRefundID)?,+ refund_status,+ }),+ ..item.data+ })+ }+ } else {+ Ok(Self {+ response: Ok(RefundsResponseData {+ connector_refund_id: item+ .data+ .request+ .connector_refund_id+ .clone()+ .ok_or(errors::ConnectorError::MissingConnectorRefundID)?,+ refund_status: common_enums::RefundStatus::Pending,+ }),+ ..item.data+ })+ }+ }+ None => Ok(Self {+ response: Ok(RefundsResponseData {+ connector_refund_id: item+ .data+ .request+ .connector_refund_id+ .clone()+ .ok_or(errors::ConnectorError::MissingConnectorRefundID)?,+ refund_status: common_enums::RefundStatus::Pending,+ }),+ ..item.data}),- ..item.data- })+ }}}-//TODO: Fill the struct with respective fields-#[derive(Default, Debug, Serialize, Deserialize, PartialEq)]-pub struct WorldpayvantivErrorResponse {- pub status_code: u16,- pub code: String,- pub message: String,- pub reason: Option<String>,+#[derive(Debug, strum::Display, Serialize, Deserialize, PartialEq, Clone, Copy)]+pub enum WorldpayvantivResponseCode {+ #[serde(rename = "001")]+ TransactionReceived,+ #[serde(rename = "000")]+ Approved,+ #[serde(rename = "010")]+ PartiallyApproved,+ #[serde(rename = "011")]+ OfflineApproval,+ #[serde(rename = "013")]+ OfflineApprovalUnableToGoOnline,+ #[serde(rename = "014")]+ InquirySuccessful,+ #[serde(rename = "015")]+ PendingShopperCheckoutCompletion,+ #[serde(rename = "016")]+ ShopperCheckoutExpired,+ #[serde(rename = "100")]+ ProcessingNetworkUnavailable,+ #[serde(rename = "101")]+ IssuerUnavailable,+ #[serde(rename = "102")]+ ReSubmitTransaction,+ #[serde(rename = "103")]+ MerchantNotConfiguredForProcessingAtThisSite,+ #[serde(rename = "108")]+ TryAgainLater,+ #[serde(rename = "110")]+ InsufficientFunds,+ #[serde(rename = "111")]+ AuthorizationAmountHasAlreadyBeenDepleted,+ #[serde(rename = "112")]+ InsufficientFundsRetryAfter1Hour,+ #[serde(rename = "113")]+ InsufficientFundsRetryAfter24Hour,+ #[serde(rename = "114")]+ InsufficientFundsRetryAfter2Days,+ #[serde(rename = "115")]+ InsufficientFundsRetryAfter4Days,+ #[serde(rename = "116")]+ InsufficientFundsRetryAfter6Days,+ #[serde(rename = "117")]+ InsufficientFundsRetryAfter8Days,+ #[serde(rename = "118")]+ InsufficientFundsRetryAfter10Days,+ #[serde(rename = "120")]+ CallIssuer,+ #[serde(rename = "121")]+ CallAmex,+ #[serde(rename = "122")]+ CallDinersClub,+ #[serde(rename = "123")]+ CallDiscover,+ #[serde(rename = "124")]+ CallJbs,+ #[serde(rename = "125")]+ CallVisaMastercard,+ #[serde(rename = "126")]+ CallIssuerUpdateCardholderData,+ #[serde(rename = "127")]+ ExceedsApprovalAmountLimit,+ #[serde(rename = "130")]+ CallIndicatedNumber,+ #[serde(rename = "131")]+ UnacceptablePinTransactionDeclinedRetry,+ #[serde(rename = "132")]+ PinNotChanged,+ #[serde(rename = "137")]+ ConsumerMultiUseVirtualCardNumberSoftDecline,+ #[serde(rename = "138")]+ ConsumerNonReloadablePrepaidCardSoftDecline,+ #[serde(rename = "139")]+ ConsumerSingleUseVirtualCardNumberSoftDecline,+ #[serde(rename = "140")]+ UpdateCardholderData,+ #[serde(rename = "141")]+ ConsumerNonReloadablePrepaidCardApproved,+ #[serde(rename = "142")]+ ConsumerSingleUseVirtualCardNumberApproved,+ #[serde(rename = "143")]+ MerchantDoesntQualifyForProductCode,+ #[serde(rename = "145")]+ Lifecycle,+ #[serde(rename = "146")]+ Policy,+ #[serde(rename = "147")]+ FraudSecurity,+ #[serde(rename = "148")]+ InvalidOrExpiredCardContactCardholderToUpdate,+ #[serde(rename = "149")]+ InvalidTransactionOrCardRestrictionVerifyInformationAndResubmit,+ #[serde(rename = "150")]+ OriginalTransactionFound,+ #[serde(rename = "151")]+ OriginalTransactionNotFound,+ #[serde(rename = "152")]+ OriginalTransactionFoundButResponseNotYetAvailable,+ #[serde(rename = "153")]+ QueryTransactionNotEnabled,+ #[serde(rename = "154")]+ AtLeastOneOfOrigIdOrOrigCnpTxnIdIsRequired,+ #[serde(rename = "155")]+ OrigCnpTxnIdIsRequiredWhenShowStatusOnlyIsUsed,+ #[serde(rename = "156")]+ IncrementalAuthNotSupported,+ #[serde(rename = "157")]+ SetAuthIndicatorToIncremental,+ #[serde(rename = "158")]+ IncrementalValueForAuthIndicatorNotAllowedInThisAuthStructure,+ #[serde(rename = "159")]+ CannotRequestAnIncrementalAuthIfOriginalAuthNotSetToEstimated,+ #[serde(rename = "161")]+ TransactionMustReferenceTheEstimatedAuth,+ #[serde(rename = "162")]+ IncrementedAuthExceedsMaxTransactionAmount,+ #[serde(rename = "170")]+ SubmittedMccNotAllowed,+ #[serde(rename = "191")]+ TheMerchantIsNotRegisteredInTheUpdateProgram,+ #[serde(rename = "192")]+ MerchantNotCertifiedEnabledForIias,+ #[serde(rename = "206")]+ IssuerGeneratedError,+ #[serde(rename = "207")]+ PickupCardOtherThanLostStolen,+ #[serde(rename = "209")]+ InvalidAmountHardDecline,+ #[serde(rename = "211")]+ ReversalUnsuccessful,+ #[serde(rename = "212")]+ MissingData,+ #[serde(rename = "213")]+ PickupCardLostCard,+ #[serde(rename = "214")]+ PickupCardStolenCard,+ #[serde(rename = "215")]+ RestrictedCard,+ #[serde(rename = "216")]+ InvalidDeactivate,+ #[serde(rename = "217")]+ CardAlreadyActive,+ #[serde(rename = "218")]+ CardNotActive,+ #[serde(rename = "219")]+ CardAlreadyDeactivate,+ #[serde(rename = "221")]+ OverMaxBalance,+ #[serde(rename = "222")]+ InvalidActivate,+ #[serde(rename = "223")]+ NoTransactionFoundForReversal,+ #[serde(rename = "226")]+ IncorrectCvv,+ #[serde(rename = "229")]+ IllegalTransaction,+ #[serde(rename = "251")]+ DuplicateTransaction,+ #[serde(rename = "252")]+ SystemError,+ #[serde(rename = "253")]+ DeconvertedBin,+ #[serde(rename = "254")]+ MerchantDepleted,+ #[serde(rename = "255")]+ GiftCardEscheated,+ #[serde(rename = "256")]+ InvalidReversalTypeForCreditCardTransaction,+ #[serde(rename = "257")]+ SystemErrorMessageFormatError,+ #[serde(rename = "258")]+ SystemErrorCannotProcess,+ #[serde(rename = "271")]+ RefundRejectedDueToPendingDepositStatus,+ #[serde(rename = "272")]+ RefundRejectedDueToDeclinedDepositStatus,+ #[serde(rename = "273")]+ RefundRejectedByTheProcessingNetwork,+ #[serde(rename = "284")]+ CaptureCreditAndAuthReversalTagsCannotBeUsedForGiftCardTransactions,+ #[serde(rename = "301")]+ InvalidAccountNumber,+ #[serde(rename = "302")]+ AccountNumberDoesNotMatchPaymentType,+ #[serde(rename = "303")]+ PickUpCard,+ #[serde(rename = "304")]+ LostStolenCard,+ #[serde(rename = "305")]+ ExpiredCard,+ #[serde(rename = "306")]+ AuthorizationHasExpiredNoNeedToReverse,+ #[serde(rename = "307")]+ RestrictedCardSoftDecline,+ #[serde(rename = "308")]+ RestrictedCardChargeback,+ #[serde(rename = "309")]+ RestrictedCardPrepaidCardFilteringService,+ #[serde(rename = "310")]+ InvalidTrackData,+ #[serde(rename = "311")]+ DepositIsAlreadyReferencedByAChargeback,+ #[serde(rename = "312")]+ RestrictedCardInternationalCardFilteringService,+ #[serde(rename = "313")]+ InternationalFilteringForIssuingCardCountry,+ #[serde(rename = "315")]+ RestrictedCardAuthFraudVelocityFilteringService,+ #[serde(rename = "316")]+ AutomaticRefundAlreadyIssued,+ #[serde(rename = "317")]+ RestrictedCardCardUnderSanction,+ #[serde(rename = "318")]+ RestrictedCardAuthFraudAdviceFilteringService,+ #[serde(rename = "319")]+ RestrictedCardFraudAvsFilteringService,+ #[serde(rename = "320")]+ InvalidExpirationDate,+ #[serde(rename = "321")]+ InvalidMerchant,+ #[serde(rename = "322")]+ InvalidTransaction,+ #[serde(rename = "323")]+ NoSuchIssuer,+ #[serde(rename = "324")]+ InvalidPin,+ #[serde(rename = "325")]+ TransactionNotAllowedAtTerminal,+ #[serde(rename = "326")]+ ExceedsNumberOfPinEntries,+ #[serde(rename = "327")]+ CardholderTransactionNotPermitted,+ #[serde(rename = "328")]+ CardholderRequestedThatRecurringOrInstallmentPaymentBeStopped,+ #[serde(rename = "330")]+ InvalidPaymentType,+ #[serde(rename = "331")]+ InvalidPosCapabilityForCardholderAuthorizedTerminalTransaction,+ #[serde(rename = "332")]+ InvalidPosCardholderIdForCardholderAuthorizedTerminalTransaction,+ #[serde(rename = "335")]+ ThisMethodOfPaymentDoesNotSupportAuthorizationReversals,+ #[serde(rename = "336")]+ ReversalAmountDoesNotMatchAuthorizationAmount,+ #[serde(rename = "337")]+ TransactionDidNotConvertToPinless,+ #[serde(rename = "340")]+ InvalidAmountSoftDecline,+ #[serde(rename = "341")]+ InvalidHealthcareAmounts,+ #[serde(rename = "346")]+ InvalidBillingDescriptorPrefix,+ #[serde(rename = "347")]+ InvalidBillingDescriptor,+ #[serde(rename = "348")]+ InvalidReportGroup,+ #[serde(rename = "349")]+ DoNotHonor,+ #[serde(rename = "350")]+ GenericDecline, // Soft or Hard Decline+ #[serde(rename = "351")]+ DeclineRequestPositiveId,+ #[serde(rename = "352")]+ DeclineCvv2CidFail,+ #[serde(rename = "354")]+ ThreeDSecureTransactionNotSupportedByMerchant,+ #[serde(rename = "356")]+ InvalidPurchaseLevelIiiTheTransactionContainedBadOrMissingData,+ #[serde(rename = "357")]+ MissingHealthcareIiasTagForAnFsaTransaction,+ #[serde(rename = "358")]+ RestrictedByVantivDueToSecurityCodeMismatch,+ #[serde(rename = "360")]+ NoTransactionFoundWithSpecifiedTransactionId,+ #[serde(rename = "361")]+ AuthorizationNoLongerAvailable,+ #[serde(rename = "362")]+ TransactionNotVoidedAlreadySettled,+ #[serde(rename = "363")]+ AutoVoidOnRefund,+ #[serde(rename = "364")]+ InvalidAccountNumberOriginalOrNocUpdatedECheckAccountRequired,+ #[serde(rename = "365")]+ TotalCreditAmountExceedsCaptureAmount,+ #[serde(rename = "366")]+ ExceedTheThresholdForSendingRedeposits,+ #[serde(rename = "367")]+ DepositHasNotBeenReturnedForInsufficientNonSufficientFunds,+ #[serde(rename = "368")]+ InvalidCheckNumber,+ #[serde(rename = "369")]+ RedepositAgainstInvalidTransactionType,+ #[serde(rename = "370")]+ InternalSystemErrorCallVantiv,+ #[serde(rename = "371")]+ OriginalTransactionHasBeenProcessedFutureRedepositsCanceled,+ #[serde(rename = "372")]+ SoftDeclineAutoRecyclingInProgress,+ #[serde(rename = "373")]+ HardDeclineAutoRecyclingComplete,+ #[serde(rename = "375")]+ MerchantIsNotEnabledForSurcharging,+ #[serde(rename = "376")]+ ThisMethodOfPaymentDoesNotSupportSurcharging,+ #[serde(rename = "377")]+ SurchargeIsNotValidForDebitOrPrepaidCards,+ #[serde(rename = "378")]+ SurchargeCannotExceedsTheMaximumAllowedLimit,+ #[serde(rename = "379")]+ TransactionDeclinedByTheProcessingNetwork,+ #[serde(rename = "380")]+ SecondaryAmountCannotExceedTheSaleAmount,+ #[serde(rename = "381")]+ ThisMethodOfPaymentDoesNotSupportSecondaryAmount,+ #[serde(rename = "382")]+ SecondaryAmountCannotBeLessThanZero,+ #[serde(rename = "383")]+ PartialTransactionIsNotSupportedWhenIncludingASecondaryAmount,+ #[serde(rename = "384")]+ SecondaryAmountRequiredOnPartialRefundWhenUsedOnDeposit,+ #[serde(rename = "385")]+ SecondaryAmountNotAllowedOnRefundIfNotIncludedOnDeposit,+ #[serde(rename = "386")]+ ProcessingNetworkError,+ #[serde(rename = "401")]+ InvalidEMail,+ #[serde(rename = "466")]+ InvalidCombinationOfAccountFundingTransactionTypeAndMcc,+ #[serde(rename = "467")]+ InvalidAccountFundingTransactionTypeForThisMethodOfPayment,+ #[serde(rename = "468")]+ MissingOneOrMoreReceiverFieldsForAccountFundingTransaction,+ #[serde(rename = "469")]+ InvalidRecurringRequestSeeRecurringResponseForDetails,+ #[serde(rename = "470")]+ ApprovedRecurringSubscriptionCreated,+ #[serde(rename = "471")]+ ParentTransactionDeclinedRecurringSubscriptionNotCreated,+ #[serde(rename = "472")]+ InvalidPlanCode,+ #[serde(rename = "473")]+ ScheduledRecurringPaymentProcessed,+ #[serde(rename = "475")]+ InvalidSubscriptionId,+ #[serde(rename = "476")]+ AddOnCodeAlreadyExists,+ #[serde(rename = "477")]+ DuplicateAddOnCodesInRequests,+ #[serde(rename = "478")]+ NoMatchingAddOnCodeForTheSubscription,+ #[serde(rename = "480")]+ NoMatchingDiscountCodeForTheSubscription,+ #[serde(rename = "481")]+ DuplicateDiscountCodesInRequest,+ #[serde(rename = "482")]+ InvalidStartDate,+ #[serde(rename = "483")]+ MerchantNotRegisteredForRecurringEngine,+ #[serde(rename = "484")]+ InsufficientDataToUpdateSubscription,+ #[serde(rename = "485")]+ InvalidBillingDate,+ #[serde(rename = "486")]+ DiscountCodeAlreadyExists,+ #[serde(rename = "487")]+ PlanCodeAlreadyExists,+ #[serde(rename = "500")]+ TheAccountNumberWasChanged,+ #[serde(rename = "501")]+ TheAccountWasClosed,+ #[serde(rename = "502")]+ TheExpirationDateWasChanged,+ #[serde(rename = "503")]+ TheIssuingBankDoesNotParticipateInTheUpdateProgram,+ #[serde(rename = "504")]+ ContactTheCardholderForUpdatedInformation,+ #[serde(rename = "505")]+ NoMatchFound,+ #[serde(rename = "506")]+ NoChangesFound,+ #[serde(rename = "507")]+ TheCardholderHasOptedOutOfTheUpdateProgram,+ #[serde(rename = "521")]+ SoftDeclineCardReaderDecryptionServiceIsNotAvailable,+ #[serde(rename = "523")]+ SoftDeclineDecryptionFailed,+ #[serde(rename = "524")]+ HardDeclineInputDataIsInvalid,+ #[serde(rename = "530")]+ ApplePayKeyMismatch,+ #[serde(rename = "531")]+ ApplePayDecryptionFailed,+ #[serde(rename = "540")]+ HardDeclineDecryptionFailed,+ #[serde(rename = "550")]+ AdvancedFraudFilterScoreBelowThreshold,+ #[serde(rename = "555")]+ SuspectedFraud,+ #[serde(rename = "560")]+ SystemErrorContactWorldpayRepresentative,+ #[serde(rename = "561")]+ AmazonPayAmazonUnavailable,+ #[serde(rename = "562")]+ AmazonPayAmazonDeclined,+ #[serde(rename = "563")]+ AmazonPayInvalidToken,+ #[serde(rename = "564")]+ MerchantNotEnabledForAmazonPay,+ #[serde(rename = "565")]+ TransactionNotSupportedBlockedByIssuer,+ #[serde(rename = "566")]+ BlockedByCardholderContactCardholder,+ #[serde(rename = "601")]+ SoftDeclinePrimaryFundingSourceFailed,+ #[serde(rename = "602")]+ SoftDeclineBuyerHasAlternateFundingSource,+ #[serde(rename = "610")]+ HardDeclineInvalidBillingAgreementId,+ #[serde(rename = "611")]+ HardDeclinePrimaryFundingSourceFailed,+ #[serde(rename = "612")]+ HardDeclineIssueWithPaypalAccount,+ #[serde(rename = "613")]+ HardDeclinePayPalAuthorizationIdMissing,+ #[serde(rename = "614")]+ HardDeclineConfirmedEmailAddressIsNotAvailable,+ #[serde(rename = "615")]+ HardDeclinePayPalBuyerAccountDenied,+ #[serde(rename = "616")]+ HardDeclinePayPalBuyerAccountRestricted,+ #[serde(rename = "617")]+ HardDeclinePayPalOrderHasBeenVoidedExpiredOrCompleted,+ #[serde(rename = "618")]+ HardDeclineIssueWithPayPalRefund,+ #[serde(rename = "619")]+ HardDeclinePayPalCredentialsIssue,+ #[serde(rename = "620")]+ HardDeclinePayPalAuthorizationVoidedOrExpired,+ #[serde(rename = "621")]+ HardDeclineRequiredPayPalParameterMissing,+ #[serde(rename = "622")]+ HardDeclinePayPalTransactionIdOrAuthIdIsInvalid,+ #[serde(rename = "623")]+ HardDeclineExceededMaximumNumberOfPayPalAuthorizationAttempts,+ #[serde(rename = "624")]+ HardDeclineTransactionAmountExceedsMerchantsPayPalAccountLimit,+ #[serde(rename = "625")]+ HardDeclinePayPalFundingSourcesUnavailable,+ #[serde(rename = "626")]+ HardDeclineIssueWithPayPalPrimaryFundingSource,+ #[serde(rename = "627")]+ HardDeclinePayPalProfileDoesNotAllowThisTransactionType,+ #[serde(rename = "628")]+ InternalSystemErrorWithPayPalContactVantiv,+ #[serde(rename = "629")]+ HardDeclineContactPayPalConsumerForAnotherPaymentMethod,+ #[serde(rename = "637")]+ InvalidTerminalId,+ #[serde(rename = "640")]+ PinlessDebitProcessingNotSupportedForNonRecurringTransactions,+ #[serde(rename = "641")]+ PinlessDebitProcessingNotSupportedForPartialAuths,+ #[serde(rename = "642")]+ MerchantNotConfiguredForPinlessDebitProcessing,+ #[serde(rename = "651")]+ DeclineCustomerCancellation,+ #[serde(rename = "652")]+ DeclineReTryTransaction,+ #[serde(rename = "653")]+ DeclineUnableToLocateRecordOnFile,+ #[serde(rename = "654")]+ DeclineFileUpdateFieldEditError,+ #[serde(rename = "655")]+ RemoteFunctionUnknown,+ #[serde(rename = "656")]+ DeclinedExceedsWithdrawalFrequencyLimit,+ #[serde(rename = "657")]+ DeclineCardRecordNotAvailable,+ #[serde(rename = "658")]+ InvalidAuthorizationCode,+ #[serde(rename = "659")]+ ReconciliationError,+ #[serde(rename = "660")]+ PreferredDebitRoutingDenialCreditTransactionCanBeDebit,+ #[serde(rename = "661")]+ DeclinedCurrencyConversionCompleteNoAuthPerformed,+ #[serde(rename = "662")]+ DeclinedMultiCurrencyDccFail,+ #[serde(rename = "663")]+ DeclinedMultiCurrencyInvertFail,+ #[serde(rename = "664")]+ Invalid3DSecurePassword,+ #[serde(rename = "665")]+ InvalidSocialSecurityNumber,+ #[serde(rename = "666")]+ InvalidMothersMaidenName,+ #[serde(rename = "667")]+ EnrollmentInquiryDeclined,+ #[serde(rename = "668")]+ SocialSecurityNumberNotAvailable,+ #[serde(rename = "669")]+ MothersMaidenNameNotAvailable,+ #[serde(rename = "670")]+ PinAlreadyExistsOnDatabase,+ #[serde(rename = "701")]+ Under18YearsOld,+ #[serde(rename = "702")]+ BillToOutsideUsa,+ #[serde(rename = "703")]+ BillToAddressIsNotEqualToShipToAddress,+ #[serde(rename = "704")]+ DeclinedForeignCurrencyMustBeUsd,+ #[serde(rename = "705")]+ OnNegativeFile,+ #[serde(rename = "706")]+ BlockedAgreement,+ #[serde(rename = "707")]+ InsufficientBuyingPower, // Other+ #[serde(rename = "708")]+ InvalidData,+ #[serde(rename = "709")]+ InvalidDataDataElementsMissing,+ #[serde(rename = "710")]+ InvalidDataDataFormatError,+ #[serde(rename = "711")]+ InvalidDataInvalidTCVersion,+ #[serde(rename = "712")]+ DuplicateTransactionPaypalCredit,+ #[serde(rename = "713")]+ VerifyBillingAddress,+ #[serde(rename = "714")]+ InactiveAccount,+ #[serde(rename = "716")]+ InvalidAuth,+ #[serde(rename = "717")]+ AuthorizationAlreadyExistsForTheOrder,+ #[serde(rename = "730")]+ LodgingTransactionsAreNotAllowedForThisMcc,+ #[serde(rename = "731")]+ DurationCannotBeNegative,+ #[serde(rename = "732")]+ HotelFolioNumberCannotBeBlank,+ #[serde(rename = "733")]+ InvalidCheckInDate,+ #[serde(rename = "734")]+ InvalidCheckOutDate,+ #[serde(rename = "735")]+ InvalidCheckInOrCheckOutDate,+ #[serde(rename = "736")]+ CheckOutDateCannotBeBeforeCheckInDate,+ #[serde(rename = "737")]+ NumberOfAdultsCannotBeNegative,+ #[serde(rename = "738")]+ RoomRateCannotBeNegative,+ #[serde(rename = "739")]+ RoomTaxCannotBeNegative,+ #[serde(rename = "740")]+ DurationCanOnlyBeFrom0To99ForVisa,+ #[serde(rename = "801")]+ AccountNumberWasSuccessfullyRegistered,+ #[serde(rename = "802")]+ AccountNumberWasPreviouslyRegistered,+ #[serde(rename = "803")]+ ValidToken,+ #[serde(rename = "805")]+ CardValidationNumberUpdated,+ #[serde(rename = "820")]+ CreditCardNumberWasInvalid,+ #[serde(rename = "821")]+ MerchantIsNotAuthorizedForTokens,+ #[serde(rename = "822")]+ TokenWasNotFound,+ #[serde(rename = "823")]+ TokenInvalid,+ #[serde(rename = "825")]+ MerchantNotAuthorizedForECheckTokens,+ #[serde(rename = "826")]+ CheckoutIdWasInvalid,+ #[serde(rename = "827")]+ CheckoutIdWasNotFound,+ #[serde(rename = "828")]+ GenericCheckoutIdError,+ #[serde(rename = "835")]+ CaptureAmountCanNotBeMoreThanAuthorizedAmount,+ #[serde(rename = "850")]+ TaxBillingOnlyAllowedForMcc9311,+ #[serde(rename = "851")]+ Mcc9311RequiresTaxTypeElement,+ #[serde(rename = "852")]+ DebtRepaymentOnlyAllowedForViTransactionsOnMccs6012And6051,+ #[serde(rename = "861")]+ RoutingNumberDidNotMatchOneOnFileForToken,+ #[serde(rename = "877")]+ InvalidPayPageRegistrationId,+ #[serde(rename = "878")]+ ExpiredPayPageRegistrationId,+ #[serde(rename = "879")]+ MerchantIsNotAuthorizedForPayPage,+ #[serde(rename = "890")]+ MaximumNumberOfUpdatesForThisTokenExceeded,+ #[serde(rename = "891")]+ TooManyTokensCreatedForExistingNamespace,+ #[serde(rename = "895")]+ PinValidationNotPossible,+ #[serde(rename = "898")]+ GenericTokenRegistrationError,+ #[serde(rename = "899")]+ GenericTokenUseError,+ #[serde(rename = "900")]+ InvalidBankRoutingNumber,+ #[serde(rename = "901")]+ MissingName,+ #[serde(rename = "902")]+ InvalidName,+ #[serde(rename = "903")]+ MissingBillingCountryCode,+ #[serde(rename = "904")]+ InvalidIban,+ #[serde(rename = "905")]+ MissingEmailAddress,+ #[serde(rename = "906")]+ MissingMandateReference,+ #[serde(rename = "907")]+ InvalidMandateReference,+ #[serde(rename = "908")]+ MissingMandateUrl,+ #[serde(rename = "909")]+ InvalidMandateUrl,+ #[serde(rename = "911")]+ MissingMandateSignatureDate,+ #[serde(rename = "912")]+ InvalidMandateSignatureDate,+ #[serde(rename = "913")]+ RecurringMandateAlreadyExists,+ #[serde(rename = "914")]+ RecurringMandateWasNotFound,+ #[serde(rename = "915")]+ FinalRecurringWasAlreadyReceivedUsingThisMandate,+ #[serde(rename = "916")]+ IbanDidNotMatchOneOnFileForMandate,+ #[serde(rename = "917")]+ InvalidBillingCountry,+ #[serde(rename = "922")]+ ExpirationDateRequiredForInteracTransaction,+ #[serde(rename = "923")]+ TransactionTypeIsNotSupportedWithThisMethodOfPayment,+ #[serde(rename = "924")]+ UnreferencedOrphanRefundsAreNotAllowed,+ #[serde(rename = "939")]+ UnableToVoidATransactionWithAHeldState,+ #[serde(rename = "940")]+ ThisFundingInstructionResultsInANegativeAccountBalance,+ #[serde(rename = "941")]+ AccountBalanceInformationUnavailableAtThisTime,+ #[serde(rename = "942")]+ TheSubmittedCardIsNotEligibleForFastAccessFunding,+ #[serde(rename = "943")]+ TransactionCannotUseBothCcdPaymentInformationAndCtxPaymentInformation,+ #[serde(rename = "944")]+ ProcessingError,+ #[serde(rename = "945")]+ ThisFundingInstructionTypeIsInvalidForCanadianMerchants,+ #[serde(rename = "946")]+ CtxAndCcdRecordsAreNotAllowedForCanadianMerchants,+ #[serde(rename = "947")]+ CanadianAccountNumberCannotExceed12Digits,+ #[serde(rename = "948")]+ ThisFundingInstructionTypeIsInvalid,+ #[serde(rename = "950")]+ DeclineNegativeInformationOnFile,+ #[serde(rename = "951")]+ AbsoluteDecline,+ #[serde(rename = "952")]+ TheMerchantProfileDoesNotAllowTheRequestedOperation,+ #[serde(rename = "953")]+ TheAccountCannotAcceptAchTransactions,+ #[serde(rename = "954")]+ TheAccountCannotAcceptAchTransactionsOrSiteDrafts,+ #[serde(rename = "955")]+ AmountGreaterThanLimitSpecifiedInTheMerchantProfile,+ #[serde(rename = "956")]+ MerchantIsNotAuthorizedToPerformECheckVerificationTransactions,+ #[serde(rename = "957")]+ FirstNameAndLastNameRequiredForECheckVerifications,+ #[serde(rename = "958")]+ CompanyNameRequiredForCorporateAccountForECheckVerifications,+ #[serde(rename = "959")]+ PhoneNumberRequiredForECheckVerifications,+ #[serde(rename = "961")]+ CardBrandTokenNotSupported,+ #[serde(rename = "962")]+ PrivateLabelCardNotSupported,+ #[serde(rename = "965")]+ AllowedDailyDirectDebitCaptureECheckSaleLimitExceeded,+ #[serde(rename = "966")]+ AllowedDailyDirectDebitCreditECheckCreditLimitExceeded,+ #[serde(rename = "973")]+ AccountNotEligibleForRtp,+ #[serde(rename = "980")]+ SoftDeclineCustomerAuthenticationRequired,+ #[serde(rename = "981")]+ TransactionNotReversedVoidWorkflowNeedToBeInvoked,+ #[serde(rename = "982")]+ TransactionReversalNotSupportedForTheCoreMerchants,+ #[serde(rename = "983")]+ NoValidParentDepositOrParentRefundFound,+ #[serde(rename = "984")]+ TransactionReversalNotEnabledForVisa,+ #[serde(rename = "985")]+ TransactionReversalNotEnabledForMastercard,+ #[serde(rename = "986")]+ TransactionReversalNotEnabledForAmEx,+ #[serde(rename = "987")]+ TransactionReversalNotEnabledForDiscover,+ #[serde(rename = "988")]+ TransactionReversalNotSupported,+ #[serde(rename = "990")]+ FundingInstructionHeldPleaseContactYourRelationshipManager,+ #[serde(rename = "991")]+ MissingAddressInformation,+ #[serde(rename = "992")]+ CryptographicFailure,+ #[serde(rename = "993")]+ InvalidRegionCode,+ #[serde(rename = "994")]+ InvalidCountryCode,+ #[serde(rename = "995")]+ InvalidCreditAccount,+ #[serde(rename = "996")]+ InvalidCheckingAccount,+ #[serde(rename = "997")]+ InvalidSavingsAccount,+ #[serde(rename = "998")]+ InvalidUseOfMccCorrectAndReattempt,+ #[serde(rename = "999")]+ ExceedsRtpTransactionLimit,+}++#[derive(Debug, Serialize, Deserialize, PartialEq, Clone, Copy)]+pub enum WorldpayvantivPaymentFlow {+ Sale,+ Auth,+ Capture,+ Void,+}++fn get_attempt_status(+ flow: WorldpayvantivPaymentFlow,+ response: WorldpayvantivResponseCode,+) -> Result<common_enums::AttemptStatus, errors::ConnectorError> {+ match response {+ WorldpayvantivResponseCode::Approved+ | WorldpayvantivResponseCode::PartiallyApproved+ | WorldpayvantivResponseCode::OfflineApproval+ | WorldpayvantivResponseCode::OfflineApprovalUnableToGoOnline+ | WorldpayvantivResponseCode::ConsumerNonReloadablePrepaidCardApproved+ | WorldpayvantivResponseCode::ConsumerSingleUseVirtualCardNumberApproved+ | WorldpayvantivResponseCode::ScheduledRecurringPaymentProcessed+ | WorldpayvantivResponseCode::ApprovedRecurringSubscriptionCreated+ => match flow {+ WorldpayvantivPaymentFlow::Sale => Ok(common_enums::AttemptStatus::Charged),+ WorldpayvantivPaymentFlow::Auth => Ok(common_enums::AttemptStatus::Authorized),+ WorldpayvantivPaymentFlow::Capture => Ok(common_enums::AttemptStatus::Charged),+ WorldpayvantivPaymentFlow::Void => Ok(common_enums::AttemptStatus::Voided),+ }+ WorldpayvantivResponseCode::PendingShopperCheckoutCompletion+ | WorldpayvantivResponseCode::TransactionReceived => {+ Ok(common_enums::AttemptStatus::Pending)+ }++ WorldpayvantivResponseCode::ShopperCheckoutExpired+ | WorldpayvantivResponseCode::ProcessingNetworkUnavailable+ | WorldpayvantivResponseCode::IssuerUnavailable+ | WorldpayvantivResponseCode::ReSubmitTransaction+ | WorldpayvantivResponseCode::TryAgainLater+ | WorldpayvantivResponseCode::InsufficientFunds+ | WorldpayvantivResponseCode::AuthorizationAmountHasAlreadyBeenDepleted+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter1Hour+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter24Hour+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter2Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter4Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter6Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter8Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter10Days+ | WorldpayvantivResponseCode::CallIssuer+ | WorldpayvantivResponseCode::CallAmex+ | WorldpayvantivResponseCode::CallDinersClub+ | WorldpayvantivResponseCode::CallDiscover+ | WorldpayvantivResponseCode::CallJbs+ | WorldpayvantivResponseCode::CallVisaMastercard+ | WorldpayvantivResponseCode::CallIssuerUpdateCardholderData+ | WorldpayvantivResponseCode::ExceedsApprovalAmountLimit+ | WorldpayvantivResponseCode::CallIndicatedNumber+ | WorldpayvantivResponseCode::UnacceptablePinTransactionDeclinedRetry+ | WorldpayvantivResponseCode::PinNotChanged+ | WorldpayvantivResponseCode::ConsumerMultiUseVirtualCardNumberSoftDecline+ | WorldpayvantivResponseCode::ConsumerNonReloadablePrepaidCardSoftDecline+ | WorldpayvantivResponseCode::ConsumerSingleUseVirtualCardNumberSoftDecline+ | WorldpayvantivResponseCode::UpdateCardholderData+ | WorldpayvantivResponseCode::MerchantDoesntQualifyForProductCode+ | WorldpayvantivResponseCode::Lifecycle+ | WorldpayvantivResponseCode::Policy+ | WorldpayvantivResponseCode::FraudSecurity+ | WorldpayvantivResponseCode::InvalidOrExpiredCardContactCardholderToUpdate+ | WorldpayvantivResponseCode::InvalidTransactionOrCardRestrictionVerifyInformationAndResubmit+ | WorldpayvantivResponseCode::AtLeastOneOfOrigIdOrOrigCnpTxnIdIsRequired+ | WorldpayvantivResponseCode::OrigCnpTxnIdIsRequiredWhenShowStatusOnlyIsUsed+ | WorldpayvantivResponseCode::IncrementalAuthNotSupported+ | WorldpayvantivResponseCode::SetAuthIndicatorToIncremental+ | WorldpayvantivResponseCode::IncrementalValueForAuthIndicatorNotAllowedInThisAuthStructure+ | WorldpayvantivResponseCode::CannotRequestAnIncrementalAuthIfOriginalAuthNotSetToEstimated+ | WorldpayvantivResponseCode::TransactionMustReferenceTheEstimatedAuth+ | WorldpayvantivResponseCode::IncrementedAuthExceedsMaxTransactionAmount+ | WorldpayvantivResponseCode::SubmittedMccNotAllowed+ | WorldpayvantivResponseCode::MerchantNotCertifiedEnabledForIias+ | WorldpayvantivResponseCode::IssuerGeneratedError+ | WorldpayvantivResponseCode::PickupCardOtherThanLostStolen+ | WorldpayvantivResponseCode::InvalidAmountHardDecline+ | WorldpayvantivResponseCode::ReversalUnsuccessful+ | WorldpayvantivResponseCode::MissingData+ | WorldpayvantivResponseCode::PickupCardLostCard+ | WorldpayvantivResponseCode::PickupCardStolenCard+ | WorldpayvantivResponseCode::RestrictedCard+ | WorldpayvantivResponseCode::InvalidDeactivate+ | WorldpayvantivResponseCode::CardAlreadyActive+ | WorldpayvantivResponseCode::CardNotActive+ | WorldpayvantivResponseCode::CardAlreadyDeactivate+ | WorldpayvantivResponseCode::OverMaxBalance+ | WorldpayvantivResponseCode::InvalidActivate+ | WorldpayvantivResponseCode::NoTransactionFoundForReversal+ | WorldpayvantivResponseCode::IncorrectCvv+ | WorldpayvantivResponseCode::IllegalTransaction+ | WorldpayvantivResponseCode::DuplicateTransaction+ | WorldpayvantivResponseCode::SystemError+ | WorldpayvantivResponseCode::DeconvertedBin+ | WorldpayvantivResponseCode::MerchantDepleted+ | WorldpayvantivResponseCode::GiftCardEscheated+ | WorldpayvantivResponseCode::InvalidReversalTypeForCreditCardTransaction+ | WorldpayvantivResponseCode::SystemErrorMessageFormatError+ | WorldpayvantivResponseCode::SystemErrorCannotProcess+ | WorldpayvantivResponseCode::RefundRejectedDueToPendingDepositStatus+ | WorldpayvantivResponseCode::RefundRejectedDueToDeclinedDepositStatus+ | WorldpayvantivResponseCode::RefundRejectedByTheProcessingNetwork+ | WorldpayvantivResponseCode::CaptureCreditAndAuthReversalTagsCannotBeUsedForGiftCardTransactions+ | WorldpayvantivResponseCode::InvalidAccountNumber+ | WorldpayvantivResponseCode::AccountNumberDoesNotMatchPaymentType+ | WorldpayvantivResponseCode::PickUpCard+ | WorldpayvantivResponseCode::LostStolenCard+ | WorldpayvantivResponseCode::ExpiredCard+ | WorldpayvantivResponseCode::AuthorizationHasExpiredNoNeedToReverse+ | WorldpayvantivResponseCode::RestrictedCardSoftDecline+ | WorldpayvantivResponseCode::RestrictedCardChargeback+ | WorldpayvantivResponseCode::RestrictedCardPrepaidCardFilteringService+ | WorldpayvantivResponseCode::InvalidTrackData+ | WorldpayvantivResponseCode::DepositIsAlreadyReferencedByAChargeback+ | WorldpayvantivResponseCode::RestrictedCardInternationalCardFilteringService+ | WorldpayvantivResponseCode::InternationalFilteringForIssuingCardCountry+ | WorldpayvantivResponseCode::RestrictedCardAuthFraudVelocityFilteringService+ | WorldpayvantivResponseCode::AutomaticRefundAlreadyIssued+ | WorldpayvantivResponseCode::RestrictedCardAuthFraudAdviceFilteringService+ | WorldpayvantivResponseCode::RestrictedCardFraudAvsFilteringService+ | WorldpayvantivResponseCode::InvalidExpirationDate+ | WorldpayvantivResponseCode::InvalidMerchant+ | WorldpayvantivResponseCode::InvalidTransaction+ | WorldpayvantivResponseCode::NoSuchIssuer+ | WorldpayvantivResponseCode::InvalidPin+ | WorldpayvantivResponseCode::TransactionNotAllowedAtTerminal+ | WorldpayvantivResponseCode::ExceedsNumberOfPinEntries+ | WorldpayvantivResponseCode::CardholderTransactionNotPermitted+ | WorldpayvantivResponseCode::CardholderRequestedThatRecurringOrInstallmentPaymentBeStopped+ | WorldpayvantivResponseCode::InvalidPaymentType+ | WorldpayvantivResponseCode::InvalidPosCapabilityForCardholderAuthorizedTerminalTransaction+ | WorldpayvantivResponseCode::InvalidPosCardholderIdForCardholderAuthorizedTerminalTransaction+ | WorldpayvantivResponseCode::ThisMethodOfPaymentDoesNotSupportAuthorizationReversals+ | WorldpayvantivResponseCode::ReversalAmountDoesNotMatchAuthorizationAmount+ | WorldpayvantivResponseCode::TransactionDidNotConvertToPinless+ | WorldpayvantivResponseCode::InvalidAmountSoftDecline+ | WorldpayvantivResponseCode::InvalidHealthcareAmounts+ | WorldpayvantivResponseCode::InvalidBillingDescriptorPrefix+ | WorldpayvantivResponseCode::InvalidBillingDescriptor+ | WorldpayvantivResponseCode::InvalidReportGroup+ | WorldpayvantivResponseCode::DoNotHonor+ | WorldpayvantivResponseCode::GenericDecline+ | WorldpayvantivResponseCode::DeclineRequestPositiveId+ | WorldpayvantivResponseCode::DeclineCvv2CidFail+ | WorldpayvantivResponseCode::ThreeDSecureTransactionNotSupportedByMerchant+ | WorldpayvantivResponseCode::InvalidPurchaseLevelIiiTheTransactionContainedBadOrMissingData+ | WorldpayvantivResponseCode::MissingHealthcareIiasTagForAnFsaTransaction+ | WorldpayvantivResponseCode::RestrictedByVantivDueToSecurityCodeMismatch+ | WorldpayvantivResponseCode::NoTransactionFoundWithSpecifiedTransactionId+ | WorldpayvantivResponseCode::AuthorizationNoLongerAvailable+ | WorldpayvantivResponseCode::TransactionNotVoidedAlreadySettled+ | WorldpayvantivResponseCode::AutoVoidOnRefund+ | WorldpayvantivResponseCode::InvalidAccountNumberOriginalOrNocUpdatedECheckAccountRequired+ | WorldpayvantivResponseCode::TotalCreditAmountExceedsCaptureAmount+ | WorldpayvantivResponseCode::ExceedTheThresholdForSendingRedeposits+ | WorldpayvantivResponseCode::DepositHasNotBeenReturnedForInsufficientNonSufficientFunds+ | WorldpayvantivResponseCode::InvalidCheckNumber+ | WorldpayvantivResponseCode::RedepositAgainstInvalidTransactionType+ | WorldpayvantivResponseCode::InternalSystemErrorCallVantiv+ | WorldpayvantivResponseCode::OriginalTransactionHasBeenProcessedFutureRedepositsCanceled+ | WorldpayvantivResponseCode::SoftDeclineAutoRecyclingInProgress+ | WorldpayvantivResponseCode::HardDeclineAutoRecyclingComplete+ | WorldpayvantivResponseCode::RestrictedCardCardUnderSanction+ | WorldpayvantivResponseCode::MerchantIsNotEnabledForSurcharging+ | WorldpayvantivResponseCode::ThisMethodOfPaymentDoesNotSupportSurcharging+ | WorldpayvantivResponseCode::SurchargeIsNotValidForDebitOrPrepaidCards+ | WorldpayvantivResponseCode::SurchargeCannotExceedsTheMaximumAllowedLimit+ | WorldpayvantivResponseCode::TransactionDeclinedByTheProcessingNetwork+ | WorldpayvantivResponseCode::SecondaryAmountCannotExceedTheSaleAmount+ | WorldpayvantivResponseCode::ThisMethodOfPaymentDoesNotSupportSecondaryAmount+ | WorldpayvantivResponseCode::SecondaryAmountCannotBeLessThanZero+ | WorldpayvantivResponseCode::PartialTransactionIsNotSupportedWhenIncludingASecondaryAmount+ | WorldpayvantivResponseCode::SecondaryAmountRequiredOnPartialRefundWhenUsedOnDeposit+ | WorldpayvantivResponseCode::SecondaryAmountNotAllowedOnRefundIfNotIncludedOnDeposit+ | WorldpayvantivResponseCode::ProcessingNetworkError+ | WorldpayvantivResponseCode::InvalidEMail+ | WorldpayvantivResponseCode::InvalidCombinationOfAccountFundingTransactionTypeAndMcc+ | WorldpayvantivResponseCode::InvalidAccountFundingTransactionTypeForThisMethodOfPayment+ | WorldpayvantivResponseCode::MissingOneOrMoreReceiverFieldsForAccountFundingTransaction+ | WorldpayvantivResponseCode::InvalidRecurringRequestSeeRecurringResponseForDetails+ | WorldpayvantivResponseCode::ParentTransactionDeclinedRecurringSubscriptionNotCreated+ | WorldpayvantivResponseCode::InvalidPlanCode+ | WorldpayvantivResponseCode::InvalidSubscriptionId+ | WorldpayvantivResponseCode::AddOnCodeAlreadyExists+ | WorldpayvantivResponseCode::DuplicateAddOnCodesInRequests+ | WorldpayvantivResponseCode::NoMatchingAddOnCodeForTheSubscription+ | WorldpayvantivResponseCode::NoMatchingDiscountCodeForTheSubscription+ | WorldpayvantivResponseCode::DuplicateDiscountCodesInRequest+ | WorldpayvantivResponseCode::InvalidStartDate+ | WorldpayvantivResponseCode::MerchantNotRegisteredForRecurringEngine+ | WorldpayvantivResponseCode::InsufficientDataToUpdateSubscription+ | WorldpayvantivResponseCode::InvalidBillingDate+ | WorldpayvantivResponseCode::DiscountCodeAlreadyExists+ | WorldpayvantivResponseCode::PlanCodeAlreadyExists+ | WorldpayvantivResponseCode::TheAccountNumberWasChanged+ | WorldpayvantivResponseCode::TheAccountWasClosed+ | WorldpayvantivResponseCode::TheExpirationDateWasChanged+ | WorldpayvantivResponseCode::TheIssuingBankDoesNotParticipateInTheUpdateProgram+ | WorldpayvantivResponseCode::ContactTheCardholderForUpdatedInformation+ | WorldpayvantivResponseCode::TheCardholderHasOptedOutOfTheUpdateProgram+ | WorldpayvantivResponseCode::SoftDeclineCardReaderDecryptionServiceIsNotAvailable+ | WorldpayvantivResponseCode::SoftDeclineDecryptionFailed+ | WorldpayvantivResponseCode::HardDeclineInputDataIsInvalid+ | WorldpayvantivResponseCode::ApplePayKeyMismatch+ | WorldpayvantivResponseCode::ApplePayDecryptionFailed+ | WorldpayvantivResponseCode::HardDeclineDecryptionFailed+ | WorldpayvantivResponseCode::MerchantNotConfiguredForProcessingAtThisSite+ | WorldpayvantivResponseCode::AdvancedFraudFilterScoreBelowThreshold+ | WorldpayvantivResponseCode::SuspectedFraud+ | WorldpayvantivResponseCode::SystemErrorContactWorldpayRepresentative+ | WorldpayvantivResponseCode::AmazonPayAmazonUnavailable+ | WorldpayvantivResponseCode::AmazonPayAmazonDeclined+ | WorldpayvantivResponseCode::AmazonPayInvalidToken+ | WorldpayvantivResponseCode::MerchantNotEnabledForAmazonPay+ | WorldpayvantivResponseCode::TransactionNotSupportedBlockedByIssuer+ | WorldpayvantivResponseCode::BlockedByCardholderContactCardholder+ | WorldpayvantivResponseCode::SoftDeclinePrimaryFundingSourceFailed+ | WorldpayvantivResponseCode::SoftDeclineBuyerHasAlternateFundingSource+ | WorldpayvantivResponseCode::HardDeclineInvalidBillingAgreementId+ | WorldpayvantivResponseCode::HardDeclinePrimaryFundingSourceFailed+ | WorldpayvantivResponseCode::HardDeclineIssueWithPaypalAccount+ | WorldpayvantivResponseCode::HardDeclinePayPalAuthorizationIdMissing+ | WorldpayvantivResponseCode::HardDeclineConfirmedEmailAddressIsNotAvailable+ | WorldpayvantivResponseCode::HardDeclinePayPalBuyerAccountDenied+ | WorldpayvantivResponseCode::HardDeclinePayPalBuyerAccountRestricted+ | WorldpayvantivResponseCode::HardDeclinePayPalOrderHasBeenVoidedExpiredOrCompleted+ | WorldpayvantivResponseCode::HardDeclineIssueWithPayPalRefund+ | WorldpayvantivResponseCode::HardDeclinePayPalCredentialsIssue+ | WorldpayvantivResponseCode::HardDeclinePayPalAuthorizationVoidedOrExpired+ | WorldpayvantivResponseCode::HardDeclineRequiredPayPalParameterMissing+ | WorldpayvantivResponseCode::HardDeclinePayPalTransactionIdOrAuthIdIsInvalid+ | WorldpayvantivResponseCode::HardDeclineExceededMaximumNumberOfPayPalAuthorizationAttempts+ | WorldpayvantivResponseCode::HardDeclineTransactionAmountExceedsMerchantsPayPalAccountLimit+ | WorldpayvantivResponseCode::HardDeclinePayPalFundingSourcesUnavailable+ | WorldpayvantivResponseCode::HardDeclineIssueWithPayPalPrimaryFundingSource+ | WorldpayvantivResponseCode::HardDeclinePayPalProfileDoesNotAllowThisTransactionType+ | WorldpayvantivResponseCode::InternalSystemErrorWithPayPalContactVantiv+ | WorldpayvantivResponseCode::HardDeclineContactPayPalConsumerForAnotherPaymentMethod+ | WorldpayvantivResponseCode::InvalidTerminalId+ | WorldpayvantivResponseCode::PinlessDebitProcessingNotSupportedForNonRecurringTransactions+ | WorldpayvantivResponseCode::PinlessDebitProcessingNotSupportedForPartialAuths+ | WorldpayvantivResponseCode::MerchantNotConfiguredForPinlessDebitProcessing+ | WorldpayvantivResponseCode::DeclineCustomerCancellation+ | WorldpayvantivResponseCode::DeclineReTryTransaction+ | WorldpayvantivResponseCode::DeclineUnableToLocateRecordOnFile+ | WorldpayvantivResponseCode::DeclineFileUpdateFieldEditError+ | WorldpayvantivResponseCode::RemoteFunctionUnknown+ | WorldpayvantivResponseCode::DeclinedExceedsWithdrawalFrequencyLimit+ | WorldpayvantivResponseCode::DeclineCardRecordNotAvailable+ | WorldpayvantivResponseCode::InvalidAuthorizationCode+ | WorldpayvantivResponseCode::ReconciliationError+ | WorldpayvantivResponseCode::PreferredDebitRoutingDenialCreditTransactionCanBeDebit+ | WorldpayvantivResponseCode::DeclinedCurrencyConversionCompleteNoAuthPerformed+ | WorldpayvantivResponseCode::DeclinedMultiCurrencyDccFail+ | WorldpayvantivResponseCode::DeclinedMultiCurrencyInvertFail+ | WorldpayvantivResponseCode::Invalid3DSecurePassword+ | WorldpayvantivResponseCode::InvalidSocialSecurityNumber+ | WorldpayvantivResponseCode::InvalidMothersMaidenName+ | WorldpayvantivResponseCode::EnrollmentInquiryDeclined+ | WorldpayvantivResponseCode::SocialSecurityNumberNotAvailable+ | WorldpayvantivResponseCode::MothersMaidenNameNotAvailable+ | WorldpayvantivResponseCode::PinAlreadyExistsOnDatabase+ | WorldpayvantivResponseCode::Under18YearsOld+ | WorldpayvantivResponseCode::BillToOutsideUsa+ | WorldpayvantivResponseCode::BillToAddressIsNotEqualToShipToAddress+ | WorldpayvantivResponseCode::DeclinedForeignCurrencyMustBeUsd+ | WorldpayvantivResponseCode::OnNegativeFile+ | WorldpayvantivResponseCode::BlockedAgreement+ | WorldpayvantivResponseCode::InsufficientBuyingPower+ | WorldpayvantivResponseCode::InvalidData+ | WorldpayvantivResponseCode::InvalidDataDataElementsMissing+ | WorldpayvantivResponseCode::InvalidDataDataFormatError+ | WorldpayvantivResponseCode::InvalidDataInvalidTCVersion+ | WorldpayvantivResponseCode::DuplicateTransactionPaypalCredit+ | WorldpayvantivResponseCode::VerifyBillingAddress+ | WorldpayvantivResponseCode::InactiveAccount+ | WorldpayvantivResponseCode::InvalidAuth+ | WorldpayvantivResponseCode::AuthorizationAlreadyExistsForTheOrder+ | WorldpayvantivResponseCode::LodgingTransactionsAreNotAllowedForThisMcc+ | WorldpayvantivResponseCode::DurationCannotBeNegative+ | WorldpayvantivResponseCode::HotelFolioNumberCannotBeBlank+ | WorldpayvantivResponseCode::InvalidCheckInDate+ | WorldpayvantivResponseCode::InvalidCheckOutDate+ | WorldpayvantivResponseCode::InvalidCheckInOrCheckOutDate+ | WorldpayvantivResponseCode::CheckOutDateCannotBeBeforeCheckInDate+ | WorldpayvantivResponseCode::NumberOfAdultsCannotBeNegative+ | WorldpayvantivResponseCode::RoomRateCannotBeNegative+ | WorldpayvantivResponseCode::RoomTaxCannotBeNegative+ | WorldpayvantivResponseCode::DurationCanOnlyBeFrom0To99ForVisa+ | WorldpayvantivResponseCode::MerchantIsNotAuthorizedForTokens+ | WorldpayvantivResponseCode::CreditCardNumberWasInvalid+ | WorldpayvantivResponseCode::TokenWasNotFound+ | WorldpayvantivResponseCode::TokenInvalid+ | WorldpayvantivResponseCode::MerchantNotAuthorizedForECheckTokens+ | WorldpayvantivResponseCode::CheckoutIdWasInvalid+ | WorldpayvantivResponseCode::CheckoutIdWasNotFound+ | WorldpayvantivResponseCode::GenericCheckoutIdError+ | WorldpayvantivResponseCode::CaptureAmountCanNotBeMoreThanAuthorizedAmount+ | WorldpayvantivResponseCode::TaxBillingOnlyAllowedForMcc9311+ | WorldpayvantivResponseCode::Mcc9311RequiresTaxTypeElement+ | WorldpayvantivResponseCode::DebtRepaymentOnlyAllowedForViTransactionsOnMccs6012And6051+ | WorldpayvantivResponseCode::RoutingNumberDidNotMatchOneOnFileForToken+ | WorldpayvantivResponseCode::InvalidPayPageRegistrationId+ | WorldpayvantivResponseCode::ExpiredPayPageRegistrationId+ | WorldpayvantivResponseCode::MerchantIsNotAuthorizedForPayPage+ | WorldpayvantivResponseCode::MaximumNumberOfUpdatesForThisTokenExceeded+ | WorldpayvantivResponseCode::TooManyTokensCreatedForExistingNamespace+ | WorldpayvantivResponseCode::PinValidationNotPossible+ | WorldpayvantivResponseCode::GenericTokenRegistrationError+ | WorldpayvantivResponseCode::GenericTokenUseError+ | WorldpayvantivResponseCode::InvalidBankRoutingNumber+ | WorldpayvantivResponseCode::MissingName+ | WorldpayvantivResponseCode::InvalidName+ | WorldpayvantivResponseCode::MissingBillingCountryCode+ | WorldpayvantivResponseCode::InvalidIban+ | WorldpayvantivResponseCode::MissingEmailAddress+ | WorldpayvantivResponseCode::MissingMandateReference+ | WorldpayvantivResponseCode::InvalidMandateReference+ | WorldpayvantivResponseCode::MissingMandateUrl+ | WorldpayvantivResponseCode::InvalidMandateUrl+ | WorldpayvantivResponseCode::MissingMandateSignatureDate+ | WorldpayvantivResponseCode::InvalidMandateSignatureDate+ | WorldpayvantivResponseCode::RecurringMandateAlreadyExists+ | WorldpayvantivResponseCode::RecurringMandateWasNotFound+ | WorldpayvantivResponseCode::FinalRecurringWasAlreadyReceivedUsingThisMandate+ | WorldpayvantivResponseCode::IbanDidNotMatchOneOnFileForMandate+ | WorldpayvantivResponseCode::InvalidBillingCountry+ | WorldpayvantivResponseCode::ExpirationDateRequiredForInteracTransaction+ | WorldpayvantivResponseCode::TransactionTypeIsNotSupportedWithThisMethodOfPayment+ | WorldpayvantivResponseCode::UnreferencedOrphanRefundsAreNotAllowed+ | WorldpayvantivResponseCode::UnableToVoidATransactionWithAHeldState+ | WorldpayvantivResponseCode::ThisFundingInstructionResultsInANegativeAccountBalance+ | WorldpayvantivResponseCode::AccountBalanceInformationUnavailableAtThisTime+ | WorldpayvantivResponseCode::TheSubmittedCardIsNotEligibleForFastAccessFunding+ | WorldpayvantivResponseCode::TransactionCannotUseBothCcdPaymentInformationAndCtxPaymentInformation+ | WorldpayvantivResponseCode::ProcessingError+ | WorldpayvantivResponseCode::ThisFundingInstructionTypeIsInvalidForCanadianMerchants+ | WorldpayvantivResponseCode::CtxAndCcdRecordsAreNotAllowedForCanadianMerchants+ | WorldpayvantivResponseCode::CanadianAccountNumberCannotExceed12Digits+ | WorldpayvantivResponseCode::ThisFundingInstructionTypeIsInvalid+ | WorldpayvantivResponseCode::DeclineNegativeInformationOnFile+ | WorldpayvantivResponseCode::AbsoluteDecline+ | WorldpayvantivResponseCode::TheMerchantProfileDoesNotAllowTheRequestedOperation+ | WorldpayvantivResponseCode::TheAccountCannotAcceptAchTransactions+ | WorldpayvantivResponseCode::TheAccountCannotAcceptAchTransactionsOrSiteDrafts+ | WorldpayvantivResponseCode::AmountGreaterThanLimitSpecifiedInTheMerchantProfile+ | WorldpayvantivResponseCode::MerchantIsNotAuthorizedToPerformECheckVerificationTransactions+ | WorldpayvantivResponseCode::FirstNameAndLastNameRequiredForECheckVerifications+ | WorldpayvantivResponseCode::CompanyNameRequiredForCorporateAccountForECheckVerifications+ | WorldpayvantivResponseCode::PhoneNumberRequiredForECheckVerifications+ | WorldpayvantivResponseCode::CardBrandTokenNotSupported+ | WorldpayvantivResponseCode::PrivateLabelCardNotSupported+ | WorldpayvantivResponseCode::AllowedDailyDirectDebitCaptureECheckSaleLimitExceeded+ | WorldpayvantivResponseCode::AllowedDailyDirectDebitCreditECheckCreditLimitExceeded+ | WorldpayvantivResponseCode::AccountNotEligibleForRtp+ | WorldpayvantivResponseCode::SoftDeclineCustomerAuthenticationRequired+ | WorldpayvantivResponseCode::TransactionNotReversedVoidWorkflowNeedToBeInvoked+ | WorldpayvantivResponseCode::TransactionReversalNotSupportedForTheCoreMerchants+ | WorldpayvantivResponseCode::NoValidParentDepositOrParentRefundFound+ | WorldpayvantivResponseCode::TransactionReversalNotEnabledForVisa+ | WorldpayvantivResponseCode::TransactionReversalNotEnabledForMastercard+ | WorldpayvantivResponseCode::TransactionReversalNotEnabledForAmEx+ | WorldpayvantivResponseCode::TransactionReversalNotEnabledForDiscover+ | WorldpayvantivResponseCode::TransactionReversalNotSupported+ | WorldpayvantivResponseCode::FundingInstructionHeldPleaseContactYourRelationshipManager+ | WorldpayvantivResponseCode::MissingAddressInformation+ | WorldpayvantivResponseCode::CryptographicFailure+ | WorldpayvantivResponseCode::InvalidRegionCode+ | WorldpayvantivResponseCode::InvalidCountryCode+ | WorldpayvantivResponseCode::InvalidCreditAccount+ | WorldpayvantivResponseCode::InvalidCheckingAccount+ | WorldpayvantivResponseCode::InvalidSavingsAccount+ | WorldpayvantivResponseCode::InvalidUseOfMccCorrectAndReattempt+ | WorldpayvantivResponseCode::ExceedsRtpTransactionLimit+ => match flow {+ WorldpayvantivPaymentFlow::Sale+ | WorldpayvantivPaymentFlow::Auth => Ok(common_enums::AttemptStatus::Failure),+ WorldpayvantivPaymentFlow::Capture => Ok(common_enums::AttemptStatus::CaptureFailed),+ WorldpayvantivPaymentFlow::Void => Ok(common_enums::AttemptStatus::VoidFailed)+ }+ _ => {+ Err(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from("Invalid response code ".to_string()),+ ))+ }+ }+}++fn get_refund_status(+ response: WorldpayvantivResponseCode,+) -> Result<common_enums::RefundStatus, errors::ConnectorError> {+ match response {+ WorldpayvantivResponseCode::Approved+ | WorldpayvantivResponseCode::PartiallyApproved+ | WorldpayvantivResponseCode::OfflineApproval+ | WorldpayvantivResponseCode::OfflineApprovalUnableToGoOnline => {+ Ok(common_enums::RefundStatus::Success)+ },+ WorldpayvantivResponseCode::TransactionReceived => Ok(common_enums::RefundStatus::Pending),+ WorldpayvantivResponseCode::ProcessingNetworkUnavailable+ | WorldpayvantivResponseCode::IssuerUnavailable+ | WorldpayvantivResponseCode::ReSubmitTransaction+ | WorldpayvantivResponseCode::MerchantNotConfiguredForProcessingAtThisSite+ | WorldpayvantivResponseCode::TryAgainLater+ | WorldpayvantivResponseCode::InsufficientFunds+ | WorldpayvantivResponseCode::AuthorizationAmountHasAlreadyBeenDepleted+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter1Hour+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter24Hour+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter2Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter4Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter6Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter8Days+ | WorldpayvantivResponseCode::InsufficientFundsRetryAfter10Days+ | WorldpayvantivResponseCode::CallIssuer+ | WorldpayvantivResponseCode::CallAmex+ | WorldpayvantivResponseCode::CallDinersClub+ | WorldpayvantivResponseCode::CallDiscover+ | WorldpayvantivResponseCode::CallJbs+ | WorldpayvantivResponseCode::CallVisaMastercard+ | WorldpayvantivResponseCode::ExceedsApprovalAmountLimit+ | WorldpayvantivResponseCode::CallIndicatedNumber+ | WorldpayvantivResponseCode::ConsumerMultiUseVirtualCardNumberSoftDecline+ | WorldpayvantivResponseCode::ConsumerNonReloadablePrepaidCardSoftDecline+ | WorldpayvantivResponseCode::ConsumerSingleUseVirtualCardNumberSoftDecline+ | WorldpayvantivResponseCode::MerchantDoesntQualifyForProductCode+ | WorldpayvantivResponseCode::Lifecycle+ | WorldpayvantivResponseCode::Policy+ | WorldpayvantivResponseCode::InvalidOrExpiredCardContactCardholderToUpdate+ | WorldpayvantivResponseCode::InvalidTransactionOrCardRestrictionVerifyInformationAndResubmit+ | WorldpayvantivResponseCode::OriginalTransactionNotFound+ | WorldpayvantivResponseCode::QueryTransactionNotEnabled+ | WorldpayvantivResponseCode::AtLeastOneOfOrigIdOrOrigCnpTxnIdIsRequired+ | WorldpayvantivResponseCode::OrigCnpTxnIdIsRequiredWhenShowStatusOnlyIsUsed+ | WorldpayvantivResponseCode::TransactionMustReferenceTheEstimatedAuth+ | WorldpayvantivResponseCode::IncrementedAuthExceedsMaxTransactionAmount+ | WorldpayvantivResponseCode::SubmittedMccNotAllowed+ | WorldpayvantivResponseCode::TheMerchantIsNotRegisteredInTheUpdateProgram+ | WorldpayvantivResponseCode::MerchantNotCertifiedEnabledForIias+ | WorldpayvantivResponseCode::IssuerGeneratedError+ | WorldpayvantivResponseCode::InvalidAmountHardDecline+ | WorldpayvantivResponseCode::ReversalUnsuccessful+ | WorldpayvantivResponseCode::MissingData+ | WorldpayvantivResponseCode::InvalidDeactivate+ | WorldpayvantivResponseCode::OverMaxBalance+ | WorldpayvantivResponseCode::InvalidActivate+ | WorldpayvantivResponseCode::NoTransactionFoundForReversal+ | WorldpayvantivResponseCode::IllegalTransaction+ | WorldpayvantivResponseCode::DuplicateTransaction+ | WorldpayvantivResponseCode::SystemError+ | WorldpayvantivResponseCode::MerchantDepleted+ | WorldpayvantivResponseCode::InvalidReversalTypeForCreditCardTransaction+ | WorldpayvantivResponseCode::SystemErrorMessageFormatError+ | WorldpayvantivResponseCode::SystemErrorCannotProcess+ | WorldpayvantivResponseCode::RefundRejectedDueToPendingDepositStatus+ | WorldpayvantivResponseCode::RefundRejectedDueToDeclinedDepositStatus+ | WorldpayvantivResponseCode::RefundRejectedByTheProcessingNetwork+ | WorldpayvantivResponseCode::CaptureCreditAndAuthReversalTagsCannotBeUsedForGiftCardTransactions+ | WorldpayvantivResponseCode::InvalidAccountNumber+ | WorldpayvantivResponseCode::AuthorizationHasExpiredNoNeedToReverse+ | WorldpayvantivResponseCode::InvalidTrackData+ | WorldpayvantivResponseCode::DepositIsAlreadyReferencedByAChargeback+ | WorldpayvantivResponseCode::AutomaticRefundAlreadyIssued+ | WorldpayvantivResponseCode::InvalidMerchant+ | WorldpayvantivResponseCode::InvalidTransaction+ | WorldpayvantivResponseCode::TransactionNotAllowedAtTerminal+ | WorldpayvantivResponseCode::ThisMethodOfPaymentDoesNotSupportAuthorizationReversals+ | WorldpayvantivResponseCode::ReversalAmountDoesNotMatchAuthorizationAmount+ | WorldpayvantivResponseCode::InvalidAmountSoftDecline+ | WorldpayvantivResponseCode::InvalidReportGroup+ | WorldpayvantivResponseCode::DoNotHonor+ | WorldpayvantivResponseCode::GenericDecline+ | WorldpayvantivResponseCode::DeclineRequestPositiveId+ | WorldpayvantivResponseCode::ThreeDSecureTransactionNotSupportedByMerchant+ | WorldpayvantivResponseCode::RestrictedByVantivDueToSecurityCodeMismatch+ | WorldpayvantivResponseCode::NoTransactionFoundWithSpecifiedTransactionId+ | WorldpayvantivResponseCode::AuthorizationNoLongerAvailable+ | WorldpayvantivResponseCode::TransactionNotVoidedAlreadySettled+ | WorldpayvantivResponseCode::AutoVoidOnRefund+ | WorldpayvantivResponseCode::InvalidAccountNumberOriginalOrNocUpdatedECheckAccountRequired+ | WorldpayvantivResponseCode::TotalCreditAmountExceedsCaptureAmount+ | WorldpayvantivResponseCode::ExceedTheThresholdForSendingRedeposits+ | WorldpayvantivResponseCode::DepositHasNotBeenReturnedForInsufficientNonSufficientFunds+ | WorldpayvantivResponseCode::RedepositAgainstInvalidTransactionType+ | WorldpayvantivResponseCode::InternalSystemErrorCallVantiv+ | WorldpayvantivResponseCode::OriginalTransactionHasBeenProcessedFutureRedepositsCanceled+ | WorldpayvantivResponseCode::SoftDeclineAutoRecyclingInProgress+ | WorldpayvantivResponseCode::HardDeclineAutoRecyclingComplete+ | WorldpayvantivResponseCode::TransactionDeclinedByTheProcessingNetwork+ | WorldpayvantivResponseCode::SecondaryAmountCannotExceedTheSaleAmount+ | WorldpayvantivResponseCode::ThisMethodOfPaymentDoesNotSupportSecondaryAmount+ | WorldpayvantivResponseCode::SecondaryAmountCannotBeLessThanZero+ | WorldpayvantivResponseCode::PartialTransactionIsNotSupportedWhenIncludingASecondaryAmount+ | WorldpayvantivResponseCode::SecondaryAmountRequiredOnPartialRefundWhenUsedOnDeposit+ | WorldpayvantivResponseCode::SecondaryAmountNotAllowedOnRefundIfNotIncludedOnDeposit+ | WorldpayvantivResponseCode::ProcessingNetworkError+ | WorldpayvantivResponseCode::InvalidEMail+ | WorldpayvantivResponseCode::InvalidCombinationOfAccountFundingTransactionTypeAndMcc+ | WorldpayvantivResponseCode::InvalidAccountFundingTransactionTypeForThisMethodOfPayment+ | WorldpayvantivResponseCode::MissingOneOrMoreReceiverFieldsForAccountFundingTransaction+ | WorldpayvantivResponseCode::SoftDeclineDecryptionFailed+ | WorldpayvantivResponseCode::HardDeclineInputDataIsInvalid+ | WorldpayvantivResponseCode::HardDeclineDecryptionFailed+ | WorldpayvantivResponseCode::SuspectedFraud+ | WorldpayvantivResponseCode::SystemErrorContactWorldpayRepresentative+ | WorldpayvantivResponseCode::InvalidTerminalId+ | WorldpayvantivResponseCode::DeclineReTryTransaction+ | WorldpayvantivResponseCode::RemoteFunctionUnknown+ | WorldpayvantivResponseCode::InvalidData+ | WorldpayvantivResponseCode::InvalidDataDataElementsMissing+ | WorldpayvantivResponseCode::InvalidDataDataFormatError+ | WorldpayvantivResponseCode::VerifyBillingAddress+ | WorldpayvantivResponseCode::InactiveAccount+ | WorldpayvantivResponseCode::InvalidAuth+ | WorldpayvantivResponseCode::CheckoutIdWasInvalid+ | WorldpayvantivResponseCode::CheckoutIdWasNotFound+ | WorldpayvantivResponseCode::TransactionTypeIsNotSupportedWithThisMethodOfPayment+ | WorldpayvantivResponseCode::UnreferencedOrphanRefundsAreNotAllowed+ | WorldpayvantivResponseCode::ThisFundingInstructionResultsInANegativeAccountBalance+ | WorldpayvantivResponseCode::ProcessingError+ | WorldpayvantivResponseCode::ThisFundingInstructionTypeIsInvalidForCanadianMerchants+ | WorldpayvantivResponseCode::ThisFundingInstructionTypeIsInvalid+ | WorldpayvantivResponseCode::AbsoluteDecline+ | WorldpayvantivResponseCode::TheMerchantProfileDoesNotAllowTheRequestedOperation+ | WorldpayvantivResponseCode::AmountGreaterThanLimitSpecifiedInTheMerchantProfile+ | WorldpayvantivResponseCode::AccountNotEligibleForRtp+ | WorldpayvantivResponseCode::NoValidParentDepositOrParentRefundFound+ | WorldpayvantivResponseCode::FundingInstructionHeldPleaseContactYourRelationshipManager+ | WorldpayvantivResponseCode::InvalidCreditAccount => Ok(common_enums::RefundStatus::Failure),+ _ => {+ Err(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from("Invalid response code for refund".to_string()),+ ))+ }+ }}diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs b/crates/hyperswitch_connectors/src/connectors/worldpayxml.rsindex 8740fc8942..ef5dc46e7d 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs@@ -259,7 +259,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseDataworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}@@ -344,7 +344,7 @@ impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Worworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}@@ -432,7 +432,7 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> foworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}@@ -516,7 +516,7 @@ impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Woworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}@@ -602,7 +602,7 @@ impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Worldpaworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}@@ -685,7 +685,7 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayxworldpayxml::worldpayxml_constants::XML_VERSION,Some(worldpayxml::worldpayxml_constants::XML_ENCODING),None,- worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),)?;Ok(RequestContent::RawBytes(connector_req))}diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rsindex 780e0290fe..acbf0a620a 100644--- a/crates/hyperswitch_connectors/src/utils.rs+++ b/crates/hyperswitch_connectors/src/utils.rs@@ -6439,7 +6439,7 @@ impl XmlSerializer {xml_version: &str,xml_encoding: Option<&str>,xml_standalone: Option<&str>,- xml_doc_type: &str,+ xml_doc_type: Option<&str>,) -> Result<Vec<u8>, error_stack::Report<errors::ConnectorError>> {let mut xml_bytes = Vec::new();let mut writer = Writer::new(std::io::Cursor::new(&mut xml_bytes));@@ -6453,10 +6453,12 @@ impl XmlSerializer {.change_context(errors::ConnectorError::RequestEncodingFailed).attach_printable("Failed to write XML declaration")?;- writer- .write_event(Event::DocType(BytesText::from_escaped(xml_doc_type)))- .change_context(errors::ConnectorError::RequestEncodingFailed)- .attach_printable("Failed to write the XML declaration")?;+ if let Some(xml_doc_type_data) = xml_doc_type {+ writer+ .write_event(Event::DocType(BytesText::from_escaped(xml_doc_type_data)))+ .change_context(errors::ConnectorError::RequestEncodingFailed)+ .attach_printable("Failed to write the XML declaration")?;+ };let xml_body = quick_xml::se::to_string(&item).change_context(errors::ConnectorError::RequestEncodingFailed)diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rsindex 69cb4b97de..0a5dca9c0e 100644--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs@@ -1477,6 +1477,10 @@ fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {],),),+ (+ Connector::Worldpayvantiv,+ fields(vec![], card_basic(), vec![]),+ ),(Connector::Xendit,fields(diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rsindex 70c5f77754..0dc5d5fdd3 100644--- a/crates/router/src/core/admin.rs+++ b/crates/router/src/core/admin.rs@@ -1730,10 +1730,13 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {worldpay::transformers::WorldpayAuthType::try_from(self.auth_type)?;Ok(())}- // api_enums::Connector::Worldpayvantiv => {- // worldpayvantiv::transformers::WorldpayvantivAuthType::try_from(self.auth_type)?;- // Ok(())- // },+ api_enums::Connector::Worldpayvantiv => {+ worldpayvantiv::transformers::WorldpayvantivAuthType::try_from(self.auth_type)?;+ worldpayvantiv::transformers::WorldpayvantivMetadataObject::try_from(+ self.connector_meta_data,+ )?;+ Ok(())+ }api_enums::Connector::Worldpayxml => {worldpayxml::transformers::WorldpayxmlAuthType::try_from(self.auth_type)?;Ok(())diff --git a/crates/router/src/types/api.rs b/crates/router/src/types/api.rsindex bb6f871290..c4bc55bb83 100644--- a/crates/router/src/types/api.rs+++ b/crates/router/src/types/api.rs@@ -569,9 +569,9 @@ impl ConnectorData {enums::Connector::Worldpay => {Ok(ConnectorEnum::Old(Box::new(connector::Worldpay::new())))}- // enums::Connector::Worldpayvantiv => {- // Ok(ConnectorEnum::Old(Box::new(connector::Worldpayvantiv::new())))- // }+ enums::Connector::Worldpayvantiv => Ok(ConnectorEnum::Old(Box::new(+ connector::Worldpayvantiv::new(),+ ))),enums::Connector::Worldpayxml => {Ok(ConnectorEnum::Old(Box::new(connector::Worldpayxml::new())))}diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rsindex 162eb0b1dc..e1607c3b6b 100644--- a/crates/router/src/types/transformers.rs+++ b/crates/router/src/types/transformers.rs@@ -340,7 +340,7 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {api_enums::Connector::Wise => Self::Wise,api_enums::Connector::Worldline => Self::Worldline,api_enums::Connector::Worldpay => Self::Worldpay,- // api_enums::Connector::Worldpayvantiv => Self::Worldpayvantiv,+ api_enums::Connector::Worldpayvantiv => Self::Worldpayvantiv,api_enums::Connector::Worldpayxml => Self::Worldpayxml,api_enums::Connector::Xendit => Self::Xendit,api_enums::Connector::Zen => Self::Zen,diff --git a/loadtest/config/development.toml b/loadtest/config/development.tomlindex 90a946e3bc..22036f653b 100644--- a/loadtest/config/development.toml+++ b/loadtest/config/development.toml@@ -445,6 +445,10 @@ ideal = { country = "NL", currency = "EUR" }credit = { country = "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY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