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(connector): [WorldpayWPG] Implement Payouts - Cards and Apple Pay Predecrypt (#10200)
Vani Guptab5d75fd64218
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.jsonindex a334acb087..21f65b068e 100644--- a/api-reference/v1/openapi_spec_v1.json+++ b/api-reference/v1/openapi_spec_v1.json@@ -9130,6 +9130,14 @@"type": "string","description": "The card holder's name","example": "John Doe"+ },+ "card_network": {+ "allOf": [+ {+ "$ref": "#/components/schemas/CardNetwork"+ }+ ],+ "nullable": true}}},@@ -13699,6 +13707,14 @@"type": "string","description": "The card holder's name","example": "John Doe"+ },+ "card_network": {+ "allOf": [+ {+ "$ref": "#/components/schemas/CardNetwork"+ }+ ],+ "nullable": true}}},@@ -30139,7 +30155,8 @@"paypal","stripe","wise",- "worldpay"+ "worldpay",+ "worldpayxml"]},"PayoutCreatePayoutLinkConfig": {diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.jsonindex 5088cf866d..bbc16782a7 100644--- a/api-reference/v2/openapi_spec_v2.json+++ b/api-reference/v2/openapi_spec_v2.json@@ -4903,6 +4903,14 @@"type": "string","description": "The card holder's name","example": "John Doe"+ },+ "card_network": {+ "allOf": [+ {+ "$ref": "#/components/schemas/CardNetwork"+ }+ ],+ "nullable": true}}},@@ -8534,6 +8542,14 @@"type": "string","description": "The card holder's name","example": "John Doe"+ },+ "card_network": {+ "allOf": [+ {+ "$ref": "#/components/schemas/CardNetwork"+ }+ ],+ "nullable": true}}},@@ -21401,7 +21417,8 @@"paypal","stripe","wise",- "worldpay"+ "worldpay",+ "worldpayxml"]},"PayoutCreatePayoutLinkConfig": {diff --git a/config/config.example.toml b/config/config.example.tomlindex effa8c4ed1..5f0ac87a94 100644--- a/config/config.example.toml+++ b/config/config.example.toml@@ -1052,6 +1052,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { 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,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PE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,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" }+[payment_link]sdk_url = "http://localhost:9090/0.16.7/v0/HyperLoader.js"diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.tomlindex 281ae904a2..979a7cbd8f 100644--- a/config/deployments/integration_test.toml+++ b/config/deployments/integration_test.toml@@ -803,6 +803,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { 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,HK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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.inespay]sepa = { country = "ES", currency = "EUR"}diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex e9c1567662..34a47b9816 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -876,6 +876,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { 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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HR,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" }+[temp_locker_enable_config]bluesnap.payment_method = "card"nuvei.payment_method = "card"diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.tomlindex 34cda0d416..146f5664d9 100644--- a/config/deployments/sandbox.toml+++ b/config/deployments/sandbox.toml@@ -882,6 +882,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { 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,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,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" }+[temp_locker_enable_config]bluesnap.payment_method = "card"nuvei.payment_method = "card"diff --git a/config/development.toml b/config/development.tomlindex fcd4476372..5f065c8f23 100644--- a/config/development.toml+++ b/config/development.toml@@ -1204,6 +1204,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { 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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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" }+[payment_link]sdk_url = "http://localhost:9050/HyperLoader.js"diff --git a/config/docker_compose.toml b/config/docker_compose.tomlindex 4580d7cd2e..d386c8fa53 100644--- a/config/docker_compose.toml+++ b/config/docker_compose.toml@@ -1214,6 +1214,11 @@ interac = { currency = "CAD" }[payout_method_filters.gigadat]interac = { currency = "CAD" }+[payout_method_filters.worldpayxml]+debit = { country = "A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api_models/src/enums.rs b/crates/api_models/src/enums.rsindex f9c429d2d1..c9dfca3298 100644--- a/crates/api_models/src/enums.rs+++ b/crates/api_models/src/enums.rs@@ -58,6 +58,7 @@ pub enum PayoutConnectors {Stripe,Wise,Worldpay,+ Worldpayxml,}#[cfg(feature = "v2")]@@ -88,6 +89,7 @@ impl From<PayoutConnectors> for RoutableConnectors {PayoutConnectors::Stripe => Self::Stripe,PayoutConnectors::Wise => Self::Wise,PayoutConnectors::Worldpay => Self::Worldpay,+ PayoutConnectors::Worldpayxml => Self::Worldpayxml,}}}@@ -109,6 +111,7 @@ impl From<PayoutConnectors> for Connector {PayoutConnectors::Stripe => Self::Stripe,PayoutConnectors::Wise => Self::Wise,PayoutConnectors::Worldpay => Self::Worldpay,+ PayoutConnectors::Worldpayxml => Self::Worldpayxml,}}}@@ -131,6 +134,7 @@ impl TryFrom<Connector> for PayoutConnectors {Connector::Stripe => Ok(Self::Stripe),Connector::Wise => Ok(Self::Wise),Connector::Worldpay => Ok(Self::Worldpay),+ Connector::Worldpayxml => Ok(Self::Worldpayxml),_ => Err(format!("Invalid payout connector {value}")),}}diff --git a/crates/api_models/src/payouts.rs b/crates/api_models/src/payouts.rsindex 9a56ac4993..084b4270d3 100644--- a/crates/api_models/src/payouts.rs+++ b/crates/api_models/src/payouts.rs@@ -1,6 +1,7 @@use std::collections::HashMap;use cards::CardNumber;+use common_enums::CardNetwork;#[cfg(feature = "v2")]use common_utils::types::BrowserInformation;use common_utils::{@@ -269,6 +270,10 @@ pub struct CardPayout {/// The card holder's name#[schema(value_type = String, example = "John Doe")]pub card_holder_name: Option<Secret<String>>,++ /// The card's network+ #[schema(value_type = Option<CardNetwork>, example = "Visa")]+ pub card_network: Option<CardNetwork>,}#[derive(Eq, PartialEq, Clone, Debug, Deserialize, Serialize, ToSchema)]@@ -445,6 +450,10 @@ pub struct ApplePayDecrypt {/// The card holder's name#[schema(value_type = String, example = "John Doe")]pub card_holder_name: Option<Secret<String>>,++ /// The card's network+ #[schema(value_type = Option<CardNetwork>, example = "Visa")]+ pub card_network: Option<CardNetwork>,}#[derive(Debug, ToSchema, Clone, Serialize, router_derive::PolymorphicSchema)]diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rsindex 9f29138609..4bfd272b6e 100644--- a/crates/common_enums/src/connector_enums.rs+++ b/crates/common_enums/src/connector_enums.rs@@ -387,6 +387,7 @@ impl Connector {| (Self::Nomupay, _)| (Self::Loonio, _)| (Self::Worldpay, Some(PayoutType::Wallet))+ | (Self::Worldpayxml, Some(PayoutType::Wallet)))}#[cfg(feature = "payouts")]diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rsindex aab0bd8c40..96f6183093 100644--- a/crates/connector_configs/src/connector.rs+++ b/crates/connector_configs/src/connector.rs@@ -186,6 +186,7 @@ pub struct ConfigMetadata {pub client_merchant_reference_id: Option<InputData>,pub merchant_payment_method_route_id: Option<InputData>,pub site: Option<InputData>,+ pub purpose_of_payment: Option<InputData>,}#[serde_with::skip_serializing_none]@@ -366,6 +367,8 @@ pub struct ConnectorConfig {pub worldpay_payout: Option<ConnectorTomlConfig>,pub worldpayvantiv: Option<ConnectorTomlConfig>,pub worldpayxml: Option<ConnectorTomlConfig>,+ #[cfg(feature = "payouts")]+ pub worldpayxml_payout: Option<ConnectorTomlConfig>,pub xendit: Option<ConnectorTomlConfig>,pub zift: Option<ConnectorTomlConfig>,pub square: Option<ConnectorTomlConfig>,@@ -416,6 +419,7 @@ impl ConnectorConfig {PayoutConnectors::Stripe => Ok(connector_data.stripe_payout),PayoutConnectors::Wise => Ok(connector_data.wise_payout),PayoutConnectors::Worldpay => Ok(connector_data.worldpay_payout),+ PayoutConnectors::Worldpayxml => Ok(connector_data.worldpayxml_payout),}}diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.tomlindex aada5688f0..08ffdfa32b 100644--- a/crates/connector_configs/toml/development.toml+++ b/crates/connector_configs/toml/development.toml@@ -6740,6 +6740,58 @@ api_secret="Merchant Code"api_key="API Username"key1="API Password"+[worldpayxml_payout]+[[worldpayxml_payout.wallet]]+ payment_method_type = "apple_pay"+[[worldpayxml_payout.credit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.credit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.credit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.credit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.credit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.credit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.credit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.credit]]+ payment_method_type = "UnionPay"+[[worldpayxml_payout.debit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.debit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.debit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.debit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.debit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.debit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.debit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.debit]]+ payment_method_type = "UnionPay"+[worldpayxml_payout.metadata.purpose_of_payment]+name="purpose_of_payment"+label="Purpose of Payment"+placeholder="Select the purpose of payment"+required=false+type="Select"+options=["Family Support", "Regular Labour Transfers", "Travel and Tourism", "Education", "Hospitalisation and Medical Treatment", "Emergency Need", "Savings", "Gifts", "Other", "Salary", "Crowd Lending", "Crypto Currency","Gaming Repayment", "Stock Market Proceeds","Refund to a original card", "Refund to a new card"]++[worldpayxml_payout.connector_auth.SignatureKey]+api_secret="Merchant Code"+api_key="API Username"+key1="API Password"+[worldpayvantiv][[worldpayvantiv.credit]]payment_method_type = "Mastercard"diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.tomlindex 18b72a85e5..5c7834559b 100644--- a/crates/connector_configs/toml/production.toml+++ b/crates/connector_configs/toml/production.toml@@ -5391,6 +5391,57 @@ api_secret = "Merchant Code"api_key = "API Username"key1 = "API Password"+[worldpayxml_payout]+[[worldpayxml_payout.wallet]]+ payment_method_type = "apple_pay"+[[worldpayxml_payout.credit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.credit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.credit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.credit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.credit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.credit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.credit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.credit]]+ payment_method_type = "UnionPay"+[[worldpayxml_payout.debit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.debit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.debit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.debit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.debit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.debit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.debit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.debit]]+ payment_method_type = "UnionPay"+[worldpayxml_payout.metadata.purpose_of_payment]+name="purpose_of_payment"+label="Purpose of Payment"+placeholder="Select the purpose of payment"+required=false+type="Select"+options=["Family Support", "Regular Labour Transfers", "Travel and Tourism", "Education", "Hospitalisation and Medical Treatment", "Emergency Need", "Savings", "Gifts", "Other", "Salary", "Crowd Lending", "Crypto Currency","Gaming Repayment", "Stock Market Proceeds","Refund to a original card", "Refund to a new card"]++[worldpayxml_payout.connector_auth.SignatureKey]+api_secret="Merchant Code"+api_key="API Username"+key1="API Password"[worldpayvantiv][[worldpayvantiv.credit]]diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.tomlindex 7dd7f84bb0..b42f92827d 100644--- a/crates/connector_configs/toml/sandbox.toml+++ b/crates/connector_configs/toml/sandbox.toml@@ -6718,6 +6718,58 @@ api_secret = "Merchant Code"api_key = "API Username"key1 = "API Password"+[worldpayxml_payout]+[[worldpayxml_payout.wallet]]+ payment_method_type = "apple_pay"+[[worldpayxml_payout.credit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.credit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.credit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.credit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.credit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.credit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.credit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.credit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.credit]]+ payment_method_type = "UnionPay"+[[worldpayxml_payout.debit]]+ payment_method_type = "Mastercard"+[[worldpayxml_payout.debit]]+ payment_method_type = "Visa"+[[worldpayxml_payout.debit]]+ payment_method_type = "Interac"+[[worldpayxml_payout.debit]]+ payment_method_type = "AmericanExpress"+[[worldpayxml_payout.debit]]+ payment_method_type = "JCB"+[[worldpayxml_payout.debit]]+ payment_method_type = "DinersClub"+[[worldpayxml_payout.debit]]+ payment_method_type = "Discover"+[[worldpayxml_payout.debit]]+ payment_method_type = "CartesBancaires"+[[worldpayxml_payout.debit]]+ payment_method_type = "UnionPay"+[worldpayxml_payout.metadata.purpose_of_payment]+name="purpose_of_payment"+label="Purpose of Payment"+placeholder="Select the purpose of payment"+required=false+type="Select"+options=["Family Support", "Regular Labour Transfers", "Travel and Tourism", "Education", "Hospitalisation and Medical Treatment", "Emergency Need", "Savings", "Gifts", "Other", "Salary", "Crowd Lending", "Crypto Currency","Gaming Repayment", "Stock Market Proceeds","Refund to a original card", "Refund to a new card"]++[worldpayxml_payout.connector_auth.SignatureKey]+api_secret="Merchant Code"+api_key="API Username"+key1="API Password"+[worldpayvantiv][[worldpayvantiv.credit]]payment_method_type = "Mastercard"diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs b/crates/hyperswitch_connectors/src/connectors/worldpayxml.rsindex e01c32d806..2040fce298 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayxml.rs@@ -31,6 +31,13 @@ use hyperswitch_domain_models::{PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,},};+#[cfg(feature = "payouts")]+use hyperswitch_domain_models::{+ router_flow_types::payouts::{PoCancel, PoFulfill},+ router_request_types::PayoutsData,+ router_response_types::PayoutsResponseData,+ types::PayoutsRouterData,+};use hyperswitch_interfaces::{api::{self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,@@ -735,6 +742,207 @@ impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Worldpayx}}+impl api::Payouts for Worldpayxml {}+#[cfg(feature = "payouts")]+impl api::PayoutFulfill for Worldpayxml {}+#[cfg(feature = "payouts")]+impl api::PayoutCancel for Worldpayxml {}++#[async_trait::async_trait]+#[cfg(feature = "payouts")]+impl ConnectorIntegration<PoFulfill, PayoutsData, PayoutsResponseData> for Worldpayxml {+ fn get_url(+ &self,+ _req: &PayoutsRouterData<PoFulfill>,+ connectors: &Connectors,+ ) -> CustomResult<String, errors::ConnectorError> {+ Ok(self.base_url(connectors).to_owned())+ }++ fn get_headers(+ &self,+ req: &PayoutsRouterData<PoFulfill>,+ 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_request_body(+ &self,+ req: &PayoutsRouterData<PoFulfill>,+ _connectors: &Connectors,+ ) -> CustomResult<RequestContent, errors::ConnectorError> {+ let amount = utils::convert_amount(+ self.amount_converter,+ req.request.minor_amount,+ req.request.destination_currency,+ )?;++ let connector_router_data = worldpayxml::WorldpayxmlRouterData::from((amount, req));++ let connector_req_object = worldpayxml::PaymentService::try_from(&connector_router_data)?;++ let connector_req = utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayxml::worldpayxml_constants::XML_VERSION,+ Some(worldpayxml::worldpayxml_constants::XML_ENCODING),+ None,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),+ )?;+ Ok(RequestContent::RawBytes(connector_req))+ }++ fn build_request(+ &self,+ req: &PayoutsRouterData<PoFulfill>,+ connectors: &Connectors,+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {+ let request = RequestBuilder::new()+ .method(Method::Post)+ .url(&types::PayoutFulfillType::get_url(self, req, connectors)?)+ .attach_default_headers()+ .headers(types::PayoutFulfillType::get_headers(+ self, req, connectors,+ )?)+ .set_body(types::PayoutFulfillType::get_request_body(+ self, req, connectors,+ )?)+ .build();+ Ok(Some(request))+ }++ fn handle_response(+ &self,+ data: &PayoutsRouterData<PoFulfill>,+ event_builder: Option<&mut ConnectorEvent>,+ res: Response,+ ) -> CustomResult<PayoutsRouterData<PoFulfill>, errors::ConnectorError> {+ let response: worldpayxml::PayoutResponse =+ 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,+ })+ .change_context(errors::ConnectorError::ResponseHandlingFailed)+ }++ fn get_error_response(+ &self,+ res: Response,+ event_builder: Option<&mut ConnectorEvent>,+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {+ self.build_error_response(res, event_builder)+ }++ fn get_5xx_error_response(+ &self,+ res: Response,+ event_builder: Option<&mut ConnectorEvent>,+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {+ self.build_error_response(res, event_builder)+ }+}++#[async_trait::async_trait]+#[cfg(feature = "payouts")]+impl ConnectorIntegration<PoCancel, PayoutsData, PayoutsResponseData> for Worldpayxml {+ fn get_url(+ &self,+ _req: &PayoutsRouterData<PoCancel>,+ connectors: &Connectors,+ ) -> CustomResult<String, errors::ConnectorError> {+ Ok(self.base_url(connectors).to_owned())+ }++ fn get_content_type(&self) -> &'static str {+ self.common_get_content_type()+ }++ fn get_headers(+ &self,+ req: &PayoutsRouterData<PoCancel>,+ connectors: &Connectors,+ ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {+ self.build_headers(req, connectors)+ }++ fn get_request_body(+ &self,+ req: &PayoutsRouterData<PoCancel>,+ _connectors: &Connectors,+ ) -> CustomResult<RequestContent, errors::ConnectorError> {+ let connector_req_object = worldpayxml::PaymentService::try_from(req)?;++ let connector_req = utils::XmlSerializer::serialize_to_xml_bytes(+ &connector_req_object,+ worldpayxml::worldpayxml_constants::XML_VERSION,+ Some(worldpayxml::worldpayxml_constants::XML_ENCODING),+ None,+ Some(worldpayxml::worldpayxml_constants::WORLDPAYXML_DOC_TYPE),+ )?;++ Ok(RequestContent::RawBytes(connector_req))+ }++ fn build_request(+ &self,+ req: &PayoutsRouterData<PoCancel>,+ connectors: &Connectors,+ ) -> CustomResult<Option<Request>, errors::ConnectorError> {+ let request = RequestBuilder::new()+ .method(Method::Post)+ .url(&types::PayoutCancelType::get_url(self, req, connectors)?)+ .attach_default_headers()+ .headers(types::PayoutCancelType::get_headers(self, req, connectors)?)+ .set_body(types::PayoutCancelType::get_request_body(+ self, req, connectors,+ )?)+ .build();+ Ok(Some(request))+ }++ fn handle_response(+ &self,+ data: &PayoutsRouterData<PoCancel>,+ event_builder: Option<&mut ConnectorEvent>,+ res: Response,+ ) -> CustomResult<PayoutsRouterData<PoCancel>, errors::ConnectorError> {+ let response: worldpayxml::PayoutResponse =+ 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,+ })+ .change_context(errors::ConnectorError::ResponseHandlingFailed)+ }++ fn get_error_response(+ &self,+ res: Response,+ event_builder: Option<&mut ConnectorEvent>,+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {+ self.build_error_response(res, event_builder)+ }++ fn get_5xx_error_response(+ &self,+ res: Response,+ event_builder: Option<&mut ConnectorEvent>,+ ) -> CustomResult<ErrorResponse, errors::ConnectorError> {+ self.build_error_response(res, event_builder)+ }+}+#[async_trait::async_trait]impl webhooks::IncomingWebhook for Worldpayxml {fn get_webhook_object_reference_id(diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs b/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rsindex 5d1a990c0a..571c7fdd79 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs@@ -1,4 +1,10 @@+#[cfg(feature = "payouts")]+use api_models::payouts::{ApplePayDecrypt, CardPayout};use common_enums::enums;+#[cfg(feature = "payouts")]+use common_enums::CardNetwork;+#[cfg(feature = "payouts")]+use common_utils::pii;use common_utils::types::StringMinorUnit;use error_stack::ResultExt;use hyperswitch_domain_models::{@@ -12,6 +18,12 @@ use hyperswitch_domain_models::{PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,},};+#[cfg(feature = "payouts")]+use hyperswitch_domain_models::{+ router_flow_types::payouts::{PoCancel, PoFulfill},+ router_response_types::PayoutsResponseData,+ types::PayoutsRouterData,+};use hyperswitch_interfaces::{consts, errors};use masking::Secret;use serde::{Deserialize, Serialize};@@ -19,7 +31,7 @@ use serde::{Deserialize, Serialize};use crate::{types::{PaymentsCancelResponseRouterData, PaymentsCaptureResponseRouterData,- RefundsResponseRouterData, ResponseRouterData,+ PayoutsResponseRouterData, RefundsResponseRouterData, ResponseRouterData,},utils::{self as connector_utils, CardData, PaymentsAuthorizeRequestData, PaymentsSyncRequestData,@@ -81,6 +93,8 @@ struct OrderModification {#[serde(skip_serializing_if = "Option::is_none")]cancel: Option<CancelRequest>,#[serde(skip_serializing_if = "Option::is_none")]+ cancel_refund: Option<CancelRequest>,+ #[serde(skip_serializing_if = "Option::is_none")]refund: Option<RefundRequest>,}@@ -122,6 +136,26 @@ pub struct Reply {ok: Option<OkResponse>,}+#[derive(Debug, Deserialize, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct PayoutResponse {+ pub reply: PayoutReply,+}++#[derive(Debug, Deserialize, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct PayoutReply {+ pub ok: Option<OkPayoutResponse>,+ pub error: Option<WorldpayXmlErrorResponse>,+}++#[derive(Debug, Deserialize, Serialize)]+#[serde(rename_all = "camelCase")]+pub struct OkPayoutResponse {+ refund_received: Option<ModifyRequestReceived>,+ cancel_received: Option<ModifyRequestReceived>,+}+#[derive(Debug, Deserialize, Serialize)]#[serde(rename_all = "camelCase")]struct OkResponse {@@ -255,8 +289,8 @@ struct SchemeResponse {struct Order {#[serde(rename = "@orderCode")]order_code: String,- #[serde(rename = "@captureDelay")]- capture_delay: AutoCapture,+ #[serde(skip_serializing_if = "Option::is_none", rename = "@captureDelay")]+ capture_delay: Option<AutoCapture>,description: String,amount: WorldpayXmlAmount,payment_details: PaymentDetails,@@ -283,8 +317,23 @@ struct WorldpayXmlAmount {#[derive(Debug, Serialize, Deserialize)]struct PaymentDetails {+ #[serde(skip_serializing_if = "Option::is_none", rename = "@action")]+ action: Option<Action>,+ #[serde(flatten)]+ payment_method: PaymentMethod,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "UPPERCASE")]+enum PaymentMethod {#[serde(rename = "CARD-SSL")]- card_ssl: CardSSL,+ CardSSL(CardSSL),++ #[serde(rename = "VISA-SSL")]+ VisaSSL(CardSSL),++ #[serde(rename = "ECMC-SSL")]+ EcmcSSL(CardSSL),}#[derive(Debug, Deserialize, Serialize)]@@ -293,7 +342,34 @@ struct CardSSL {card_number: cards::CardNumber,expiry_date: ExpiryDate,card_holder_name: Option<Secret<String>>,- cvc: Secret<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ cvc: Option<Secret<String>>,+ #[serde(skip_serializing_if = "CardAddress::is_empty_option")]+ card_address: Option<CardAddress>,+ #[serde(skip_serializing_if = "Option::is_none")]+ purpose_of_payment_code: Option<String>,+}++#[derive(Debug, Deserialize, Serialize)]+#[serde(rename_all = "camelCase")]+struct CardAddress {+ #[serde(skip_serializing_if = "WorldpayxmlAddress::is_empty_option")]+ address: Option<WorldpayxmlAddress>,+}++#[derive(Debug, Deserialize, Serialize)]+#[serde(rename_all = "camelCase")]+struct WorldpayxmlAddress {+ #[serde(skip_serializing_if = "Option::is_none")]+ last_name: Option<Secret<String>>,+ #[serde(skip_serializing_if = "Option::is_none")]+ address1: Option<Secret<String>>,+ #[serde(skip_serializing_if = "Option::is_none")]+ postal_code: Option<Secret<String>>,+ #[serde(skip_serializing_if = "Option::is_none")]+ city: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ country_code: Option<common_enums::CountryAlpha2>,}#[derive(Debug, Deserialize, Serialize)]@@ -310,11 +386,44 @@ struct Date {year: Secret<String>,}+#[derive(Clone, Debug, Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+pub enum PayoutOutcome {+ RefundReceived,+ Refused,+ Error,+ QueryRequired,+ CancelReceived,+}++impl From<PayoutOutcome> for enums::PayoutStatus {+ fn from(item: PayoutOutcome) -> Self {+ match item {+ PayoutOutcome::RefundReceived => Self::Initiated,+ PayoutOutcome::Error | PayoutOutcome::Refused => Self::Failed,+ PayoutOutcome::QueryRequired => Self::Pending,+ PayoutOutcome::CancelReceived => Self::Cancelled,+ }+ }+}++#[derive(Debug, Default, Serialize, Deserialize)]+pub struct WorldpayxmlPayoutConnectorMetadataObject {+ pub purpose_of_payment: Option<String>,+}++#[derive(Debug, Serialize, Deserialize)]+#[serde(rename_all = "SCREAMING_SNAKE_CASE")]+enum Action {+ Refund,+}+impl TryFrom<&Card> for PaymentDetails {type Error = error_stack::Report<errors::ConnectorError>;fn try_from(card_data: &Card) -> Result<Self, Self::Error> {Ok(Self {- card_ssl: CardSSL {+ action: None,+ payment_method: PaymentMethod::CardSSL(CardSSL {card_number: card_data.card_number.clone(),expiry_date: ExpiryDate {date: Date {@@ -323,8 +432,10 @@ impl TryFrom<&Card> for PaymentDetails {},},card_holder_name: card_data.card_holder_name.to_owned(),- cvc: card_data.card_cvc.to_owned(),- },+ cvc: Some(card_data.card_cvc.to_owned()),+ card_address: None,+ purpose_of_payment_code: None,+ }),})}}@@ -344,9 +455,9 @@ impl TryFrom<(&WorldpayxmlRouterData<&PaymentsAuthorizeRouterData>, &Card)> for.connector_request_reference_id.to_owned();let capture_delay = if authorize_data.router_data.request.is_auto_capture()? {- AutoCapture::On+ Some(AutoCapture::On)} else {- AutoCapture::Off+ Some(AutoCapture::Off)};let description = authorize_data.router_data.description.clone().ok_or(errors::ConnectorError::MissingRequiredField {@@ -429,6 +540,7 @@ impl TryFrom<&WorldpayxmlRouterData<&PaymentsCaptureRouterData>> for PaymentServvalue: item.amount.to_owned(),},}),+ cancel_refund: None,cancel: None,refund: None,},@@ -455,6 +567,7 @@ impl TryFrom<&PaymentsCancelRouterData> for PaymentService {order_modification: OrderModification {order_code: item.request.connector_transaction_id.clone(),capture: None,+ cancel_refund: None,cancel: Some(CancelRequest {}),refund: None,},@@ -481,6 +594,7 @@ impl<F> TryFrom<&WorldpayxmlRouterData<&RefundsRouterData<F>>> for PaymentServicorder_code: item.router_data.request.connector_transaction_id.clone(),capture: None,cancel: None,+ cancel_refund: None,refund: Some(RefundRequest {amount: WorldpayXmlAmount {currency_code: item.router_data.request.currency.to_owned(),@@ -1062,6 +1176,326 @@ impl TryFrom<&RefundSyncRouterData> for PaymentService {}}+impl TryFrom<(ApplePayDecrypt, Option<CardAddress>, Option<String>)> for PaymentDetails {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ (apple_pay_decrypted_data, address, purpose_of_payment): (+ ApplePayDecrypt,+ Option<CardAddress>,+ Option<String>,+ ),+ ) -> Result<Self, Self::Error> {+ let card_data = CardSSL {+ card_number: apple_pay_decrypted_data.dpan.clone(),+ expiry_date: ExpiryDate {+ date: Date {+ month: apple_pay_decrypted_data.get_card_expiry_month_2_digit()?,+ year: apple_pay_decrypted_data.get_expiry_year_4_digit(),+ },+ },+ card_holder_name: apple_pay_decrypted_data.card_holder_name.clone(),+ cvc: None,+ card_address: address,+ purpose_of_payment_code: None,+ };++ let payment_method = match apple_pay_decrypted_data.card_network {+ Some(CardNetwork::Visa) => PaymentMethod::VisaSSL(CardSSL {+ purpose_of_payment_code: purpose_of_payment.clone(),+ ..card_data+ }),+ Some(CardNetwork::Mastercard) => PaymentMethod::EcmcSSL(CardSSL {+ purpose_of_payment_code: purpose_of_payment.clone(),+ ..card_data+ }),+ _ => PaymentMethod::CardSSL(CardSSL {+ purpose_of_payment_code: None,+ ..card_data+ }),+ };++ Ok(Self {+ action: Some(Action::Refund),+ payment_method,+ })+ }+}++impl TryFrom<(CardPayout, Option<CardAddress>, Option<String>)> for PaymentDetails {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ (card_payout, address, purpose_of_payment): (+ CardPayout,+ Option<CardAddress>,+ Option<String>,+ ),+ ) -> Result<Self, Self::Error> {+ let card_data = CardSSL {+ card_number: card_payout.card_number.clone(),+ expiry_date: ExpiryDate {+ date: Date {+ month: card_payout.get_card_expiry_month_2_digit()?,+ year: card_payout.get_expiry_year_4_digit(),+ },+ },+ card_holder_name: card_payout.card_holder_name.to_owned(),+ cvc: None,+ card_address: address,+ purpose_of_payment_code: None,+ };++ let payment_method = match card_payout.card_network {+ Some(CardNetwork::Visa) => PaymentMethod::VisaSSL(CardSSL {+ purpose_of_payment_code: purpose_of_payment.clone(),+ ..card_data+ }),+ Some(CardNetwork::Mastercard) => PaymentMethod::EcmcSSL(CardSSL {+ purpose_of_payment_code: purpose_of_payment.clone(),+ ..card_data+ }),+ _ => PaymentMethod::CardSSL(CardSSL {+ purpose_of_payment_code: None,+ ..card_data+ }),+ };++ Ok(Self {+ action: Some(Action::Refund),+ payment_method,+ })+ }+}++impl TryFrom<Option<&pii::SecretSerdeValue>> for WorldpayxmlPayoutConnectorMetadataObject {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(meta_data: Option<&pii::SecretSerdeValue>) -> Result<Self, Self::Error> {+ let metadata: Self =+ connector_utils::to_connector_meta_from_secret::<Self>(meta_data.cloned())+ .change_context(errors::ConnectorError::InvalidConnectorConfig {+ config: "metadata",+ })?;+ Ok(metadata)+ }+}++impl TryFrom<&WorldpayxmlRouterData<&PayoutsRouterData<PoFulfill>>> for PaymentService {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: &WorldpayxmlRouterData<&PayoutsRouterData<PoFulfill>>,+ ) -> Result<Self, Self::Error> {+ let billing_details = Some(CardAddress {+ address: Some(WorldpayxmlAddress {+ last_name: item.router_data.get_optional_billing_last_name(),+ address1: item.router_data.get_optional_billing_line1(),+ postal_code: item.router_data.get_optional_billing_zip(),+ city: item.router_data.get_optional_billing_city(),+ country_code: item.router_data.get_optional_billing_country(),+ }),+ });++ let purpose_of_payment: Option<WorldpayxmlPayoutConnectorMetadataObject> =+ match item.router_data.connector_meta_data {+ None => None,+ Some(_) => Some(WorldpayxmlPayoutConnectorMetadataObject::try_from(+ item.router_data.connector_meta_data.as_ref(),+ )?),+ };++ let purpose_of_payment_code = match purpose_of_payment {+ None => None,+ Some(purpose) => map_purpose_code(purpose.purpose_of_payment),+ };++ let payout_method_data = item.router_data.get_payout_method_data()?;+ let payment_details = match payout_method_data {+ api_models::payouts::PayoutMethodData::Wallet(+ api_models::payouts::Wallet::ApplePayDecrypt(apple_pay_decrypted_data),+ ) => PaymentDetails::try_from((+ apple_pay_decrypted_data,+ billing_details,+ purpose_of_payment_code,+ ))?,+ api_models::payouts::PayoutMethodData::Card(card_payout) => {+ PaymentDetails::try_from((card_payout, billing_details, purpose_of_payment_code))?+ }+ api_models::payouts::PayoutMethodData::Bank(_)+ | api_models::payouts::PayoutMethodData::Wallet(_)+ | api_models::payouts::PayoutMethodData::BankRedirect(_)+ | api_models::payouts::PayoutMethodData::Passthrough(_) => {+ Err(errors::ConnectorError::NotImplemented(+ "Selected Payout Method is not implemented for WorldpayXML".to_string(),+ ))?+ }+ };++ let order_code = item.router_data.connector_request_reference_id.to_owned();++ let description = item.router_data.description.clone().ok_or(+ errors::ConnectorError::MissingRequiredField {+ field_name: "description",+ },+ )?;++ let exponent = item+ .router_data+ .request+ .destination_currency+ .number_of_digits_after_decimal_point()+ .to_string();++ let amount = WorldpayXmlAmount {+ currency_code: item.router_data.request.destination_currency.to_owned(),+ exponent,+ value: item.amount.to_owned(),+ };++ let auth = WorldpayxmlAuthType::try_from(&item.router_data.connector_auth_type)+ .change_context(errors::ConnectorError::FailedToObtainAuthType)?;++ let submit = Some(Submit {+ order: Order {+ order_code,+ capture_delay: None,+ description,+ amount,+ payment_details,+ },+ });++ Ok(Self {+ version: worldpayxml_constants::WORLDPAYXML_VERSION.to_string(),+ merchant_code: auth.merchant_code.clone(),+ submit,+ reply: None,+ inquiry: None,+ modify: None,+ })+ }+}++impl TryFrom<PayoutsResponseRouterData<PoFulfill, PayoutResponse>>+ for PayoutsRouterData<PoFulfill>+{+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: PayoutsResponseRouterData<PoFulfill, PayoutResponse>,+ ) -> Result<Self, Self::Error> {+ let reply = item.response.reply;++ validate_payout_reply(&reply)?;++ if let Some(ok_status) = reply.ok {+ Ok(Self {+ response: Ok(PayoutsResponseData {+ status: Some(enums::PayoutStatus::from(PayoutOutcome::RefundReceived)),+ connector_payout_id: ok_status.refund_received.map(|id| id.order_code),+ payout_eligible: None,+ should_add_next_step_to_process_tracker: false,+ error_code: None,+ error_message: None,+ payout_connector_metadata: None,+ }),+ ..item.data+ })+ } else {+ let error = reply+ .error+ .ok_or(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from("Missing reply.error".to_string()),+ ))?;+ Ok(Self {+ status: common_enums::AttemptStatus::Failure,+ response: Ok(PayoutsResponseData {+ status: Some(enums::PayoutStatus::from(PayoutOutcome::Error)),+ connector_payout_id: None,+ payout_eligible: None,+ should_add_next_step_to_process_tracker: false,+ error_code: Some(error.code),+ error_message: Some(error.message),+ payout_connector_metadata: None,+ }),+ ..item.data+ })+ }+ }+}++impl TryFrom<&PayoutsRouterData<PoCancel>> for PaymentService {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(item: &PayoutsRouterData<PoCancel>) -> Result<Self, Self::Error> {+ let auth = WorldpayxmlAuthType::try_from(&item.connector_auth_type)+ .change_context(errors::ConnectorError::FailedToObtainAuthType)?;++ let modify = Some(Modify {+ order_modification: OrderModification {+ order_code: item.request.connector_payout_id.to_owned().ok_or(+ errors::ConnectorError::MissingRequiredField {+ field_name: "order_code",+ },+ )?,+ capture: None,+ cancel: None,+ cancel_refund: Some(CancelRequest {}),+ refund: None,+ },+ });++ Ok(Self {+ version: worldpayxml_constants::WORLDPAYXML_VERSION.to_string(),+ merchant_code: auth.merchant_code.clone(),+ submit: None,+ reply: None,+ inquiry: None,+ modify,+ })+ }+}++impl TryFrom<PayoutsResponseRouterData<PoCancel, PayoutResponse>> for PayoutsRouterData<PoCancel> {+ type Error = error_stack::Report<errors::ConnectorError>;+ fn try_from(+ item: PayoutsResponseRouterData<PoCancel, PayoutResponse>,+ ) -> Result<Self, Self::Error> {+ let reply = item.response.reply;++ validate_payout_reply(&reply)?;++ if let Some(ok_status) = reply.ok {+ Ok(Self {+ response: Ok(PayoutsResponseData {+ status: Some(enums::PayoutStatus::from(PayoutOutcome::CancelReceived)),+ connector_payout_id: ok_status.cancel_received.map(|id| id.order_code),+ payout_eligible: None,+ should_add_next_step_to_process_tracker: false,+ error_code: None,+ error_message: None,+ payout_connector_metadata: None,+ }),+ ..item.data+ })+ } else {+ let error = reply+ .error+ .ok_or(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from("Missing reply.error".to_string()),+ ))?;+ Ok(Self {+ status: common_enums::AttemptStatus::Failure,+ response: Ok(PayoutsResponseData {+ status: Some(enums::PayoutStatus::from(PayoutOutcome::Error)),+ connector_payout_id: None,+ payout_eligible: None,+ should_add_next_step_to_process_tracker: false,+ error_code: Some(error.code),+ error_message: Some(error.message),+ payout_connector_metadata: None,+ }),+ ..item.data+ })+ }+ }+}+fn validate_reply(reply: &Reply) -> Result<(), errors::ConnectorError> {if (reply.error.is_some() && reply.order_status.is_some())|| (reply.error.is_none() && reply.order_status.is_none())@@ -1077,6 +1511,20 @@ fn validate_reply(reply: &Reply) -> Result<(), errors::ConnectorError> {}}+fn validate_payout_reply(reply: &PayoutReply) -> Result<(), errors::ConnectorError> {+ if (reply.error.is_some() && reply.ok.is_some())+ || (reply.error.is_none() && reply.ok.is_none())+ {+ Err(errors::ConnectorError::UnexpectedResponseError(+ bytes::Bytes::from(+ "Either reply.error_data or reply.ok must be present in the response".to_string(),+ ),+ ))+ } else {+ Ok(())+ }+}+fn validate_order_status(order_status: &OrderStatus) -> Result<(), errors::ConnectorError> {if (order_status.payment.is_some() && order_status.error.is_some())|| (order_status.payment.is_none() && order_status.error.is_none())@@ -1133,3 +1581,53 @@ fn process_payment_response(})}}++pub fn map_purpose_code(value: Option<String>) -> Option<String> {+ let code = match value?.as_str() {+ "Family Support" => "00",+ "Regular Labour Transfers" => "01",+ "Travel and Tourism" => "02",+ "Education" => "03",+ "Hospitalisation and Medical Treatment" => "04",+ "Emergency Need" => "05",+ "Savings" => "06",+ "Gifts" => "07",+ "Other" => "08",+ "Salary" => "09",+ "Crowd Lending" => "10",+ "Crypto Currency" => "11",+ "Gaming Repayment" => "12",+ "Stock Market Proceeds" => "13",+ "Refund to a original card" => "M1",+ "Refund to a new card" => "M2",+ _ => return None,+ };++ Some(code.to_string())+}++impl WorldpayxmlAddress {+ fn is_empty(&self) -> bool {+ self.last_name.is_none()+ && self.address1.is_none()+ && self.postal_code.is_none()+ && self.city.is_none()+ && self.country_code.is_none()+ }++ fn is_empty_option(addr: &Option<Self>) -> bool {+ match addr {+ Some(a) => a.is_empty(),+ None => true,+ }+ }+}++impl CardAddress {+ fn is_empty_option(addr: &Option<Self>) -> bool {+ match addr {+ Some(a) => WorldpayxmlAddress::is_empty_option(&a.address),+ None => true,+ }+ }+}diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rsindex 15dc43f756..3a7effa388 100644--- a/crates/hyperswitch_connectors/src/default_implementations.rs+++ b/crates/hyperswitch_connectors/src/default_implementations.rs@@ -4127,7 +4127,6 @@ default_imp_for_payouts!(connectors::Volt,connectors::Worldline,connectors::Worldpayvantiv,- connectors::Worldpayxml,connectors::Wellsfargo,connectors::Wellsfargopayout,connectors::Xendit,@@ -4713,7 +4712,6 @@ default_imp_for_payouts_fulfill!(connectors::UnifiedAuthenticationService,connectors::Worldline,connectors::Worldpayvantiv,- connectors::Worldpayxml,connectors::Wellsfargo,connectors::Wellsfargopayout,connectors::Volt,@@ -4862,7 +4860,7 @@ default_imp_for_payouts_cancel!(connectors::Worldline,connectors::Worldpay,connectors::Worldpayvantiv,- connectors::Worldpayxml,+ // connectors::Worldpayxml,connectors::Wellsfargo,connectors::Wellsfargopayout,connectors::Volt,diff --git a/crates/router/src/core/payment_methods/vault.rs b/crates/router/src/core/payment_methods/vault.rsindex d4153c12fe..1d136b43d9 100644--- a/crates/router/src/core/payment_methods/vault.rs+++ b/crates/router/src/core/payment_methods/vault.rs@@ -534,6 +534,7 @@ impl Vaultable for api::CardPayout {expiry_month: value1.exp_month.into(),expiry_year: value1.exp_year.into(),card_holder_name: value1.name_on_card.map(masking::Secret::new),+ card_network: None,};let supp_data = SupplementaryVaultData {@@ -650,6 +651,7 @@ impl Vaultable for api::WalletPayout {expiry_month,expiry_year,card_holder_name: value1.card_holder_name,+ card_network: None,})}_ => Err(errors::VaultError::ResponseDeserializationFailed)?,diff --git a/crates/router/src/core/payouts/helpers.rs b/crates/router/src/core/payouts/helpers.rsindex 757fb163dd..6d2ff4ee55 100644--- a/crates/router/src/core/payouts/helpers.rs+++ b/crates/router/src/core/payouts/helpers.rs@@ -153,6 +153,7 @@ pub async fn make_payout_method_data(expiry_month: resp.card_exp_month,expiry_year: resp.card_exp_year,card_holder_name: resp.name_on_card,+ card_network: None,})}))}@@ -1512,7 +1513,7 @@ pub async fn get_additional_payout_data(payout_additional::AdditionalPayoutMethodData::Card(Box::new(payout_additional::CardAdditionalData {card_issuer: None,- card_network: None,+ card_network: card_data.card_network.clone(),bank_code: None,card_type: None,card_issuing_country: None,diff --git a/crates/router/src/core/payouts/validator.rs b/crates/router/src/core/payouts/validator.rsindex 8c70308454..9663e15905 100644--- a/crates/router/src/core/payouts/validator.rs+++ b/crates/router/src/core/payouts/validator.rs@@ -263,6 +263,7 @@ pub async fn validate_create_request(.expiry_month.get_required_value("expiry_month")?,expiry_year: card.expiry_year.get_required_value("expiry_year")?,+ card_network: card.card_network.clone(),},))),(_, Some(bank)) => Ok(Some(payouts::PayoutMethodData::Bank(bank))),diff --git a/crates/router/src/core/utils.rs b/crates/router/src/core/utils.rsindex 4da8c7197f..6fd76dae86 100644--- a/crates/router/src/core/utils.rs+++ b/crates/router/src/core/utils.rs@@ -166,7 +166,7 @@ pub async fn construct_payout_router_data<'a, F>(payment_method: enums::PaymentMethod::default(),payment_method_type: None,connector_auth_type,- description: None,+ description: payout_data.payouts.description.clone(),address,auth_type: enums::AuthenticationType::default(),connector_meta_data: merchant_connector_account.get_metadata(),diff --git a/crates/router/tests/connectors/adyen.rs b/crates/router/tests/connectors/adyen.rsindex 90daed75ba..4d330b90d2 100644--- a/crates/router/tests/connectors/adyen.rs+++ b/crates/router/tests/connectors/adyen.rs@@ -110,6 +110,7 @@ impl AdyenTest {expiry_month: Secret::new("3".to_string()),expiry_year: Secret::new("2030".to_string()),card_holder_name: Some(Secret::new("John Doe".to_string())),+ card_network: None,},)),enums::PayoutType::Bank => Some(types::api::PayoutMethodData::Bank(