diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json index 99e0ae02712..aa436157ab2 100644 --- a/api-reference/v1/openapi_spec_v1.json +++ b/api-reference/v1/openapi_spec_v1.json @@ -17312,6 +17312,7 @@ "interpayments", "inespay", "iatapay", + "ilixium", "imerchantsolutions", "itaubank", "jpmorgan", @@ -42086,6 +42087,7 @@ "helcim", "hyperpg", "iatapay", + "ilixium", "imerchantsolutions", "inespay", "interpayments", diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index 79eeaf34660..4160bbb1cb5 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -11481,6 +11481,7 @@ "interpayments", "inespay", "iatapay", + "ilixium", "imerchantsolutions", "itaubank", "jpmorgan", @@ -29990,6 +29991,7 @@ "helcim", "hyperpg", "iatapay", + "ilixium", "imerchantsolutions", "inespay", "interpayments", diff --git a/config/config.example.toml b/config/config.example.toml index 43040c07ed2..6cde2228a2b 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -342,6 +342,7 @@ hyperwallet.base_url = "https://uat-api.paylution.com" hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -621,6 +622,7 @@ supported_connectors = "adyen" # Supported connect adyen = "Star,Pulse,Accel,Nyce" # Debit networks supported by adyen connector [temp_locker_enable_config] +ilixium = { payment_method = "card" } stripe = { payment_method = "bank_transfer" } nuvei = { payment_method = "card" } shift4 = { payment_method = "card" } @@ -1437,7 +1439,7 @@ diff_count_threshold = 100 # Non-volume routing diffs per profile within the cou base_url = "http://localhost:8000" # Unified Connector Service Base URL connection_timeout = 10 # Connection Timeout Duration in Seconds request_timeout = 35 # Per-RPC Request Timeout in Seconds -ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate" # Comma-separated list of connectors that use UCS only +ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate, ilixium" # Comma-separated list of connectors that use UCS only ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call [grpc_client.recovery_decider_client] # Revenue recovery client base url diff --git a/config/deployments/env_specific.toml b/config/deployments/env_specific.toml index 1b98d2dc808..9ff265abfbc 100644 --- a/config/deployments/env_specific.toml +++ b/config/deployments/env_specific.toml @@ -452,7 +452,7 @@ payment_method = "payment_method_types" # = comma-separated clo base_url = "http://localhost:8000" # Unified Connector Service Base URL connection_timeout = 10 # Connection Timeout Duration in Seconds request_timeout = 35 # Per-RPC Request Timeout in Seconds -ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments, tesouro, citigate" # Comma-separated list of connectors that use UCS only +ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments, tesouro, citigate, ilixium" # Comma-separated list of connectors that use UCS only ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call [revenue_recovery] diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml index 67c6fc7def6..a75ec63d959 100644 --- a/config/deployments/integration_test.toml +++ b/config/deployments/integration_test.toml @@ -92,6 +92,7 @@ hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" hyperwallet.base_url = "https://uat-api.paylution.com" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -955,6 +956,7 @@ payjustnow = { country = "ZA", currency = "ZAR" } payjustnow = { country = "ZA", currency = "ZAR" } [temp_locker_enable_config] +ilixium.payment_method = "card" bluesnap.payment_method = "card" nuvei.payment_method = "card" shift4.payment_method = "card" @@ -1032,7 +1034,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa" connector_list = "worldpayvantiv" [grpc_client.unified_connector_service] -ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate" # Comma-separated list of connectors that use UCS only +ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate, ilixium" # Comma-separated list of connectors that use UCS only ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call # Merchant Advice Code Configuration diff --git a/config/deployments/production.toml b/config/deployments/production.toml index 8164774086c..c073ca0f8ce 100644 --- a/config/deployments/production.toml +++ b/config/deployments/production.toml @@ -95,6 +95,7 @@ hipay.secondary_base_url = "https://secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://api-gateway.hipay.com/" hyperwallet.base_url = "https://uat-api.paylution.com" iatapay.base_url = "https://iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -966,6 +967,7 @@ apple_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,B google_pay = { 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,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] +ilixium.payment_method = "card" bluesnap.payment_method = "card" nuvei.payment_method = "card" shift4.payment_method = "card" diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml index ff67f79f231..f527a50bad8 100644 --- a/config/deployments/sandbox.toml +++ b/config/deployments/sandbox.toml @@ -95,6 +95,7 @@ hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" hyperwallet.base_url = "https://uat-api.paylution.com" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -974,6 +975,7 @@ apple_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,B google_pay = { 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,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] +ilixium.payment_method = "card" bluesnap.payment_method = "card" nuvei.payment_method = "card" shift4.payment_method = "card" diff --git a/config/development.toml b/config/development.toml index 83eca342515..756f2fffe9b 100644 --- a/config/development.toml +++ b/config/development.toml @@ -366,6 +366,7 @@ hyperwallet.base_url = "https://uat-api.paylution.com" hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -1194,6 +1195,7 @@ finix= { long_lived_token = false, payment_method = "card,wallet" } paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"} [temp_locker_enable_config] +ilixium = { payment_method = "card" } stripe = { payment_method = "bank_transfer" } nuvei = { payment_method = "card" } shift4 = { payment_method = "card" } @@ -1576,7 +1578,7 @@ enabled = "true" base_url = "http://localhost:8000" connection_timeout = 10 request_timeout = 35 -ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate" # Comma-separated list of connectors that use UCS only +ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate, ilixium" # Comma-separated list of connectors that use UCS only ucs_psync_disabled_connectors = "cashtocode, trustly" # Comma-separated list of connectors to disable UCS PSync call [revenue_recovery] diff --git a/config/docker_compose.toml b/config/docker_compose.toml index 7309a311c5d..63d66130b75 100644 --- a/config/docker_compose.toml +++ b/config/docker_compose.toml @@ -265,6 +265,7 @@ hyperwallet.base_url = "https://uat-api.paylution.com" hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1" @@ -524,6 +525,7 @@ finix= { long_lived_token = false, payment_method = "card,wallet" } paysafe= { long_lived_token = false, payment_method = "card,wallet" ,payment_method_type = { type = "enable_only", list = "apple_pay,credit,debit"},allowed_card_authentication_type= "no_three_ds"} [temp_locker_enable_config] +ilixium = { payment_method = "card" } stripe = { payment_method = "bank_transfer" } nuvei = { payment_method = "card" } shift4 = { payment_method = "card" } diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rs index d3598fbb7c9..b67f7ae4cd5 100644 --- a/crates/common_enums/src/connector_enums.rs +++ b/crates/common_enums/src/connector_enums.rs @@ -129,6 +129,7 @@ pub enum Connector { Interpayments, Inespay, Iatapay, + Ilixium, Imerchantsolutions, Itaubank, Jpmorgan, @@ -465,6 +466,7 @@ impl Connector { | Self::Payjustnowinstore | Self::Phonepe | Self::Imerchantsolutions + | Self::Ilixium | Self::Givepayments => false, Self::Stripe | Self::Checkout | Self::Zift | Self::Nmi | Self::Braintree| Self::Cybersource | Self::Archipel | Self::Nuvei | Self::Adyen => true, diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs index 4e2da731815..f771cdfa363 100644 --- a/crates/connector_configs/src/connector.rs +++ b/crates/connector_configs/src/connector.rs @@ -302,6 +302,7 @@ pub struct ConnectorConfig { #[cfg(feature = "payouts")] pub cybersource_payout: Option, pub iatapay: Option, + pub ilixium: Option, pub imerchantsolutions: Option, pub itaubank: Option, #[cfg(feature = "payouts")] @@ -714,6 +715,7 @@ impl ConnectorConfig { Connector::Payjustnow => Ok(connector_data.payjustnow), Connector::Payjustnowinstore => Ok(connector_data.payjustnowinstore), Connector::Imerchantsolutions => Ok(connector_data.imerchantsolutions), + Connector::Ilixium => Ok(connector_data.ilixium), Connector::Givepayments => Ok(connector_data.givepayments), } } diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index 54bb8a7ac69..075c5748798 100644 --- a/crates/connector_configs/toml/development.toml +++ b/crates/connector_configs/toml/development.toml @@ -9048,3 +9048,36 @@ payment_method_type = "UnionPay" [citigate.connector_auth.BodyKey] api_key = "Merchant Name" key1 = "Merchant Password" +[ilixium] +[ilixium.connector_auth.SignatureKey] +api_key = "Digest Calculation Password" +key1 = "Merchant Id" +api_secret = "Account Id" +[[ilixium.credit]] +payment_method_type = "Mastercard" +[[ilixium.credit]] +payment_method_type = "Visa" +[[ilixium.credit]] +payment_method_type = "AmericanExpress" +[[ilixium.credit]] +payment_method_type = "JCB" +[[ilixium.credit]] +payment_method_type = "Discover" +[[ilixium.credit]] +payment_method_type = "DinersClub" +[[ilixium.credit]] +payment_method_type = "UnionPay" +[[ilixium.debit]] +payment_method_type = "Mastercard" +[[ilixium.debit]] +payment_method_type = "Visa" +[[ilixium.debit]] +payment_method_type = "AmericanExpress" +[[ilixium.debit]] +payment_method_type = "JCB" +[[ilixium.debit]] +payment_method_type = "Discover" +[[ilixium.debit]] +payment_method_type = "DinersClub" +[[ilixium.debit]] +payment_method_type = "UnionPay" diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml index b720a135fb9..f2cee9fe688 100644 --- a/crates/connector_configs/toml/production.toml +++ b/crates/connector_configs/toml/production.toml @@ -8103,3 +8103,36 @@ payment_method_type = "UnionPay" [citigate.connector_auth.BodyKey] api_key = "Merchant Name" key1 = "Merchant Password" +[ilixium] +[ilixium.connector_auth.SignatureKey] +api_key = "Digest Calculation Password" +key1 = "Merchant Id" +api_secret = "Account Id" +[[ilixium.credit]] +payment_method_type = "Mastercard" +[[ilixium.credit]] +payment_method_type = "Visa" +[[ilixium.credit]] +payment_method_type = "AmericanExpress" +[[ilixium.credit]] +payment_method_type = "JCB" +[[ilixium.credit]] +payment_method_type = "Discover" +[[ilixium.credit]] +payment_method_type = "DinersClub" +[[ilixium.credit]] +payment_method_type = "UnionPay" +[[ilixium.debit]] +payment_method_type = "Mastercard" +[[ilixium.debit]] +payment_method_type = "Visa" +[[ilixium.debit]] +payment_method_type = "AmericanExpress" +[[ilixium.debit]] +payment_method_type = "JCB" +[[ilixium.debit]] +payment_method_type = "Discover" +[[ilixium.debit]] +payment_method_type = "DinersClub" +[[ilixium.debit]] +payment_method_type = "UnionPay" diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml index c646bf44b63..02a9237b56d 100644 --- a/crates/connector_configs/toml/sandbox.toml +++ b/crates/connector_configs/toml/sandbox.toml @@ -9022,3 +9022,36 @@ payment_method_type = "UnionPay" [citigate.connector_auth.BodyKey] api_key = "Merchant Name" key1 = "Merchant Password" +[ilixium] +[ilixium.connector_auth.SignatureKey] +api_key = "Digest Calculation Password" +key1 = "Merchant Id" +api_secret = "Account Id" +[[ilixium.credit]] +payment_method_type = "Mastercard" +[[ilixium.credit]] +payment_method_type = "Visa" +[[ilixium.credit]] +payment_method_type = "AmericanExpress" +[[ilixium.credit]] +payment_method_type = "JCB" +[[ilixium.credit]] +payment_method_type = "Discover" +[[ilixium.credit]] +payment_method_type = "DinersClub" +[[ilixium.credit]] +payment_method_type = "UnionPay" +[[ilixium.debit]] +payment_method_type = "Mastercard" +[[ilixium.debit]] +payment_method_type = "Visa" +[[ilixium.debit]] +payment_method_type = "AmericanExpress" +[[ilixium.debit]] +payment_method_type = "JCB" +[[ilixium.debit]] +payment_method_type = "Discover" +[[ilixium.debit]] +payment_method_type = "DinersClub" +[[ilixium.debit]] +payment_method_type = "UnionPay" diff --git a/crates/euclid/src/enums.rs b/crates/euclid/src/enums.rs index bc16a0dc1e2..c847c011e27 100644 --- a/crates/euclid/src/enums.rs +++ b/crates/euclid/src/enums.rs @@ -285,6 +285,7 @@ pub enum RoutableConnectors { Helcim, Hyperpg, Iatapay, + Ilixium, Imerchantsolutions, Inespay, Interpayments, @@ -452,6 +453,7 @@ impl TryFrom for RoutableConnectors { Connector::Helcim => Ok(Self::Helcim), Connector::Hyperpg => Ok(Self::Hyperpg), Connector::Iatapay => Ok(Self::Iatapay), + Connector::Ilixium => Ok(Self::Ilixium), Connector::Imerchantsolutions => Ok(Self::Imerchantsolutions), Connector::Interpayments => Ok(Self::Interpayments), Connector::Itaubank => Ok(Self::Itaubank), @@ -621,6 +623,7 @@ impl From for Connector { RoutableConnectors::Helcim => Self::Helcim, RoutableConnectors::Hyperpg => Self::Hyperpg, RoutableConnectors::Iatapay => Self::Iatapay, + RoutableConnectors::Ilixium => Self::Ilixium, RoutableConnectors::Imerchantsolutions => Self::Imerchantsolutions, RoutableConnectors::Interpayments => Self::Interpayments, RoutableConnectors::Itaubank => Self::Itaubank, diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs index 9774543c530..c29896a0cdd 100644 --- a/crates/hyperswitch_connectors/src/connectors.rs +++ b/crates/hyperswitch_connectors/src/connectors.rs @@ -64,6 +64,7 @@ pub mod hyperpg; pub mod hyperswitch_vault; pub mod hyperwallet; pub mod iatapay; +pub mod ilixium; pub mod imerchantsolutions; pub mod inespay; pub mod interpayments; @@ -169,13 +170,14 @@ pub use self::{ flexiti::Flexiti, forte::Forte, getnet::Getnet, gigadat::Gigadat, givepayments::Givepayments, globalpay::Globalpay, globepay::Globepay, gocardless::Gocardless, gpayments::Gpayments, helcim::Helcim, hipay::Hipay, hyperpg::Hyperpg, hyperswitch_vault::HyperswitchVault, - hyperwallet::Hyperwallet, iatapay::Iatapay, imerchantsolutions::Imerchantsolutions, - inespay::Inespay, interpayments::Interpayments, itaubank::Itaubank, jpmorgan::Jpmorgan, - juspaythreedsserver::Juspaythreedsserver, katapult::Katapult, klarna::Klarna, loonio::Loonio, - mifinity::Mifinity, mollie::Mollie, moneris::Moneris, mpgs::Mpgs, multisafepay::Multisafepay, - netcetera::Netcetera, nexinets::Nexinets, nexixpay::Nexixpay, nmi::Nmi, nomupay::Nomupay, - noon::Noon, nordea::Nordea, novalnet::Novalnet, nuvei::Nuvei, opayo::Opayo, opennode::Opennode, - paybox::Paybox, payconex::Payconex, payeezy::Payeezy, payjustnow::Payjustnow, + hyperwallet::Hyperwallet, iatapay::Iatapay, ilixium::Ilixium, + imerchantsolutions::Imerchantsolutions, inespay::Inespay, interpayments::Interpayments, + itaubank::Itaubank, jpmorgan::Jpmorgan, juspaythreedsserver::Juspaythreedsserver, + katapult::Katapult, klarna::Klarna, loonio::Loonio, mifinity::Mifinity, mollie::Mollie, + moneris::Moneris, mpgs::Mpgs, multisafepay::Multisafepay, netcetera::Netcetera, + nexinets::Nexinets, nexixpay::Nexixpay, nmi::Nmi, nomupay::Nomupay, noon::Noon, nordea::Nordea, + novalnet::Novalnet, nuvei::Nuvei, opayo::Opayo, opennode::Opennode, paybox::Paybox, + payconex::Payconex, payeezy::Payeezy, payjustnow::Payjustnow, payjustnowinstore::Payjustnowinstore, payload::Payload, payme::Payme, payone::Payone, paypal::Paypal, paysafe::Paysafe, paystack::Paystack, paytm::Paytm, payu::Payu, peachpayments::Peachpayments, phonepe::Phonepe, placetopay::Placetopay, plaid::Plaid, diff --git a/crates/hyperswitch_connectors/src/connectors/ilixium.rs b/crates/hyperswitch_connectors/src/connectors/ilixium.rs new file mode 100644 index 00000000000..2c14dfcab42 --- /dev/null +++ b/crates/hyperswitch_connectors/src/connectors/ilixium.rs @@ -0,0 +1,688 @@ +pub mod transformers; + +use std::sync::LazyLock; + +use common_enums::enums; +use common_utils::{ + errors::CustomResult, + ext_traits::BytesExt, + request::{Method, Request, RequestBuilder, RequestContent}, + types::{AmountConvertor, MinorUnit, MinorUnitForConnector}, +}; +use error_stack::{report, ResultExt}; +use hyperswitch_domain_models::{ + router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData}, + router_flow_types::{ + access_token_auth::AccessTokenAuth, + payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void}, + refunds::{Execute, RSync}, + }, + router_request_types::{ + AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData, + PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData, + RefundsData, SetupMandateRequestData, + }, + router_response_types::{ + ConnectorInfo, PaymentMethodDetails, PaymentsResponseData, RefundsResponseData, + SupportedPaymentMethods, SupportedPaymentMethodsExt, + }, + types::{ + PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData, + RefundSyncRouterData, RefundsRouterData, + }, +}; +use hyperswitch_interfaces::{ + api::{ + self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications, + ConnectorValidation, + }, + configs::Connectors, + errors, + events::connector_api_logs::ConnectorEvent, + types::{self, Response}, + webhooks, +}; +use hyperswitch_masking::{ExposeInterface, Mask}; +use transformers as ilixium; + +use crate::{ + constants::headers, + types::ResponseRouterData, + utils::{self, PaymentsAuthorizeRequestData}, +}; + +#[derive(Clone)] +pub struct Ilixium { + amount_converter: &'static (dyn AmountConvertor + Sync), +} + +impl Ilixium { + pub fn new() -> &'static Self { + &Self { + amount_converter: &MinorUnitForConnector, + } + } +} + +impl api::Payment for Ilixium {} +impl api::PaymentSession for Ilixium {} +impl api::ConnectorAccessToken for Ilixium {} +impl api::MandateSetup for Ilixium {} +impl api::PaymentAuthorize for Ilixium {} +impl api::PaymentSync for Ilixium {} +impl api::PaymentCapture for Ilixium {} +impl api::PaymentVoid for Ilixium {} +impl api::Refund for Ilixium {} +impl api::RefundExecute for Ilixium {} +impl api::RefundSync for Ilixium {} +impl api::PaymentToken for Ilixium {} + +impl ConnectorIntegration + for Ilixium +{ + // Not Implemented (R) +} + +impl ConnectorCommonExt for Ilixium +where + Self: ConnectorIntegration, +{ + fn build_headers( + &self, + req: &RouterData, + _connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + let mut 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) + } +} + +impl ConnectorCommon for Ilixium { + fn id(&self) -> &'static str { + "ilixium" + } + + fn get_currency_unit(&self) -> api::CurrencyUnit { + api::CurrencyUnit::Minor + } + + fn common_get_content_type(&self) -> &'static str { + "application/json" + } + + fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str { + connectors.ilixium.base_url.as_ref() + } + + fn get_auth_header( + &self, + auth_type: &ConnectorAuthType, + ) -> CustomResult)>, errors::ConnectorError> + { + let auth = ilixium::IlixiumAuthType::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 { + let response: ilixium::IlixiumErrorResponse = res + .response + .parse_struct("IlixiumErrorResponse") + .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, + connector_response_reference_id: None, + network_advice_code: None, + network_decline_code: None, + network_error_message: None, + connector_metadata: None, + }) + } +} + +impl ConnectorValidation for Ilixium { + fn validate_psync_reference_id( + &self, + _data: &PaymentsSyncData, + _is_three_ds: bool, + _status: enums::AttemptStatus, + _connector_meta_data: Option, + ) -> CustomResult<(), errors::ConnectorError> { + Ok(()) + } +} + +impl ConnectorIntegration for Ilixium { + //TODO: implement sessions flow +} + +impl ConnectorIntegration for Ilixium {} + +impl ConnectorIntegration for Ilixium {} + +impl ConnectorIntegration for Ilixium { + fn get_headers( + &self, + req: &PaymentsAuthorizeRouterData, + connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + self.build_headers(req, connectors) + } + + fn get_content_type(&self) -> &'static str { + self.common_get_content_type() + } + + fn get_url( + &self, + _req: &PaymentsAuthorizeRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) + } + + fn get_request_body( + &self, + req: &PaymentsAuthorizeRouterData, + _connectors: &Connectors, + ) -> CustomResult { + let amount = utils::convert_amount( + self.amount_converter, + req.request.minor_amount, + req.request.currency, + )?; + + let connector_router_data = ilixium::IlixiumRouterData::from((amount, req)); + let connector_req = ilixium::IlixiumPaymentsRequest::try_from(&connector_router_data)?; + Ok(RequestContent::Json(Box::new(connector_req))) + } + + fn build_request( + &self, + req: &PaymentsAuthorizeRouterData, + connectors: &Connectors, + ) -> CustomResult, errors::ConnectorError> { + Ok(Some( + RequestBuilder::new() + .method(Method::Post) + .url(&types::PaymentsAuthorizeType::get_url( + self, req, connectors, + )?) + .attach_default_headers() + .headers(types::PaymentsAuthorizeType::get_headers( + self, req, connectors, + )?) + .set_body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) + .build(), + )) + } + + fn handle_response( + &self, + data: &PaymentsAuthorizeRouterData, + event_builder: Option<&mut ConnectorEvent>, + res: Response, + ) -> CustomResult { + let response: ilixium::IlixiumPaymentsResponse = res + .response + .parse_struct("Ilixium PaymentsAuthorizeResponse") + .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; + 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 { + self.build_error_response(res, event_builder) + } +} + +impl ConnectorIntegration for Ilixium { + fn get_headers( + &self, + req: &PaymentsSyncRouterData, + connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + self.build_headers(req, connectors) + } + + fn get_content_type(&self) -> &'static str { + self.common_get_content_type() + } + + fn get_url( + &self, + _req: &PaymentsSyncRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) + } + + fn build_request( + &self, + req: &PaymentsSyncRouterData, + connectors: &Connectors, + ) -> CustomResult, errors::ConnectorError> { + Ok(Some( + RequestBuilder::new() + .method(Method::Get) + .url(&types::PaymentsSyncType::get_url(self, req, connectors)?) + .attach_default_headers() + .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?) + .build(), + )) + } + + fn handle_response( + &self, + data: &PaymentsSyncRouterData, + event_builder: Option<&mut ConnectorEvent>, + res: Response, + ) -> CustomResult { + let response: ilixium::IlixiumPaymentsResponse = res + .response + .parse_struct("ilixium PaymentsSyncResponse") + .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; + 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 { + self.build_error_response(res, event_builder) + } +} + +impl ConnectorIntegration for Ilixium { + fn get_headers( + &self, + req: &PaymentsCaptureRouterData, + connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + self.build_headers(req, connectors) + } + + fn get_content_type(&self) -> &'static str { + self.common_get_content_type() + } + + fn get_url( + &self, + _req: &PaymentsCaptureRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) + } + + fn get_request_body( + &self, + _req: &PaymentsCaptureRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) + } + + fn build_request( + &self, + req: &PaymentsCaptureRouterData, + connectors: &Connectors, + ) -> CustomResult, errors::ConnectorError> { + Ok(Some( + RequestBuilder::new() + .method(Method::Post) + .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?) + .attach_default_headers() + .headers(types::PaymentsCaptureType::get_headers( + self, req, connectors, + )?) + .set_body(types::PaymentsCaptureType::get_request_body( + self, req, connectors, + )?) + .build(), + )) + } + + fn handle_response( + &self, + data: &PaymentsCaptureRouterData, + event_builder: Option<&mut ConnectorEvent>, + res: Response, + ) -> CustomResult { + let response: ilixium::IlixiumPaymentsResponse = res + .response + .parse_struct("Ilixium PaymentsCaptureResponse") + .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; + 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 { + self.build_error_response(res, event_builder) + } +} + +impl ConnectorIntegration for Ilixium {} + +impl ConnectorIntegration for Ilixium { + fn get_headers( + &self, + req: &RefundsRouterData, + connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + self.build_headers(req, connectors) + } + + fn get_content_type(&self) -> &'static str { + self.common_get_content_type() + } + + fn get_url( + &self, + _req: &RefundsRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) + } + + fn get_request_body( + &self, + req: &RefundsRouterData, + _connectors: &Connectors, + ) -> CustomResult { + let refund_amount = utils::convert_amount( + self.amount_converter, + req.request.minor_refund_amount, + req.request.currency, + )?; + + let connector_router_data = ilixium::IlixiumRouterData::from((refund_amount, req)); + let connector_req = ilixium::IlixiumRefundRequest::try_from(&connector_router_data)?; + Ok(RequestContent::Json(Box::new(connector_req))) + } + + fn build_request( + &self, + req: &RefundsRouterData, + connectors: &Connectors, + ) -> CustomResult, errors::ConnectorError> { + let request = RequestBuilder::new() + .method(Method::Post) + .url(&types::RefundExecuteType::get_url(self, req, connectors)?) + .attach_default_headers() + .headers(types::RefundExecuteType::get_headers( + self, req, connectors, + )?) + .set_body(types::RefundExecuteType::get_request_body( + self, req, connectors, + )?) + .build(); + Ok(Some(request)) + } + + fn handle_response( + &self, + data: &RefundsRouterData, + event_builder: Option<&mut ConnectorEvent>, + res: Response, + ) -> CustomResult, errors::ConnectorError> { + let response: ilixium::RefundResponse = res + .response + .parse_struct("ilixium RefundResponse") + .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; + 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 { + self.build_error_response(res, event_builder) + } +} + +impl ConnectorIntegration for Ilixium { + fn get_headers( + &self, + req: &RefundSyncRouterData, + connectors: &Connectors, + ) -> CustomResult)>, errors::ConnectorError> + { + self.build_headers(req, connectors) + } + + fn get_content_type(&self) -> &'static str { + self.common_get_content_type() + } + + fn get_url( + &self, + _req: &RefundSyncRouterData, + _connectors: &Connectors, + ) -> CustomResult { + Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) + } + + fn build_request( + &self, + req: &RefundSyncRouterData, + connectors: &Connectors, + ) -> CustomResult, errors::ConnectorError> { + Ok(Some( + RequestBuilder::new() + .method(Method::Get) + .url(&types::RefundSyncType::get_url(self, req, connectors)?) + .attach_default_headers() + .headers(types::RefundSyncType::get_headers(self, req, connectors)?) + .set_body(types::RefundSyncType::get_request_body( + self, req, connectors, + )?) + .build(), + )) + } + + fn handle_response( + &self, + data: &RefundSyncRouterData, + event_builder: Option<&mut ConnectorEvent>, + res: Response, + ) -> CustomResult { + let response: ilixium::RefundResponse = res + .response + .parse_struct("ilixium RefundSyncResponse") + .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; + 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 { + self.build_error_response(res, event_builder) + } +} + +#[async_trait::async_trait] +impl webhooks::IncomingWebhook for Ilixium { + fn get_webhook_object_reference_id( + &self, + _request: &webhooks::IncomingWebhookRequestDetails<'_>, + ) -> CustomResult { + Err(report!(errors::ConnectorError::WebhooksNotImplemented)) + } + + fn get_webhook_event_type( + &self, + _request: &webhooks::IncomingWebhookRequestDetails<'_>, + _context: Option<&webhooks::WebhookContext>, + ) -> CustomResult { + Err(report!(errors::ConnectorError::WebhooksNotImplemented)) + } + + fn get_webhook_resource_object( + &self, + _request: &webhooks::IncomingWebhookRequestDetails<'_>, + ) -> CustomResult, errors::ConnectorError> + { + Err(report!(errors::ConnectorError::WebhooksNotImplemented)) + } +} + +static ILIXIUM_SUPPORTED_PAYMENT_METHODS: LazyLock = LazyLock::new(|| { + let supported_capture_methods = vec![enums::CaptureMethod::Automatic]; + + let supported_card_networks = vec![ + common_enums::CardNetwork::Visa, + common_enums::CardNetwork::Mastercard, + common_enums::CardNetwork::AmericanExpress, + common_enums::CardNetwork::JCB, + common_enums::CardNetwork::DinersClub, + common_enums::CardNetwork::Discover, + common_enums::CardNetwork::UnionPay, + ]; + + let mut ilixium_supported_payment_methods = SupportedPaymentMethods::new(); + + ilixium_supported_payment_methods.add( + enums::PaymentMethod::Card, + enums::PaymentMethodType::Credit, + PaymentMethodDetails { + mandates: enums::FeatureStatus::Supported, + refunds: 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_networks.clone(), + } + }), + ), + }, + ); + + ilixium_supported_payment_methods.add( + enums::PaymentMethod::Card, + enums::PaymentMethodType::Debit, + PaymentMethodDetails { + mandates: enums::FeatureStatus::Supported, + refunds: 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, + } + }), + ), + }, + ); + + ilixium_supported_payment_methods +}); + +static ILIXIUM_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo { + display_name: "Ilixium", + description: "GivePayments connects providers, merchants, and customers through a fully integrated ecosystem of payment tools and services with built-in chargeback prevention, automated underwriting, and PCI DSS 4.0-level security.", + connector_type: enums::HyperswitchConnectorCategory::PaymentGateway, + integration_status: enums::ConnectorIntegrationStatus::Alpha, +}; + +static ILIXIUM_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 0] = []; + +impl ConnectorSpecifications for Ilixium { + fn get_connector_about(&self) -> Option<&'static ConnectorInfo> { + Some(&ILIXIUM_CONNECTOR_INFO) + } + + fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { + Some(&*ILIXIUM_SUPPORTED_PAYMENT_METHODS) + } + + fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> { + Some(&ILIXIUM_SUPPORTED_WEBHOOK_FLOWS) + } + + fn is_pre_authentication_flow_required(&self, current_flow: api::CurrentFlowInfo) -> bool { + match current_flow { + api::CurrentFlowInfo::Authorize { + auth_type, + request_data, + } => auth_type.is_three_ds() && request_data.is_card(), + api::CurrentFlowInfo::CompleteAuthorize { .. } + | api::CurrentFlowInfo::SetupMandate { .. } + | api::CurrentFlowInfo::Psync { .. } + | api::CurrentFlowInfo::UpdatePostConfirm { .. } + | api::CurrentFlowInfo::ConnectorWebhookRegister { .. } => false, + } + } +} diff --git a/crates/hyperswitch_connectors/src/connectors/ilixium/transformers.rs b/crates/hyperswitch_connectors/src/connectors/ilixium/transformers.rs new file mode 100644 index 00000000000..76edf7813b7 --- /dev/null +++ b/crates/hyperswitch_connectors/src/connectors/ilixium/transformers.rs @@ -0,0 +1,237 @@ +use common_enums::enums; +use common_utils::types::MinorUnit; +use hyperswitch_domain_models::{ + payment_method_data::PaymentMethodData, + router_data::{ConnectorAuthType, RouterData}, + router_flow_types::refunds::{Execute, RSync}, + router_request_types::ResponseId, + router_response_types::{PaymentsResponseData, RefundsResponseData}, + types::{PaymentsAuthorizeRouterData, RefundsRouterData}, +}; +use hyperswitch_interfaces::errors; +use hyperswitch_masking::Secret; +use serde::{Deserialize, Serialize}; + +use crate::types::{RefundsResponseRouterData, ResponseRouterData}; + +//TODO: Fill the struct with respective fields +pub struct IlixiumRouterData { + pub amount: MinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc. + pub router_data: T, +} + +impl From<(MinorUnit, T)> for IlixiumRouterData { + fn from((amount, item): (MinorUnit, T)) -> Self { + //Todo : use utils to convert the amount to the type of amount that a connector accepts + Self { + amount, + router_data: item, + } + } +} + +//TODO: Fill the struct with respective fields +#[derive(Default, Debug, Serialize, PartialEq)] +pub struct IlixiumPaymentsRequest { + amount: MinorUnit, + card: IlixiumCard, +} + +#[derive(Default, Debug, Serialize, Eq, PartialEq)] +pub struct IlixiumCard { + number: cards::CardNumber, + expiry_month: Secret, + expiry_year: Secret, + cvc: Secret, + complete: bool, +} + +impl TryFrom<&IlixiumRouterData<&PaymentsAuthorizeRouterData>> for IlixiumPaymentsRequest { + type Error = error_stack::Report; + fn try_from( + item: &IlixiumRouterData<&PaymentsAuthorizeRouterData>, + ) -> Result { + match item.router_data.request.payment_method_data.clone() { + PaymentMethodData::Card(_) => Err(errors::ConnectorError::NotImplemented( + "Card payment method not implemented".to_string(), + ) + .into()), + _ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()), + } + } +} + +// Auth Struct +// +// Ilixium is routed through the Unified Connector Service (UCS); this struct only +// validates the shape of the credentials stored on the merchant connector account. +// - `api_key` => Digest Calculation Password (input to `x-merchant-digest`) +// - `key1` => MerchantId (sent as `merchant.merchantId` in the request body) +// - `api_secret` => AccountId (sent as `merchant.accountId` in the request body) +pub struct IlixiumAuthType { + #[allow(dead_code)] + pub(super) api_key: Secret, + #[allow(dead_code)] + pub(super) key1: Secret, + #[allow(dead_code)] + pub(super) api_secret: Secret, +} + +impl TryFrom<&ConnectorAuthType> for IlixiumAuthType { + type Error = error_stack::Report; + fn try_from(auth_type: &ConnectorAuthType) -> Result { + match auth_type { + ConnectorAuthType::SignatureKey { + api_key, + key1, + api_secret, + } => Ok(Self { + api_key: api_key.to_owned(), + key1: key1.to_owned(), + api_secret: api_secret.to_owned(), + }), + _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()), + } + } +} +// PaymentsResponse +//TODO: Append the remaining status flags +#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq)] +#[serde(rename_all = "lowercase")] +pub enum IlixiumPaymentStatus { + Succeeded, + Failed, + #[default] + Processing, +} + +impl From for common_enums::AttemptStatus { + fn from(item: IlixiumPaymentStatus) -> Self { + match item { + IlixiumPaymentStatus::Succeeded => Self::Charged, + IlixiumPaymentStatus::Failed => Self::Failure, + IlixiumPaymentStatus::Processing => Self::Authorizing, + } + } +} + +//TODO: Fill the struct with respective fields +#[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct IlixiumPaymentsResponse { + status: IlixiumPaymentStatus, + id: String, +} + +impl TryFrom> + for RouterData +{ + type Error = error_stack::Report; + fn try_from( + item: ResponseRouterData, + ) -> Result { + 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, + network_txn_link_id: None, + connector_response_reference_id: None, + incremental_authorization_allowed: None, + authentication_data: None, + charges: None, + }), + ..item.data + }) + } +} + +//TODO: Fill the struct with respective fields +// REFUND : +// Type definition for RefundRequest +#[derive(Default, Debug, Serialize)] +pub struct IlixiumRefundRequest { + pub amount: MinorUnit, +} + +impl TryFrom<&IlixiumRouterData<&RefundsRouterData>> for IlixiumRefundRequest { + type Error = error_stack::Report; + fn try_from(item: &IlixiumRouterData<&RefundsRouterData>) -> Result { + Ok(Self { + amount: item.amount.to_owned(), + }) + } +} + +// Type definition for Refund Response + +#[allow(dead_code)] +#[derive(Debug, Copy, Serialize, Default, Deserialize, Clone)] +pub enum RefundStatus { + Succeeded, + Failed, + #[default] + Processing, +} + +impl From 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 + } + } +} + +//TODO: Fill the struct with respective fields +#[derive(Default, Debug, Clone, Serialize, Deserialize)] +pub struct RefundResponse { + id: String, + status: RefundStatus, +} + +impl TryFrom> for RefundsRouterData { + type Error = error_stack::Report; + fn try_from( + item: RefundsResponseRouterData, + ) -> Result { + Ok(Self { + response: Ok(RefundsResponseData { + connector_refund_id: item.response.id.to_string(), + refund_status: enums::RefundStatus::from(item.response.status), + }), + ..item.data + }) + } +} + +impl TryFrom> for RefundsRouterData { + type Error = error_stack::Report; + fn try_from( + item: RefundsResponseRouterData, + ) -> Result { + Ok(Self { + response: Ok(RefundsResponseData { + connector_refund_id: item.response.id.to_string(), + refund_status: enums::RefundStatus::from(item.response.status), + }), + ..item.data + }) + } +} + +//TODO: Fill the struct with respective fields +#[derive(Default, Debug, Serialize, Deserialize, PartialEq)] +pub struct IlixiumErrorResponse { + pub status_code: u16, + pub code: String, + pub message: String, + pub reason: Option, + pub network_advice_code: Option, + pub network_decline_code: Option, + pub network_error_message: Option, +} diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs index be05d3b129c..7d73e5660ba 100644 --- a/crates/hyperswitch_connectors/src/default_implementations.rs +++ b/crates/hyperswitch_connectors/src/default_implementations.rs @@ -259,6 +259,7 @@ default_imp_for_authorize_session_token!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -423,6 +424,7 @@ default_imp_for_payment_settlement_split_create!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -589,6 +591,7 @@ default_imp_for_calculate_tax!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -747,6 +750,7 @@ default_imp_for_session_update!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -913,6 +917,7 @@ default_imp_for_post_session_tokens!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -1076,6 +1081,7 @@ default_imp_for_create_order!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -1256,6 +1262,7 @@ default_imp_for_update_post_confirm!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Itaubank, @@ -1405,6 +1412,7 @@ default_imp_for_update_metadata!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -1580,6 +1588,7 @@ default_imp_for_cancel_post_capture!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -1755,6 +1764,7 @@ default_imp_for_cancel_post_capture_sync!( connectors::Hyperwallet, connectors::Hyperpg, connectors::Iatapay, + connectors::Ilixium, connectors::Inespay, connectors::Itaubank, connectors::Imerchantsolutions, @@ -1924,6 +1934,7 @@ default_imp_for_complete_authorize!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2071,6 +2082,7 @@ default_imp_for_incremental_authorization!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2223,6 +2235,7 @@ default_imp_for_extend_authorization!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2392,6 +2405,7 @@ default_imp_for_create_customer!( connectors::Helcim, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2551,6 +2565,7 @@ default_imp_for_connector_redirect_response!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2703,6 +2718,7 @@ default_imp_for_pre_authenticate_steps!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -2861,6 +2877,7 @@ default_imp_for_authenticate_steps!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3026,6 +3043,7 @@ default_imp_for_post_authenticate_steps!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3192,6 +3210,7 @@ default_imp_for_pre_processing_steps!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3342,6 +3361,7 @@ default_imp_for_post_processing_steps!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3509,6 +3529,7 @@ default_imp_for_approve!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3677,6 +3698,7 @@ default_imp_for_reject!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -3847,6 +3869,7 @@ default_imp_for_webhook_source_verification!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4010,6 +4033,7 @@ default_imp_for_accept_dispute!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4174,6 +4198,7 @@ default_imp_for_submit_evidence!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4337,6 +4362,7 @@ default_imp_for_defend_dispute!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4505,6 +4531,7 @@ default_imp_for_fetch_disputes!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4672,6 +4699,7 @@ default_imp_for_dispute_sync!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -4847,6 +4875,7 @@ default_imp_for_file_upload!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5002,6 +5031,7 @@ default_imp_for_payouts!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5155,6 +5185,7 @@ default_imp_for_payouts_create!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5320,6 +5351,7 @@ default_imp_for_payouts_retrieve!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5481,6 +5513,7 @@ default_imp_for_payouts_eligibility!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5645,6 +5678,7 @@ default_imp_for_payouts_fulfill!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5801,6 +5835,7 @@ default_imp_for_payouts_cancel!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -5965,6 +6000,7 @@ default_imp_for_payouts_quote!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6132,6 +6168,7 @@ default_imp_for_payouts_recipient!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6298,6 +6335,7 @@ default_imp_for_payouts_recipient_account!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6466,6 +6504,7 @@ default_imp_for_frm_sale!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6633,6 +6672,7 @@ default_imp_for_frm_checkout!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6800,6 +6840,7 @@ default_imp_for_frm_transaction!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -6968,6 +7009,7 @@ default_imp_for_frm_fulfillment!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7136,6 +7178,7 @@ default_imp_for_frm_record_return!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7299,6 +7342,7 @@ default_imp_for_revoking_mandates!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7465,6 +7509,7 @@ default_imp_for_uas_pre_authentication!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7630,6 +7675,7 @@ default_imp_for_uas_webhook!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7795,6 +7841,7 @@ default_imp_for_uas_post_authentication!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -7961,6 +8008,7 @@ default_imp_for_uas_authentication_confirmation!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -8118,6 +8166,7 @@ default_imp_for_connector_request_id!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -8278,6 +8327,7 @@ default_imp_for_fraud_check!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -8467,6 +8517,7 @@ default_imp_for_connector_authentication!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -8631,6 +8682,7 @@ default_imp_for_uas_authentication!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -8789,6 +8841,7 @@ default_imp_for_revenue_recovery!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9007,6 +9060,7 @@ default_imp_for_subscriptions!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9175,6 +9229,7 @@ default_imp_for_billing_connector_payment_sync!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9335,6 +9390,7 @@ default_imp_for_revenue_recovery_record_back!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9502,6 +9558,7 @@ default_imp_for_billing_connector_invoice_sync!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9663,6 +9720,7 @@ default_imp_for_external_vault!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9829,6 +9887,7 @@ default_imp_for_external_vault_insert!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -9992,6 +10051,7 @@ default_imp_for_gift_card_balance_check!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -10160,6 +10220,7 @@ default_imp_for_external_vault_retrieve!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -10326,6 +10387,7 @@ default_imp_for_external_vault_delete!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -10493,6 +10555,7 @@ default_imp_for_external_vault_create!( connectors::Hipay, connectors::Hyperpg, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -10661,6 +10724,7 @@ default_imp_for_connector_authentication_token!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -10826,6 +10890,7 @@ default_imp_for_external_vault_proxy_payments_create!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -11004,6 +11069,7 @@ default_imp_for_connector_webhook_register!( connectors::Hyperwallet, connectors::Hyperpg, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -11980,6 +12046,7 @@ default_imp_for_generate_qr_flow!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -12147,6 +12214,7 @@ default_imp_for_push_notification_flow!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Imerchantsolutions, connectors::Inespay, connectors::Interpayments, @@ -12314,6 +12382,7 @@ default_imp_for_pre_authorize_void!( connectors::HyperswitchVault, connectors::Hyperwallet, connectors::Iatapay, + connectors::Ilixium, connectors::Inespay, connectors::Itaubank, connectors::Jpmorgan, diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs index 3c5c5dd1d28..8747e96aa93 100644 --- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs +++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs @@ -446,6 +446,7 @@ default_imp_for_new_connector_integration_payment!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -614,6 +615,7 @@ default_imp_for_new_connector_integration_refund!( connectors::HyperswitchVault, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -775,6 +777,7 @@ default_imp_for_new_connector_integration_connector_authentication_token!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -933,6 +936,7 @@ default_imp_for_new_connector_integration_connector_access_token!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1101,6 +1105,7 @@ default_imp_for_new_connector_integration_accept_dispute!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1269,6 +1274,7 @@ default_imp_for_new_connector_integration_fetch_disputes!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1438,6 +1444,7 @@ default_imp_for_new_connector_integration_dispute_sync!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1607,6 +1614,7 @@ default_imp_for_new_connector_integration_defend_dispute!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1774,6 +1782,7 @@ default_imp_for_new_connector_integration_submit_evidence!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -1952,6 +1961,7 @@ default_imp_for_new_connector_integration_file_upload!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2122,6 +2132,7 @@ default_imp_for_new_connector_integration_payouts_create!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2292,6 +2303,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2462,6 +2474,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2632,6 +2645,7 @@ default_imp_for_new_connector_integration_payouts_cancel!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2802,6 +2816,7 @@ default_imp_for_new_connector_integration_payouts_quote!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -2972,6 +2987,7 @@ default_imp_for_new_connector_integration_payouts_recipient!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3142,6 +3158,7 @@ default_imp_for_new_connector_integration_payouts_sync!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3312,6 +3329,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3480,6 +3498,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3650,6 +3669,7 @@ default_imp_for_new_connector_integration_frm_sale!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3820,6 +3840,7 @@ default_imp_for_new_connector_integration_frm_checkout!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -3990,6 +4011,7 @@ default_imp_for_new_connector_integration_frm_transaction!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -4160,6 +4182,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -4330,6 +4353,7 @@ default_imp_for_new_connector_integration_frm_record_return!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -4498,6 +4522,7 @@ default_imp_for_new_connector_integration_revoking_mandates!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -4596,6 +4621,7 @@ macro_rules! default_imp_for_new_connector_integration_frm { default_imp_for_new_connector_integration_frm!( connectors::AbsaSanlam, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Loonio, connectors::Gigadat, connectors::Givepayments, @@ -4763,6 +4789,7 @@ macro_rules! default_imp_for_new_connector_integration_connector_authentication default_imp_for_new_connector_integration_connector_authentication!( connectors::AbsaSanlam, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Loonio, connectors::Gigadat, connectors::Givepayments, @@ -4919,6 +4946,7 @@ macro_rules! default_imp_for_new_connector_integration_revenue_recovery { default_imp_for_new_connector_integration_revenue_recovery!( connectors::AbsaSanlam, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Loonio, connectors::Gigadat, connectors::Givepayments, @@ -5147,6 +5175,7 @@ default_imp_for_new_connector_integration_external_vault!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -5314,6 +5343,7 @@ default_imp_for_new_connector_integration_external_vault_proxy!( connectors::Hyperwallet, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, @@ -5494,6 +5524,7 @@ default_imp_for_new_connector_integration_webhook_register!( connectors::Hyperpg, connectors::Iatapay, connectors::Imerchantsolutions, + connectors::Ilixium, connectors::Inespay, connectors::Interpayments, connectors::Itaubank, diff --git a/crates/hyperswitch_domain_models/src/connector_endpoints.rs b/crates/hyperswitch_domain_models/src/connector_endpoints.rs index 4c499172657..ec6ca7c6ace 100644 --- a/crates/hyperswitch_domain_models/src/connector_endpoints.rs +++ b/crates/hyperswitch_domain_models/src/connector_endpoints.rs @@ -77,6 +77,7 @@ pub struct Connectors { pub hyperswitch_vault: ConnectorParams, pub hyperwallet: ConnectorParams, pub iatapay: ConnectorParams, + pub ilixium: ConnectorParams, pub imerchantsolutions: ConnectorParams, pub inespay: ConnectorParams, pub interpayments: ConnectorParams, diff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rs index 06feea9da57..a6d5317cfb4 100644 --- a/crates/hyperswitch_domain_models/src/router_request_types.rs +++ b/crates/hyperswitch_domain_models/src/router_request_types.rs @@ -1502,6 +1502,13 @@ pub struct RefundsData { pub merchant_config_currency: Option, pub capture_method: Option, pub additional_payment_method_data: Option, + /// The `connector_request_reference_id` that was sent to the connector for the *original + /// payment* this refund targets. + /// + /// `RouterData::connector_request_reference_id` identifies the refund itself, and + /// `connector_transaction_id` holds the connector-generated identifier, so neither can be used + /// by connectors that bind a refund to the merchant-side reference of the original payment. + pub payment_connector_request_reference_id: Option, } #[derive(Debug, Clone, PartialEq, serde::Serialize)] diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs index 0a5dd51b9d5..8ec4a6c14af 100644 --- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs +++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs @@ -1851,6 +1851,27 @@ fn get_cards_required_fields() -> HashMap { Connector::Imerchantsolutions, fields(vec![], card_basic(), vec![]), ), + ( + Connector::Ilixium, + fields( + vec![], + vec![ + RequiredField::CardNumber, + RequiredField::CardExpMonth, + RequiredField::CardExpYear, + RequiredField::CardCvc, + RequiredField::Email, + RequiredField::BillingAddressCountries(vec!["ALL"]), + // Ilixium requires `customer.firstName` and `customer.surname` on every + // authorisation. On a 3DS payment the billing address is the *only* source: + // that leg runs as PreAuthenticate, and `PaymentsPreAuthenticateData` carries + // no `customer_name` for the connector to fall back on. + RequiredField::BillingFirstName("first_name", FieldType::UserFullName), + RequiredField::BillingLastName("last_name", FieldType::UserFullName), + ], + vec![], + ), + ), ( Connector::Givepayments, RequiredFieldFinal { diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs index 60466636406..4e57752b481 100644 --- a/crates/router/src/connector.rs +++ b/crates/router/src/connector.rs @@ -27,19 +27,20 @@ pub use hyperswitch_connectors::connectors::{ globepay, globepay::Globepay, gocardless, gocardless::Gocardless, gpayments, gpayments::Gpayments, helcim, helcim::Helcim, hipay, hipay::Hipay, hyperpg, hyperpg::Hyperpg, hyperswitch_vault, hyperswitch_vault::HyperswitchVault, hyperwallet, hyperwallet::Hyperwallet, - iatapay, iatapay::Iatapay, imerchantsolutions, imerchantsolutions::Imerchantsolutions, inespay, - inespay::Inespay, interpayments, interpayments::Interpayments, itaubank, itaubank::Itaubank, - jpmorgan, jpmorgan::Jpmorgan, juspaythreedsserver, juspaythreedsserver::Juspaythreedsserver, - katapult, katapult::Katapult, klarna, klarna::Klarna, loonio, loonio::Loonio, mifinity, - mifinity::Mifinity, mollie, mollie::Mollie, moneris, moneris::Moneris, mpgs, mpgs::Mpgs, - multisafepay, multisafepay::Multisafepay, netcetera, netcetera::Netcetera, nexinets, - nexinets::Nexinets, nexixpay, nexixpay::Nexixpay, nmi, nmi::Nmi, nomupay, nomupay::Nomupay, - noon, noon::Noon, nordea, nordea::Nordea, novalnet, novalnet::Novalnet, nuvei, nuvei::Nuvei, - opayo, opayo::Opayo, opennode, opennode::Opennode, paybox, paybox::Paybox, payconex, - payconex::Payconex, payeezy, payeezy::Payeezy, payjustnow, payjustnow::Payjustnow, - payjustnowinstore, payjustnowinstore::Payjustnowinstore, payload, payload::Payload, payme, - payme::Payme, payone, payone::Payone, paypal, paypal::Paypal, paysafe, paysafe::Paysafe, - paystack, paystack::Paystack, paytm, paytm::Paytm, payu, payu::Payu, peachpayments, + iatapay, iatapay::Iatapay, ilixium, ilixium::Ilixium, imerchantsolutions, + imerchantsolutions::Imerchantsolutions, inespay, inespay::Inespay, interpayments, + interpayments::Interpayments, itaubank, itaubank::Itaubank, jpmorgan, jpmorgan::Jpmorgan, + juspaythreedsserver, juspaythreedsserver::Juspaythreedsserver, katapult, katapult::Katapult, + klarna, klarna::Klarna, loonio, loonio::Loonio, mifinity, mifinity::Mifinity, mollie, + mollie::Mollie, moneris, moneris::Moneris, mpgs, mpgs::Mpgs, multisafepay, + multisafepay::Multisafepay, netcetera, netcetera::Netcetera, nexinets, nexinets::Nexinets, + nexixpay, nexixpay::Nexixpay, nmi, nmi::Nmi, nomupay, nomupay::Nomupay, noon, noon::Noon, + nordea, nordea::Nordea, novalnet, novalnet::Novalnet, nuvei, nuvei::Nuvei, opayo, opayo::Opayo, + opennode, opennode::Opennode, paybox, paybox::Paybox, payconex, payconex::Payconex, payeezy, + payeezy::Payeezy, payjustnow, payjustnow::Payjustnow, payjustnowinstore, + payjustnowinstore::Payjustnowinstore, payload, payload::Payload, payme, payme::Payme, payone, + payone::Payone, paypal, paypal::Paypal, paysafe, paysafe::Paysafe, paystack, + paystack::Paystack, paytm, paytm::Paytm, payu, payu::Payu, peachpayments, peachpayments::Peachpayments, phonepe, phonepe::Phonepe, placetopay, placetopay::Placetopay, plaid, plaid::Plaid, powertranz, powertranz::Powertranz, prophetpay, prophetpay::Prophetpay, rapyd, rapyd::Rapyd, razorpay, razorpay::Razorpay, recurly, recurly::Recurly, redsys, diff --git a/crates/router/src/core/connector_validation.rs b/crates/router/src/core/connector_validation.rs index bdb9407c483..9a871051001 100644 --- a/crates/router/src/core/connector_validation.rs +++ b/crates/router/src/core/connector_validation.rs @@ -288,6 +288,10 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> { )?; Ok(()) } + api_enums::Connector::Ilixium => { + ilixium::transformers::IlixiumAuthType::try_from(self.auth_type)?; + Ok(()) + } api_enums::Connector::Givepayments => { givepayments::transformers::GivepaymentsAuthType::try_from(self.auth_type)?; Ok(()) diff --git a/crates/router/src/core/relay/utils.rs b/crates/router/src/core/relay/utils.rs index 69532260dbd..7fb7211219e 100644 --- a/crates/router/src/core/relay/utils.rs +++ b/crates/router/src/core/relay/utils.rs @@ -110,6 +110,9 @@ pub async fn construct_relay_refund_router_data( merchant_config_currency: None, capture_method: None, additional_payment_method_data: None, + // Relay refunds have no locally recorded payment attempt, so the original payment's + // connector request reference is not known here. + payment_connector_request_reference_id: None, }, response: Err(ErrorResponse::default()), diff --git a/crates/router/src/core/unified_connector_service/connector_config.rs b/crates/router/src/core/unified_connector_service/connector_config.rs index 4d2d4d4bdd7..f8a45847d86 100644 --- a/crates/router/src/core/unified_connector_service/connector_config.rs +++ b/crates/router/src/core/unified_connector_service/connector_config.rs @@ -629,6 +629,15 @@ pub enum ConnectorSpecificConfig { key1: Secret, api_secret: Secret, }, + /// Ilixium connector configuration + /// `api_key` = Digest Calculation Password (input to `x-merchant-digest`) + /// `key1` = MerchantId (request body `merchant.merchantId`) + /// `api_secret` = AccountId (request body `merchant.accountId`) + Ilixium { + api_key: Secret, + key1: Secret, + api_secret: Secret, + }, /// Finix connector configuration Finix { finix_user_name: Secret, @@ -1191,6 +1200,18 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)> }), _ => Err(err("Tesouro requires SignatureKey auth type")), }, + Connector::Ilixium => match auth { + ConnectorAuthType::SignatureKey { + api_key, + key1, + api_secret, + } => Ok(Self::Ilixium { + api_key: api_key.clone(), + key1: key1.clone(), + api_secret: api_secret.clone(), + }), + _ => Err(err("Ilixium requires SignatureKey auth type")), + }, Connector::Checkout => match auth { ConnectorAuthType::SignatureKey { api_key, diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rs index dc9d93b0c6b..a479e9273de 100644 --- a/crates/router/src/core/unified_connector_service/transformers.rs +++ b/crates/router/src/core/unified_connector_service/transformers.rs @@ -6807,7 +6807,13 @@ impl transformers::ForeignTryFrom<&RouterData( refund_connector_metadata: refund.metadata.clone(), capture_method: Some(capture_method), additional_payment_method_data: None, + payment_connector_request_reference_id: payment_attempt + .connector_request_reference_id + .clone(), }, response: Ok(types::RefundsResponseData { @@ -674,6 +677,9 @@ pub async fn construct_refund_router_data<'a, F>( merchant_config_currency, capture_method, additional_payment_method_data, + payment_connector_request_reference_id: payment_attempt + .connector_request_reference_id + .clone(), }, response: Ok(types::RefundsResponseData { diff --git a/crates/router/src/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs index f68b60d5ec0..76d5223a529 100644 --- a/crates/router/src/types/api/connector_mapping.rs +++ b/crates/router/src/types/api/connector_mapping.rs @@ -286,6 +286,9 @@ impl ConnectorData { enums::Connector::Gigadat => { Ok(ConnectorEnum::Old(Box::new(connector::Gigadat::new()))) } + enums::Connector::Ilixium => { + Ok(ConnectorEnum::Old(Box::new(connector::Ilixium::new()))) + } enums::Connector::Givepayments => { Ok(ConnectorEnum::Old(Box::new(connector::Givepayments::new()))) } diff --git a/crates/router/src/types/api/feature_matrix.rs b/crates/router/src/types/api/feature_matrix.rs index bfc5f7f00aa..d4b51772fe2 100644 --- a/crates/router/src/types/api/feature_matrix.rs +++ b/crates/router/src/types/api/feature_matrix.rs @@ -200,6 +200,9 @@ impl FeatureMatrixConnectorData { enums::Connector::Gigadat => { Ok(ConnectorEnum::Old(Box::new(connector::Gigadat::new()))) } + enums::Connector::Ilixium => { + Ok(ConnectorEnum::Old(Box::new(connector::Ilixium::new()))) + } enums::Connector::Givepayments => { Ok(ConnectorEnum::Old(Box::new(connector::Givepayments::new()))) } diff --git a/crates/router/src/types/connector_transformers.rs b/crates/router/src/types/connector_transformers.rs index 7950cbde36e..68822c63f79 100644 --- a/crates/router/src/types/connector_transformers.rs +++ b/crates/router/src/types/connector_transformers.rs @@ -73,6 +73,7 @@ impl ForeignTryFrom for euclid::enums::RoutableConnectors api_enums::Connector::Forte => Self::Forte, api_enums::Connector::Getnet => Self::Getnet, api_enums::Connector::Gigadat => Self::Gigadat, + api_enums::Connector::Ilixium => Self::Ilixium, api_enums::Connector::Givepayments => Self::Givepayments, api_enums::Connector::Globalpay => Self::Globalpay, api_enums::Connector::Globepay => Self::Globepay, diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs index 9f1ed5d3836..dc6b8a2ab14 100644 --- a/crates/router/tests/connectors/utils.rs +++ b/crates/router/tests/connectors/utils.rs @@ -411,6 +411,7 @@ pub trait ConnectorActions: Connector { merchant_config_currency: None, capture_method: None, additional_payment_method_data: None, + payment_connector_request_reference_id: None, }), payment_info, ); @@ -1130,6 +1131,7 @@ impl Default for PaymentRefundType { merchant_config_currency: None, capture_method: None, additional_payment_method_data: None, + payment_connector_request_reference_id: None, }; Self(data) } diff --git a/loadtest/config/development.toml b/loadtest/config/development.toml index 2e78960c75c..6409e53a380 100644 --- a/loadtest/config/development.toml +++ b/loadtest/config/development.toml @@ -186,6 +186,7 @@ hyperwallet.base_url = "https://uat-api.paylution.com" hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" +ilixium.base_url = "https://prprocessing.ilixium.com/platform/ili" imerchantsolutions.base_url = "https://imerchantsolutions.com/api" inespay.base_url = "https://apiflow.inespay.com/san/v21" interpayments.base_url = "https://api-test.interpayments.com/v1"