Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): [MiFinity] add connector template code #4447

Merged
merged 12 commits into from May 7, 2024
4 changes: 3 additions & 1 deletion config/config.example.toml
Expand Up @@ -194,6 +194,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mifinity.base_url = "https://demo.mifinity.com"
mifinity.base_url = "https://demo.mifinity.com/"

Put a / in the end at all the places you defined base url

mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down Expand Up @@ -259,7 +260,8 @@ 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", "braintree", "applepay"]
wallets = ["klarna",
"mifinity", "braintree", "applepay"]
rewards = ["cashtocode", "zen"]
cards = [
"adyen",
Expand Down
1 change: 1 addition & 0 deletions config/deployments/integration_test.toml
Expand Up @@ -49,6 +49,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/production.toml
Expand Up @@ -53,6 +53,7 @@ gocardless.base_url = "https://api.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/sandbox.toml
Expand Up @@ -53,6 +53,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down
4 changes: 3 additions & 1 deletion config/development.toml
Expand Up @@ -88,7 +88,8 @@ vault_private_key = ""
tunnel_private_key = ""

[connectors.supported]
wallets = ["klarna", "braintree", "applepay", "adyen"]
wallets = ["klarna",
"mifinity", "braintree", "applepay", "adyen"]
rewards = ["cashtocode", "zen"]
cards = [
"aci",
Expand Down Expand Up @@ -193,6 +194,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down
4 changes: 3 additions & 1 deletion config/docker_compose.toml
Expand Up @@ -128,6 +128,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com"
mollie.base_url = "https://api.mollie.com/v2/"
mollie.secondary_base_url = "https://api.cc.mollie.com/v1/"
multisafepay.base_url = "https://testapi.multisafepay.com/"
Expand Down Expand Up @@ -172,7 +173,8 @@ zsl.base_url = "https://api.sitoffalb.net/"
apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HU,IS,IE,IM,IT,KZ,JE,LV,LI,LT,LU,MT,MD,MC,ME,NL,NO,PL,PT,RO,SM,RS,SK,SI,ES,SE,CH,UA,GB,AR,CO,CR,BR,MX,PE,BH,IL,JO,KW,PS,QA,SA,AE,CA,UM,US,KR,VN,MA,ZA,VA,CL,SV,GT,HN,PA", currency = "AED,AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" }

[connectors.supported]
wallets = ["klarna", "braintree", "applepay"]
wallets = ["klarna",
"mifinity", "braintree", "applepay"]
rewards = ["cashtocode", "zen"]
cards = [
"aci",
Expand Down
3 changes: 3 additions & 0 deletions crates/api_models/src/enums.rs
Expand Up @@ -98,6 +98,7 @@ pub enum Connector {
Helcim,
Iatapay,
Klarna,
// Mifinity, Added as template code for future usage
Mollie,
Multisafepay,
Netcetera,
Expand Down Expand Up @@ -205,6 +206,7 @@ impl Connector {
| Self::Helcim
| Self::Iatapay
| Self::Klarna
// | Self::Mifinity Added as template code for future usage
| Self::Mollie
| Self::Multisafepay
| Self::Nexinets
Expand Down Expand Up @@ -263,6 +265,7 @@ impl Connector {
| Self::Helcim
| Self::Iatapay
| Self::Klarna
// | Self::Mifinity Added as template code for future usage
| Self::Mollie
| Self::Multisafepay
| Self::Nexinets
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/enums.rs
Expand Up @@ -137,6 +137,7 @@ pub enum RoutableConnectors {
Helcim,
Iatapay,
Klarna,
Mifinity,
Mollie,
Multisafepay,
Nexinets,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/configs/settings.rs
Expand Up @@ -509,6 +509,7 @@ pub struct Connectors {
pub helcim: ConnectorParams,
pub iatapay: ConnectorParams,
pub klarna: ConnectorParams,
pub mifinity: ConnectorParams,
pub mollie: ConnectorParams,
pub multisafepay: ConnectorParams,
pub netcetera: ConnectorParams,
Expand Down
15 changes: 8 additions & 7 deletions crates/router/src/connector.rs
Expand Up @@ -26,6 +26,7 @@ pub mod gocardless;
pub mod helcim;
pub mod iatapay;
pub mod klarna;
pub mod mifinity;
pub mod mollie;
pub mod multisafepay;
pub mod netcetera;
Expand Down Expand Up @@ -69,11 +70,11 @@ pub use self::{
checkout::Checkout, coinbase::Coinbase, cryptopay::Cryptopay, cybersource::Cybersource,
dlocal::Dlocal, ebanx::Ebanx, fiserv::Fiserv, forte::Forte, globalpay::Globalpay,
globepay::Globepay, gocardless::Gocardless, helcim::Helcim, iatapay::Iatapay, klarna::Klarna,
mollie::Mollie, multisafepay::Multisafepay, netcetera::Netcetera, nexinets::Nexinets, nmi::Nmi,
noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode, payeezy::Payeezy, payme::Payme,
paypal::Paypal, payu::Payu, placetopay::Placetopay, powertranz::Powertranz,
prophetpay::Prophetpay, rapyd::Rapyd, riskified::Riskified, shift4::Shift4, signifyd::Signifyd,
square::Square, stax::Stax, stripe::Stripe, threedsecureio::Threedsecureio, trustpay::Trustpay,
tsys::Tsys, volt::Volt, wise::Wise, worldline::Worldline, worldpay::Worldpay, zen::Zen,
zsl::Zsl,
mifinity::Mifinity, mollie::Mollie, multisafepay::Multisafepay, netcetera::Netcetera,
nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode,
payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu, placetopay::Placetopay,
powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, riskified::Riskified,
shift4::Shift4, signifyd::Signifyd, square::Square, stax::Stax, stripe::Stripe,
threedsecureio::Threedsecureio, trustpay::Trustpay, tsys::Tsys, volt::Volt, wise::Wise,
worldline::Worldline, worldpay::Worldpay, zen::Zen, zsl::Zsl,
};