Skip to content

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

feat(connector): add Betterpayment as UCS-only connector for Wero wallet payments (#14696)

Aniket Burmandbc9418cf793
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 5c78ac1118..798e99b3ff 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -19728,6 +19728,7 @@
"bamboraapac",
"bankofamerica",
"barclaycard",
+ "betterpayment",
"billwerk",
"bitpay",
"bluesnap",
@@ -46284,6 +46285,7 @@
"authorizedotnet",
"bankofamerica",
"barclaycard",
+ "betterpayment",
"billwerk",
"bitpay",
"bambora",
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index d250228272..3ef4ff4d52 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -12693,6 +12693,7 @@
"bamboraapac",
"bankofamerica",
"barclaycard",
+ "betterpayment",
"billwerk",
"bitpay",
"bluesnap",
@@ -33182,6 +33183,7 @@
"authorizedotnet",
"bankofamerica",
"barclaycard",
+ "betterpayment",
"billwerk",
"bitpay",
"bambora",
diff --git a/config/config.example.toml b/config/config.example.toml
index 7a621dea4e..6665be96e3 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -480,6 +480,7 @@ redsys.base_url = "https://sis-t.redsys.es:25443"
revolv3.base_url = "https://api-sandbox.revolv3.com"
riskified.base_url = "https://sandbox.riskified.com/api"
saferpay.base_url = "https://test.saferpay.com/api"
+betterpayment.base_url = "https://testapi.betterpayment.de"
sanlam_payshield.base_url = "dev"
santander.base_url = "https://trust-pix-h.santander.com.br/"
santander.secondary_base_url = "https://trust-open-h.api.santander.com.br/"
@@ -565,7 +566,7 @@ stripe = { banks = "alior_bank,bank_millennium,bank_nowy_bfg_sa,bank_pekao_sa,ba
# This data is used to call respective connectors for wallets and cards
[connectors.supported]
-wallets = ["klarna", "mifinity", "braintree", "applepay","finix", "worldpayxml"]
+wallets = ["klarna", "mifinity", "braintree", "applepay", "finix", "worldpayxml"]
rewards = ["cashtocode", "zen"]
cards = [
"adyen",
@@ -1613,7 +1614,7 @@ request_timeout = 35 # Per-RPC Request Timeout in Seconds
keep_alive_interval = 30 # HTTP/2 PING keepalive interval in Seconds on the shared channel
keep_alive_timeout = 20 # Time in Seconds to wait for a keepalive PING acknowledgement before the connection is treated as dead
tcp_keepalive = 60 # TCP keepalive idle time in Seconds on the shared channel
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, globalpayments_realex, ecommpay" # 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, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, globalpayments_realex, ecommpay, betterpayment" # 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/integration_test.toml b/config/deployments/integration_test.toml
index 0ca233792e..a90fdad6b6 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -44,6 +44,7 @@ authipay.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-g
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
+betterpayment.base_url = "https://testapi.betterpayment.de"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
barclaycard.base_url = "https://api.smartpayfuse-test.barclaycard/"
billwerk.base_url = "https://api.reepay.com/"
@@ -1093,7 +1094,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, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, globalpayments_realex, ecommpay" # 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, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, globalpayments_realex, ecommpay, betterpayment" # 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 dccca8c1ee..aa7cb9646e 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -47,6 +47,7 @@ authipay.base_url = "https://prod.emea.api.fiservapps.com/ipp/payments-gateway/v
authorizedotnet.base_url = "https://api.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bamboraapac.base_url = "https://www.bambora.co.nz/interface/api/dts.asmx"
+betterpayment.base_url = "https://api.betterpayment.de"
bankofamerica.base_url = "https://api.merchant-services.bankofamerica.com/"
barclaycard.base_url = "https://api.smartpayfuse-test.barclaycard/"
billwerk.base_url = "https://api.reepay.com/"
@@ -1105,7 +1106,7 @@ click_to_pay = {connector_list = "adyen, cybersource, trustpay"}
connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, jpmorgan, datatrans, tsys_transit, givepayments, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, globalpayments_realex, ecommpay" # 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, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, globalpayments_realex, ecommpay, betterpayment" # 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/sandbox.toml b/config/deployments/sandbox.toml
index 6cbc0cb733..783d6e86bc 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -47,6 +47,7 @@ authipay.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-g
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
+betterpayment.base_url = "https://testapi.betterpayment.de"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
barclaycard.base_url = "https://api.smartpayfuse-test.barclaycard/"
billwerk.base_url = "https://api.reepay.com/"
@@ -1112,7 +1113,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, jpmorgan, datatrans, tsys_transit, givepayments, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, tesouro, globalpayments_realex, ecommpay" # 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, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, gotyme_sanlam, paysafe, razorpay, tesouro, globalpayments_realex, ecommpay, betterpayment" # 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/development.toml b/config/development.toml
index 9602a8e821..c56d0cba08 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -508,6 +508,7 @@ taxjar.base_url = "https://api.sandbox.taxjar.com/v2/"
tesouro.base_url = "https://api.sandbox.tesouro.com"
threedsecureio.base_url = "https://service.sandbox.3dsecure.io"
thunes.base_url = "https://api.limonetikqualif.com/"
+betterpayment.base_url = "https://testapi.betterpayment.de"
tokenex.base_url = "https://test-api.tokenex.com"
tokenio.base_url = "https://api.sandbox.token.io"
truelayer.base_url = "https://api.truelayer-sandbox.com"
@@ -1696,7 +1697,7 @@ request_timeout = 35
keep_alive_interval = 30
keep_alive_timeout = 20
tcp_keepalive = 60
-ucs_only_connectors = "imerchantsolutions, paytm, phonepe, hyperpg, revolv3, fiservcommercehub, absa_sanlam, interpayments, payconex, dlocal, barclaycard, tsys_transit, jpmorgan, datatrans, givepayments, tesouro, citigate, ilixium, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, globalpayments_realex, ecommpay" # 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, moneris, elavon, worldpayraft, globalpay, rapyd, paynearme, jpmorgan_orbital, saferpay, d24, etisalat, globalpayments_heartland, paydotcom, merchante, nsure, elavon_pg, trustly, shift4, truelayer, globalpayments_realex, ecommpay, betterpayment" # 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 7f519a865d..24feaad5b7 100644
--- a/config/docker_compose.toml
+++ b/config/docker_compose.toml
@@ -254,6 +254,7 @@ authipay.base_url = "https://prod.emea.api.fiservapps.com/sandbox/ipp/payments-g
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
+betterpayment.base_url = "https://testapi.betterpayment.de"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
barclaycard.base_url = "https://api.smartpayfuse-test.barclaycard/"
billwerk.base_url = "https://api.reepay.com/"
diff --git a/crates/common_enums/src/connector_enums.rs b/crates/common_enums/src/connector_enums.rs
index b54ef1ace5..f45b85584d 100644
--- a/crates/common_enums/src/connector_enums.rs
+++ b/crates/common_enums/src/connector_enums.rs
@@ -76,6 +76,7 @@ pub enum Connector {
Bamboraapac,
Bankofamerica,
Barclaycard,
+ Betterpayment,
Billwerk,
Bitpay,
Bluesnap,
@@ -381,6 +382,7 @@ impl Connector {
| Self::Bamboraapac
| Self::Bankofamerica
| Self::Barclaycard
+ | Self::Betterpayment
| Self::Billwerk
| Self::Bitpay
| Self::Bluesnap
diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs
index 2558899d4e..334fe35cdf 100644
--- a/crates/connector_configs/src/connector.rs
+++ b/crates/connector_configs/src/connector.rs
@@ -443,6 +443,7 @@ pub struct ConnectorConfig {
pub rapyd: Option<ConnectorTomlConfig>,
pub redsys: Option<ConnectorTomlConfig>,
pub revolv3: Option<ConnectorTomlConfig>,
+ pub betterpayment: Option<ConnectorTomlConfig>,
pub saferpay: Option<ConnectorTomlConfig>,
pub sanlam_payshield: Option<ConnectorTomlConfig>,
pub santander: Option<ConnectorTomlConfig>,
@@ -723,6 +724,7 @@ impl ConnectorConfig {
Connector::Redsys => Ok(connector_data.redsys),
Connector::Revolv3 => Ok(connector_data.revolv3),
Connector::Riskified => Ok(connector_data.riskified),
+ Connector::Betterpayment => Ok(connector_data.betterpayment),
Connector::Saferpay => Ok(connector_data.saferpay),
Connector::SanlamPayshield => Ok(connector_data.sanlam_payshield),
Connector::Santander => Ok(connector_data.santander),
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index 2c9e0e65be..3301ba4faf 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -10000,3 +10000,13 @@ payment_method_type = "Discover"
payment_method_type = "DinersClub"
[[globalpayments_realex.debit]]
payment_method_type = "UnionPay"
+
+[betterpayment]
+[[betterpayment.wallet]]
+ payment_method_type = "wero"
+[betterpayment.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "API Password"
+[betterpayment.connector_webhook_details]
+merchant_secret = "Webhook Secret"
+additional_secret = "Incoming Webhook Key"
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 30942d8be6..e33fa4a0f0 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -9055,3 +9055,13 @@ payment_method_type = "Discover"
payment_method_type = "DinersClub"
[[globalpayments_realex.debit]]
payment_method_type = "UnionPay"
+
+[betterpayment]
+[[betterpayment.wallet]]
+ payment_method_type = "wero"
+[betterpayment.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "API Password"
+[betterpayment.connector_webhook_details]
+merchant_secret = "Webhook Secret"
+additional_secret = "Incoming Webhook Key"
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 069407ea43..0af6f7e515 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -9973,3 +9973,13 @@ payment_method_type = "Discover"
payment_method_type = "DinersClub"
[[globalpayments_realex.debit]]
payment_method_type = "UnionPay"
+
+[betterpayment]
+[[betterpayment.wallet]]
+ payment_method_type = "wero"
+[betterpayment.connector_auth.BodyKey]
+api_key = "API Key"
+key1 = "API Password"
+[betterpayment.connector_webhook_details]
+merchant_secret = "Webhook Secret"
+additional_secret = "Incoming Webhook Key"
diff --git a/crates/euclid/src/enums.rs b/crates/euclid/src/enums.rs
index ead9b0932e..4473142aed 100644
--- a/crates/euclid/src/enums.rs
+++ b/crates/euclid/src/enums.rs
@@ -235,6 +235,7 @@ pub enum RoutableConnectors {
Authorizedotnet,
Bankofamerica,
Barclaycard,
+ Betterpayment,
Billwerk,
Bitpay,
Bambora,
@@ -422,6 +423,7 @@ impl TryFrom<Connector> for RoutableConnectors {
Connector::Authorizedotnet => Ok(Self::Authorizedotnet),
Connector::Bankofamerica => Ok(Self::Bankofamerica),
Connector::Barclaycard => Ok(Self::Barclaycard),
+ Connector::Betterpayment => Ok(Self::Betterpayment),
Connector::Billwerk => Ok(Self::Billwerk),
Connector::Bitpay => Ok(Self::Bitpay),
Connector::Bambora => Ok(Self::Bambora),
@@ -606,6 +608,7 @@ impl From<RoutableConnectors> for Connector {
RoutableConnectors::Authorizedotnet => Self::Authorizedotnet,
RoutableConnectors::Bankofamerica => Self::Bankofamerica,
RoutableConnectors::Barclaycard => Self::Barclaycard,
+ RoutableConnectors::Betterpayment => Self::Betterpayment,
RoutableConnectors::Billwerk => Self::Billwerk,
RoutableConnectors::Bitpay => Self::Bitpay,
RoutableConnectors::Bambora => Self::Bambora,
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index d2676745e7..20d30f6d06 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -12,6 +12,7 @@ pub mod bambora;
pub mod bamboraapac;
pub mod bankofamerica;
pub mod barclaycard;
+pub mod betterpayment;
pub mod billwerk;
pub mod bitpay;
pub mod blackhawknetwork;
@@ -172,12 +173,12 @@ pub use self::{
absa_sanlam::AbsaSanlam, aci::Aci, adyen::Adyen, adyenplatform::Adyenplatform, affirm::Affirm,
airwallex::Airwallex, amazonpay::Amazonpay, archipel::Archipel, authipay::Authipay,
authorizedotnet::Authorizedotnet, bambora::Bambora, bamboraapac::Bamboraapac,
- bankofamerica::Bankofamerica, barclaycard::Barclaycard, billwerk::Billwerk, bitpay::Bitpay,
- blackhawknetwork::Blackhawknetwork, bluesnap::Bluesnap, boku::Boku, braintree::Braintree,
- breadpay::Breadpay, calida::Calida, cashtocode::Cashtocode, celero::Celero,
- chargebee::Chargebee, checkbook::Checkbook, checkout::Checkout, citigate::Citigate,
- coinbase::Coinbase, coingate::Coingate, cryptopay::Cryptopay, ctp_mastercard::CtpMastercard,
- custombilling::Custombilling, cybersource::Cybersource,
+ bankofamerica::Bankofamerica, barclaycard::Barclaycard, betterpayment::Betterpayment,
+ billwerk::Billwerk, bitpay::Bitpay, blackhawknetwork::Blackhawknetwork, bluesnap::Bluesnap,
+ boku::Boku, braintree::Braintree, breadpay::Breadpay, calida::Calida, cashtocode::Cashtocode,
+ celero::Celero, chargebee::Chargebee, checkbook::Checkbook, checkout::Checkout,
+ citigate::Citigate, coinbase::Coinbase, coingate::Coingate, cryptopay::Cryptopay,
+ ctp_mastercard::CtpMastercard, custombilling::Custombilling, cybersource::Cybersource,
cybersourcedecisionmanager::Cybersourcedecisionmanager, d24::D24, datatrans::Datatrans,
deutschebank::Deutschebank, digitalvirgo::Digitalvirgo, dlocal::Dlocal, dwolla::Dwolla,
ebanx::Ebanx, ecommpay::Ecommpay, elavon::Elavon, elavon_pg::ElavonPg, envoy::Envoy,
diff --git a/crates/hyperswitch_connectors/src/connectors/adyen.rs b/crates/hyperswitch_connectors/src/connectors/adyen.rs
index 2549ed735a..f6fe702683 100644
--- a/crates/hyperswitch_connectors/src/connectors/adyen.rs
+++ b/crates/hyperswitch_connectors/src/connectors/adyen.rs
@@ -240,6 +240,7 @@ impl ConnectorValidation for Adyen {
| PaymentMethodType::PayBright
| PaymentMethodType::Sepa
| PaymentMethodType::Vipps
+ | PaymentMethodType::Wero
| PaymentMethodType::Venmo
| PaymentMethodType::Paypal => match capture_method {
enums::CaptureMethod::Automatic
@@ -266,6 +267,7 @@ impl ConnectorValidation for Adyen {
| PaymentMethodType::PayBright
| PaymentMethodType::Sepa
| PaymentMethodType::Vipps
+ | PaymentMethodType::Wero
| PaymentMethodType::Venmo
| PaymentMethodType::Skrill
| PaymentMethodType::Neteller
@@ -414,7 +416,6 @@ impl ConnectorValidation for Adyen {
| PaymentMethodType::Flexiti
| PaymentMethodType::RevolutPay
| PaymentMethodType::Bluecode
- | PaymentMethodType::Wero
| PaymentMethodType::SepaGuarenteedDebit
| PaymentMethodType::OpenBanking
| PaymentMethodType::NetworkToken
diff --git a/crates/hyperswitch_connectors/src/connectors/betterpayment.rs b/crates/hyperswitch_connectors/src/connectors/betterpayment.rs
new file mode 100644
index 0000000000..6fc760eef3
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/betterpayment.rs
@@ -0,0 +1,191 @@
+pub mod transformers;
+
+use std::sync::LazyLock;
+
+use common_enums::enums;
+use common_utils::errors::CustomResult;
+use error_stack::report;
+use hyperswitch_domain_models::{
+ router_data::{AccessToken, ConnectorAuthType, 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,
+ },
+};
+use hyperswitch_interfaces::{
+ api::{
+ self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+ ConnectorValidation,
+ },
+ configs::Connectors,
+ errors, webhooks,
+};
+
+#[derive(Clone)]
+pub struct Betterpayment {}
+
+impl Betterpayment {
+ pub fn new() -> &'static Self {
+ &Self {}
+ }
+}
+
+impl api::Payment for Betterpayment {}
+impl api::PaymentSession for Betterpayment {}
+impl api::ConnectorAccessToken for Betterpayment {}
+impl api::MandateSetup for Betterpayment {}
+impl api::PaymentAuthorize for Betterpayment {}
+impl api::PaymentSync for Betterpayment {}
+impl api::PaymentCapture for Betterpayment {}
+impl api::PaymentVoid for Betterpayment {}
+impl api::Refund for Betterpayment {}
+impl api::RefundExecute for Betterpayment {}
+impl api::RefundSync for Betterpayment {}
+impl api::PaymentToken for Betterpayment {}
+
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+ for Betterpayment
+{
+ // Not Implemented (R)
+}
+
+impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Betterpayment
+where
+ Self: ConnectorIntegration<Flow, Request, Response>,
+{
+ fn build_headers(
+ &self,
+ _req: &RouterData<Flow, Request, Response>,
+ _connectors: &Connectors,
+ ) -> CustomResult<Vec<(String, hyperswitch_masking::Maskable<String>)>, errors::ConnectorError>
+ {
+ Ok(vec![])
+ }
+}
+
+impl ConnectorCommon for Betterpayment {
+ fn id(&self) -> &'static str {
+ "betterpayment"
+ }
+
+ fn get_currency_unit(&self) -> api::CurrencyUnit {
+ api::CurrencyUnit::Base
+ }
+
+ fn common_get_content_type(&self) -> &'static str {
+ "application/json"
+ }
+
+ fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
+ connectors.betterpayment.base_url.as_ref()
+ }
+
+ fn get_auth_header(
+ &self,
+ _auth_type: &ConnectorAuthType,
+ ) -> CustomResult<Vec<(String, hyperswitch_masking::Maskable<String>)>, errors::ConnectorError>
+ {
+ Ok(vec![])
+ }
+}
+
+impl ConnectorValidation for Betterpayment {}
+
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Betterpayment {}
+
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Betterpayment {}
+
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+ for Betterpayment
+{
+}
+
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData>
+ for Betterpayment
+{
+}
+
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Betterpayment {}
+
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Betterpayment {}
+
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Betterpayment {}
+
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Betterpayment {}
+
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Betterpayment {}
+
+#[async_trait::async_trait]
+impl webhooks::IncomingWebhook for Betterpayment {
+ fn get_webhook_object_reference_id(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
+ Err(report!(errors::ConnectorError::WebhooksNotImplemented))
+ }
+
+ fn get_webhook_event_type(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ _context: Option<&webhooks::WebhookContext>,
+ ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+ Err(report!(errors::ConnectorError::WebhooksNotImplemented))
+ }
+
+ fn get_webhook_resource_object(
+ &self,
+ _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+ ) -> CustomResult<Box<dyn hyperswitch_masking::ErasedMaskSerialize>, errors::ConnectorError>
+ {
+ Err(report!(errors::ConnectorError::WebhooksNotImplemented))
+ }
+}
+
+static BETTERPAYMENT_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =
+ LazyLock::new(|| {
+ let mut supported = SupportedPaymentMethods::new();
+ supported.add(
+ enums::PaymentMethod::Wallet,
+ enums::PaymentMethodType::Wero,
+ PaymentMethodDetails {
+ mandates: enums::FeatureStatus::NotSupported,
+ refunds: enums::FeatureStatus::Supported,
+ supported_capture_methods: vec![enums::CaptureMethod::Automatic],
+ specific_features: None,
+ },
+ );
+ supported
+ });
+
+static BETTERPAYMENT_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
+ display_name: "Betterpayment",
+ description: "Better Payment Germany GmbH (Deutsche Bank Group) — Wero digital wallet payments",
+ connector_type: enums::HyperswitchConnectorCategory::PaymentGateway,
+ integration_status: enums::ConnectorIntegrationStatus::Beta,
+};
+
+static BETTERPAYMENT_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 0] = [];
+
+impl ConnectorSpecifications for Betterpayment {
+ fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
+ Some(&BETTERPAYMENT_CONNECTOR_INFO)
+ }
+
+ fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
+ Some(&*BETTERPAYMENT_SUPPORTED_PAYMENT_METHODS)
+ }
+
+ fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
+ Some(&BETTERPAYMENT_SUPPORTED_WEBHOOK_FLOWS)
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/connectors/betterpayment/transformers.rs b/crates/hyperswitch_connectors/src/connectors/betterpayment/transformers.rs
new file mode 100644
index 0000000000..2884d77da1
--- /dev/null
+++ b/crates/hyperswitch_connectors/src/connectors/betterpayment/transformers.rs
@@ -0,0 +1,15 @@
+use hyperswitch_domain_models::router_data::ConnectorAuthType;
+use hyperswitch_interfaces::errors;
+
+pub struct BetterpaymentAuthType;
+
+impl TryFrom<&ConnectorAuthType> for BetterpaymentAuthType {
+ type Error = error_stack::Report<errors::ConnectorError>;
+
+ fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+ match auth_type {
+ ConnectorAuthType::BodyKey { .. } => Ok(Self),
+ _ => Err(errors::ConnectorError::FailedToObtainAuthType)?,
+ }
+ }
+}
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 761a267de0..a43fa7319b 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -329,6 +329,7 @@ default_imp_for_authorize_session_token!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -510,6 +511,7 @@ default_imp_for_payment_settlement_split_create!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -692,6 +694,7 @@ default_imp_for_calculate_tax!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -824,6 +827,7 @@ default_imp_for_session_update!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -1006,6 +1010,7 @@ default_imp_for_post_session_tokens!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -1184,6 +1189,7 @@ default_imp_for_create_order!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -1382,6 +1388,7 @@ default_imp_for_update_post_confirm!(
connectors::Revolv3,
connectors::Riskified,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::SanlamPayshield,
connectors::Shift4,
connectors::Sift,
@@ -1547,6 +1554,7 @@ default_imp_for_update_metadata!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Shift4,
connectors::Sift,
@@ -1738,6 +1746,7 @@ default_imp_for_cancel_post_capture!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -1929,6 +1938,7 @@ default_imp_for_cancel_post_capture_sync!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::Santander,
connectors::Shift4,
connectors::Sift,
@@ -2040,6 +2050,7 @@ default_imp_for_complete_authorize!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::AbsaSanlam,
connectors::Worldpaymodular,
@@ -2314,6 +2325,7 @@ default_imp_for_incremental_authorization!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -2443,6 +2455,7 @@ default_imp_for_extend_authorization!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -2666,6 +2679,7 @@ default_imp_for_create_customer!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -2834,6 +2848,7 @@ default_imp_for_connector_redirect_response!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -2891,6 +2906,7 @@ default_imp_for_pre_authenticate_steps!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::AbsaSanlam,
connectors::Aci,
@@ -3061,6 +3077,7 @@ default_imp_for_authenticate_steps!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::AbsaSanlam,
connectors::Aci,
@@ -3362,6 +3379,7 @@ default_imp_for_post_authenticate_steps!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -3545,6 +3563,7 @@ default_imp_for_post_processing_steps!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -3729,6 +3748,7 @@ default_imp_for_approve!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -3913,6 +3933,7 @@ default_imp_for_reject!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -4097,6 +4118,7 @@ default_imp_for_webhook_source_verification!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -4278,6 +4300,7 @@ default_imp_for_accept_dispute!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -4458,6 +4481,7 @@ default_imp_for_submit_evidence!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -4638,6 +4662,7 @@ default_imp_for_defend_dispute!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -4822,6 +4847,7 @@ default_imp_for_fetch_disputes!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5005,6 +5031,7 @@ default_imp_for_dispute_sync!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5195,6 +5222,7 @@ default_imp_for_file_upload!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5359,6 +5387,7 @@ default_imp_for_payouts!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5531,6 +5560,7 @@ default_imp_for_payouts_create!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5710,6 +5740,7 @@ default_imp_for_payouts_retrieve!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -5890,6 +5921,7 @@ default_imp_for_payouts_eligibility!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6064,6 +6096,7 @@ default_imp_for_payouts_fulfill!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6241,6 +6274,7 @@ default_imp_for_payouts_cancel!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6421,6 +6455,7 @@ default_imp_for_payouts_quote!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6604,6 +6639,7 @@ default_imp_for_payouts_recipient!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6786,6 +6822,7 @@ default_imp_for_payouts_recipient_account!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -6971,6 +7008,7 @@ default_imp_for_frm_sale!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -7152,6 +7190,7 @@ default_imp_for_frm_checkout!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -7334,6 +7373,7 @@ default_imp_for_po_frm!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::Riskified,
connectors::TsysTransit,
connectors::Santander,
@@ -7517,6 +7557,7 @@ default_imp_for_frm_transaction!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -7699,6 +7740,7 @@ default_imp_for_frm_fulfillment!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -7881,6 +7923,7 @@ default_imp_for_frm_record_return!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -8057,6 +8100,7 @@ default_imp_for_revoking_mandates!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -8239,6 +8283,7 @@ default_imp_for_uas_pre_authentication!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -8420,6 +8465,7 @@ default_imp_for_uas_webhook!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -8601,6 +8647,7 @@ default_imp_for_uas_post_authentication!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -8783,6 +8830,7 @@ default_imp_for_uas_authentication_confirmation!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -8956,6 +9004,7 @@ default_imp_for_connector_request_id!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -9133,6 +9182,7 @@ default_imp_for_fraud_check!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Santander,
connectors::Shift4,
@@ -9335,6 +9385,7 @@ default_imp_for_connector_authentication!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -9515,6 +9566,7 @@ default_imp_for_uas_authentication!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -9707,6 +9759,7 @@ default_imp_for_revenue_recovery_dispute_record_back!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -9878,6 +9931,7 @@ default_imp_for_revenue_recovery!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -10112,6 +10166,7 @@ default_imp_for_subscriptions!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -10296,6 +10351,7 @@ default_imp_for_billing_connector_payment_sync!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -10472,6 +10528,7 @@ default_imp_for_revenue_recovery_record_back!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -10655,6 +10712,7 @@ default_imp_for_billing_connector_invoice_sync!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -10832,6 +10890,7 @@ default_imp_for_external_vault!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11014,6 +11073,7 @@ default_imp_for_external_vault_insert!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11193,6 +11253,7 @@ default_imp_for_gift_card_balance_check!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11377,6 +11438,7 @@ default_imp_for_external_vault_retrieve!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11559,6 +11621,7 @@ default_imp_for_external_vault_delete!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11742,6 +11805,7 @@ default_imp_for_external_vault_create!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -11925,6 +11989,7 @@ default_imp_for_connector_authentication_token!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -12107,6 +12172,7 @@ default_imp_for_external_vault_proxy_payments_create!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -12300,6 +12366,7 @@ default_imp_for_connector_webhook_register!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -13301,6 +13368,7 @@ default_imp_for_generate_qr_flow!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -13484,6 +13552,7 @@ default_imp_for_push_notification_flow!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::TsysTransit,
connectors::Riskified,
connectors::SanlamPayshield,
@@ -13710,6 +13779,7 @@ default_imp_for_pre_authorize_void!(
connectors::Ecommpay,
connectors::Revolv3,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::AbsaSanlam,
connectors::Trustly
);
@@ -13872,6 +13942,7 @@ default_imp_for_refund_void_post_refund!(
connectors::Revolv3,
connectors::Riskified,
connectors::Saferpay,
+ connectors::Betterpayment,
connectors::SanlamPayshield,
connectors::Santander,
connectors::Shift4,
diff --git a/crates/hyperswitch_domain_models/src/connector_endpoints.rs b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
index 049e69dd09..6d5375d69d 100644
--- a/crates/hyperswitch_domain_models/src/connector_endpoints.rs
+++ b/crates/hyperswitch_domain_models/src/connector_endpoints.rs
@@ -47,6 +47,7 @@ pub struct Connectors {
pub cybersource: ConnectorParams,
pub cybersourcedecisionmanager: ConnectorParams,
pub datatrans: ConnectorParamsWithSecondaryBaseUrl,
+ pub betterpayment: ConnectorParams,
pub deutschebank: ConnectorParams,
pub digitalvirgo: ConnectorParams,
pub dlocal: ConnectorParams,
diff --git a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
index 7982f23c18..319ee2b905 100644
--- a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
+++ b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
@@ -2098,15 +2098,15 @@ impl ForeignTryFrom<payments_grpc::RedirectForm> for RedirectForm {
.expose(),
})
}
- Some(payments_grpc::redirect_form::FormType::Script(_)) => Err(
+ Some(payments_grpc::redirect_form::FormType::QrData(_)) => Err(
UnifiedConnectorServiceError::RequestEncodingFailedWithReason(
- "Script form type is not implemented".to_string(),
+ "QR data form type is not implemented".to_string(),
)
.into(),
),
- Some(payments_grpc::redirect_form::FormType::QrData(_)) => Err(
+ Some(payments_grpc::redirect_form::FormType::Script(_)) => Err(
UnifiedConnectorServiceError::RequestEncodingFailedWithReason(
- "QrData form type is not implemented".to_string(),
+ "Script form type is not implemented".to_string(),
)
.into(),
),
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 4dcc0c2919..ae1a7b9a13 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -3097,6 +3097,13 @@ fn get_wallet_required_fields() -> HashMap<enums::PaymentMethodType, ConnectorFi
enums::PaymentMethodType::Vipps,
connectors(vec![(Connector::Adyen, fields(vec![], vec![], vec![]))]),
),
+ (
+ enums::PaymentMethodType::Wero,
+ connectors(vec![(
+ Connector::Betterpayment,
+ fields(vec![], vec![], vec![]),
+ )]),
+ ),
(
enums::PaymentMethodType::Dana,
connectors(vec![(Connector::Adyen, fields(vec![], vec![], vec![]))]),
diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs
index 4c7bddfdbe..4a34fc8184 100644
--- a/crates/router/src/connector.rs
+++ b/crates/router/src/connector.rs
@@ -8,18 +8,19 @@ pub use hyperswitch_connectors::connectors::{
amazonpay, amazonpay::Amazonpay, archipel, archipel::Archipel, authipay, authipay::Authipay,
authorizedotnet, authorizedotnet::Authorizedotnet, bambora, bambora::Bambora, bamboraapac,
bamboraapac::Bamboraapac, bankofamerica, bankofamerica::Bankofamerica, barclaycard,
- barclaycard::Barclaycard, billwerk, billwerk::Billwerk, bitpay, bitpay::Bitpay,
- blackhawknetwork, blackhawknetwork::Blackhawknetwork, bluesnap, bluesnap::Bluesnap, boku,
- boku::Boku, braintree, braintree::Braintree, breadpay, breadpay::Breadpay, calida,
- calida::Calida, cashtocode, cashtocode::Cashtocode, celero, celero::Celero, chargebee,
- chargebee::Chargebee, checkbook, checkbook::Checkbook, checkout, checkout::Checkout, citigate,
- citigate::Citigate, coinbase, coinbase::Coinbase, coingate, coingate::Coingate, cryptopay,
- cryptopay::Cryptopay, ctp_mastercard, ctp_mastercard::CtpMastercard, custombilling,
- custombilling::Custombilling, cybersource, cybersource::Cybersource,
- cybersourcedecisionmanager, cybersourcedecisionmanager::Cybersourcedecisionmanager, d24,
- d24::D24, datatrans, datatrans::Datatrans, deutschebank, deutschebank::Deutschebank,
- digitalvirgo, digitalvirgo::Digitalvirgo, dlocal, dlocal::Dlocal, dwolla, dwolla::Dwolla,
- ebanx, ebanx::Ebanx, ecommpay, ecommpay::Ecommpay, elavon, elavon::Elavon, elavon_pg,
+ barclaycard::Barclaycard, betterpayment, betterpayment::Betterpayment, billwerk,
+ billwerk::Billwerk, bitpay, bitpay::Bitpay, blackhawknetwork,
+ blackhawknetwork::Blackhawknetwork, bluesnap, bluesnap::Bluesnap, boku, boku::Boku, braintree,
+ braintree::Braintree, breadpay, breadpay::Breadpay, calida, calida::Calida, cashtocode,
+ cashtocode::Cashtocode, celero, celero::Celero, chargebee, chargebee::Chargebee, checkbook,
+ checkbook::Checkbook, checkout, checkout::Checkout, citigate, citigate::Citigate, coinbase,
+ coinbase::Coinbase, coingate, coingate::Coingate, cryptopay, cryptopay::Cryptopay,
+ ctp_mastercard, ctp_mastercard::CtpMastercard, custombilling, custombilling::Custombilling,
+ cybersource, cybersource::Cybersource, cybersourcedecisionmanager,
+ cybersourcedecisionmanager::Cybersourcedecisionmanager, d24, d24::D24, datatrans,
+ datatrans::Datatrans, deutschebank, deutschebank::Deutschebank, digitalvirgo,
+ digitalvirgo::Digitalvirgo, dlocal, dlocal::Dlocal, dwolla, dwolla::Dwolla, ebanx,
+ ebanx::Ebanx, ecommpay, ecommpay::Ecommpay, elavon, elavon::Elavon, elavon_pg,
elavon_pg::ElavonPg, envoy, envoy::Envoy, etisalat, etisalat::Etisalat, facilitapay,
facilitapay::Facilitapay, finix, finix::Finix, fiserv, fiserv::Fiserv, fiservcommercehub,
fiservcommercehub::Fiservcommercehub, fiservemea, fiservemea::Fiservemea, fiuu, fiuu::Fiuu,
diff --git a/crates/router/src/core/connector_validation.rs b/crates/router/src/core/connector_validation.rs
index 6fe7f8446a..19338cace5 100644
--- a/crates/router/src/core/connector_validation.rs
+++ b/crates/router/src/core/connector_validation.rs
@@ -215,6 +215,10 @@ impl ConnectorAuthTypeAndMetadataValidation<'_> {
datatrans::transformers::DatatransAuthType::try_from(self.auth_type)?;
Ok(())
}
+ api_enums::Connector::Betterpayment => {
+ betterpayment::transformers::BetterpaymentAuthType::try_from(self.auth_type)?;
+ Ok(())
+ }
api_enums::Connector::Deutschebank => {
deutschebank::transformers::DeutschebankAuthType::try_from(self.auth_type)?;
Ok(())
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rs
index 792c724a7d..2ffc618f7b 100644
--- a/crates/router/src/core/unified_connector_service.rs
+++ b/crates/router/src/core/unified_connector_service.rs
@@ -2386,6 +2386,13 @@ pub fn build_unified_connector_service_payment_method(
)),
})
}
+ hyperswitch_domain_models::payment_method_data::WalletData::WeroRedirect {} => {
+ Ok(payments_grpc::PaymentMethod {
+ payment_method: Some(PaymentMethod::WeroRedirect(
+ payments_grpc::WeroRedirectWallet {},
+ )),
+ })
+ }
_ => Err(UnifiedConnectorServiceError::NotImplemented(format!(
"Unimplemented payment method subtype: {payment_method_type:?}"
))
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 22e0ca6f89..341e5afe83 100644
--- a/crates/router/src/core/unified_connector_service/connector_config.rs
+++ b/crates/router/src/core/unified_connector_service/connector_config.rs
@@ -903,6 +903,16 @@ pub enum ConnectorSpecificConfig {
/// Pay.com connector configuration
/// `api_key` = the `x-paycom-api-key` value (`test_…` sandbox, `live_…` production)
Paydotcom { api_key: Secret<String> },
+ /// Better Payment connector configuration
+ Betterpayment {
+ /// API key (HTTP Basic Auth username)
+ api_key: Secret<String>,
+ /// API password (HTTP Basic Auth password)
+ api_password: Secret<String>,
+ /// Incoming key used for webhook HMAC-SHA256 signature verification
+ #[serde(skip_serializing_if = "Option::is_none")]
+ webhook_key: Option<Secret<String>>,
+ },
}
impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
@@ -1106,6 +1116,14 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>
}),
_ => Err(err("Paydotcom requires HeaderKey auth type")),
},
+ Connector::Betterpayment => match auth {
+ ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Betterpayment {
+ api_key: api_key.clone(),
+ api_password: key1.clone(),
+ webhook_key: None,
+ }),
+ _ => Err(err("Betterpayment requires BodyKey auth type")),
+ },
Connector::Helcim => match auth {
ConnectorAuthType::HeaderKey { api_key } => Ok(Self::Helcim {
api_key: api_key.clone(),
diff --git a/crates/router/src/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs
index 3ad73280aa..ac5aafc9a6 100644
--- a/crates/router/src/types/api/connector_mapping.rs
+++ b/crates/router/src/types/api/connector_mapping.rs
@@ -446,6 +446,9 @@ impl ConnectorData {
enums::Connector::Revolv3 => {
Ok(ConnectorEnum::Old(Box::new(connector::Revolv3::new())))
}
+ enums::Connector::Betterpayment => Ok(ConnectorEnum::Old(Box::new(
+ connector::Betterpayment::new(),
+ ))),
enums::Connector::Saferpay => {
Ok(ConnectorEnum::Old(Box::new(connector::Saferpay::new())))
}
diff --git a/crates/router/src/types/api/feature_matrix.rs b/crates/router/src/types/api/feature_matrix.rs
index 2b3ecdf051..716e1e441d 100644
--- a/crates/router/src/types/api/feature_matrix.rs
+++ b/crates/router/src/types/api/feature_matrix.rs
@@ -374,6 +374,9 @@ impl FeatureMatrixConnectorData {
enums::Connector::Revolv3 => {
Ok(ConnectorEnum::Old(Box::new(connector::Revolv3::new())))
}
+ enums::Connector::Betterpayment => Ok(ConnectorEnum::Old(Box::new(
+ connector::Betterpayment::new(),
+ ))),
enums::Connector::Saferpay => {
Ok(ConnectorEnum::Old(Box::new(connector::Saferpay::new())))
}
diff --git a/crates/router/src/types/connector_transformers.rs b/crates/router/src/types/connector_transformers.rs
index 8dea4c038a..d72406d229 100644
--- a/crates/router/src/types/connector_transformers.rs
+++ b/crates/router/src/types/connector_transformers.rs
@@ -159,6 +159,7 @@ impl ForeignTryFrom<api_enums::Connector> for euclid::enums::RoutableConnectors
api_enums::Connector::Redsys => Self::Redsys,
api_enums::Connector::Revolv3 => Self::Revolv3,
api_enums::Connector::Saferpay => Self::Saferpay,
+ api_enums::Connector::Betterpayment => Self::Betterpayment,
api_enums::Connector::Santander => Self::Santander,
api_enums::Connector::Shift4 => Self::Shift4,
api_enums::Connector::Zift => Self::Zift,