Skip to content

Commit

Permalink
Merge branch 'main' into dispute_currency_enum
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSagnik007 authored Oct 29, 2024
2 parents 940eec7 + 55a81eb commit 8f26d2e
Show file tree
Hide file tree
Showing 25 changed files with 196 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Build project
if: ${{ env.RUN_TESTS == 'true' }}
run: cargo build --package router --bin router --jobs 4
run: cargo build --package router --bin router --jobs 3

- name: Setup Local Server
if: ${{ env.RUN_TESTS == 'true' }}
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.10.29.0

### Bug Fixes

- **multitenancy:** Consistently use tenant nomenclature everywhere ([#6389](https://github.com/juspay/hyperswitch/pull/6389)) ([`aecd5ee`](https://github.com/juspay/hyperswitch/commit/aecd5eea3d2dce3ccdd4784f60d076b641104b67))

**Full Changelog:** [`2024.10.28.2...2024.10.29.0`](https://github.com/juspay/hyperswitch/compare/2024.10.28.2...2024.10.29.0)

- - -

## 2024.10.28.2

### Bug Fixes

- **connector:**
- [Novalnet] Remove webhook placeholder connector config ([#6451](https://github.com/juspay/hyperswitch/pull/6451)) ([`e33340e`](https://github.com/juspay/hyperswitch/commit/e33340e70b59e9e4f18e92fc27d8c90b3df5768b))
- [Adyen] Add MYR currency config ([#6442](https://github.com/juspay/hyperswitch/pull/6442)) ([`925e424`](https://github.com/juspay/hyperswitch/commit/925e4240e4ad6da1d243769b184842c0d8251a7d))

**Full Changelog:** [`2024.10.28.1...2024.10.28.2`](https://github.com/juspay/hyperswitch/compare/2024.10.28.1...2024.10.28.2)

- - -

## 2024.10.28.1

### Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -19979,7 +19979,8 @@
}
}
}
]
],
"description": "Hyperswitch supports SDK integration with Apple Pay and Google Pay wallets. For other wallets, we integrate with their respective connectors, redirecting the customer to the connector for wallet payments. As a result, we don’t receive any payment method data in the confirm call for payments made through other wallets."
},
"WeChatPay": {
"type": "object"
Expand Down
3 changes: 2 additions & 1 deletion api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -24730,7 +24730,8 @@
}
}
}
]
],
"description": "Hyperswitch supports SDK integration with Apple Pay and Google Pay wallets. For other wallets, we integrate with their respective connectors, redirecting the customer to the connector for wallet payments. As a result, we don’t receive any payment method data in the confirm call for payments made through other wallets."
},
"WeChatPay": {
"type": "object"
Expand Down
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ enabled = false
global_tenant = { schema = "public", redis_key_prefix = "", clickhouse_database = "default"}

[multitenancy.tenants]
public = { name = "hyperswitch", base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" } # schema -> Postgres db schema, redis_key_prefix -> redis key distinguisher, base_url -> url of the tenant
public = { base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" } # schema -> Postgres db schema, redis_key_prefix -> redis key distinguisher, base_url -> url of the tenant

[user_auth_methods]
encryption_key = "" # Encryption key used for encrypting data in user_authentication_methods table
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/env_specific.toml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ enabled = false
global_tenant = { schema = "public", redis_key_prefix = "", clickhouse_database = "default"}

[multitenancy.tenants]
public = { name = "hyperswitch", base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" }
public = { base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" }

[user_auth_methods]
encryption_key = "user_auth_table_encryption_key" # Encryption key used for encrypting data in user_authentication_methods table
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ alfamart = { country = "ID", currency = "IDR" }
ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" }
ali_pay_hk = { country = "HK", currency = "HKD" }
alma = { country = "FR", currency = "EUR" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" }
atome = { country = "MY,SG", currency = "MYR,SGD" }
bacs = { country = "GB", currency = "GBP" }
bancontact_card = { country = "BE", currency = "EUR" }
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ alfamart = { country = "ID", currency = "IDR" }
ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" }
ali_pay_hk = { country = "HK", currency = "HKD" }
alma = { country = "FR", currency = "EUR" }
apple_pay = { country = "AE,AM,AR,AT,AU,AZ,BE,BG,BH,BR,BY,CA,CH,CN,CO,CR,CY,CZ,DE,DK,EE,ES,FI,FO,FR,GB,GE,GG,GL,GR,HK,HR,HU,IE,IL,IM,IS,IT,JE,JO,JP,KW,KZ,LI,LT,LU,LV,MC,MD,ME,MO,MT,MX,MY,NL,NO,NZ,PE,PL,PS,PT,QA,RO,RS,SA,SE,SG,SI,SK,SM,TW,UA,GB,UM,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" }
apple_pay = { country = "AE,AM,AR,AT,AU,AZ,BE,BG,BH,BR,BY,CA,CH,CN,CO,CR,CY,CZ,DE,DK,EE,ES,FI,FO,FR,GB,GE,GG,GL,GR,HK,HR,HU,IE,IL,IM,IS,IT,JE,JO,JP,KW,KZ,LI,LT,LU,LV,MC,MD,ME,MO,MT,MX,MY,NL,NO,NZ,PE,PL,PS,PT,QA,RO,RS,SA,SE,SG,SI,SK,SM,TW,UA,GB,UM,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" }
atome = { country = "MY,SG", currency = "MYR,SGD" }
bacs = { country = "GB", currency = "GBP" }
bancontact_card = { country = "BE", currency = "EUR" }
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ alfamart = { country = "ID", currency = "IDR" }
ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" }
ali_pay_hk = { country = "HK", currency = "HKD" }
alma = { country = "FR", currency = "EUR" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" }
atome = { country = "MY,SG", currency = "MYR,SGD" }
bacs = { country = "GB", currency = "GBP" }
bancontact_card = { country = "BE", currency = "EUR" }
Expand Down
4 changes: 2 additions & 2 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ open_banking_pis = {currency = "EUR,GBP"}

[pm_filters.adyen]
google_pay = { country = "AU,NZ,JP,HK,SG,MY,TH,VN,BH,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,RO,HR,LI,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,TR,IS,CA,US", currency = "AED,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HTG,HUF,IDR,ILS,INR,IQD,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LYD,MAD,MDL,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLE,SOS,SRD,STN,SVC,SZL,THB,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" }
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD" }
mobile_pay = { country = "DK,FI", currency = "DKK,SEK,NOK,EUR" }
ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" }
Expand Down Expand Up @@ -750,7 +750,7 @@ enabled = false
global_tenant = { schema = "public", redis_key_prefix = "", clickhouse_database = "default"}

[multitenancy.tenants]
public = { name = "hyperswitch", base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default"}
public = { base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default"}

[user_auth_methods]
encryption_key = "A8EF32E029BC3342E54BF2E172A4D7AA43E8EF9D2C3A624A9F04E2EF79DC698F"
Expand Down
68 changes: 51 additions & 17 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -348,34 +348,68 @@ discord_invite_url = "https://discord.gg/wJZ7DVW8mm"
payout_eligibility = true

[pm_filters.adyen]
online_banking_fpx = { country = "MY", currency = "MYR" }
online_banking_thailand = { country = "TH", currency = "THB" }
touch_n_go = { country = "MY", currency = "MYR" }
ach = { country = "US", currency = "USD" }
affirm = { country = "US", currency = "USD" }
afterpay_clearpay = { country = "US,CA,GB,AU,NZ", currency = "GBP,AUD,NZD,CAD,USD" }
alfamart = { country = "ID", currency = "IDR" }
ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" }
ali_pay_hk = { country = "HK", currency = "HKD" }
alma = { country = "FR", currency = "EUR" }
apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" }
atome = { country = "MY,SG", currency = "MYR,SGD" }
swish = { country = "SE", currency = "SEK" }
permata_bank_transfer = { country = "ID", currency = "IDR" }
bacs = { country = "GB", currency = "GBP" }
bancontact_card = { country = "BE", currency = "EUR" }
bca_bank_transfer = { country = "ID", currency = "IDR" }
bizum = { country = "ES", currency = "EUR" }
blik = { country = "PL", currency = "PLN" }
bni_va = { country = "ID", currency = "IDR" }
boleto = { country = "BR", currency = "BRL" }
bri_va = { country = "ID", currency = "IDR" }
cimb_va = { country = "ID", currency = "IDR" }
dana = { country = "ID", currency = "IDR" }
danamon_va = { country = "ID", currency = "IDR" }
mandiri_va = { country = "ID", currency = "IDR" }
alfamart = { country = "ID", currency = "IDR" }
eps = { country = "AT", currency = "EUR" }
family_mart = { country = "JP", currency = "JPY" }
gcash = { country = "PH", currency = "PHP" }
giropay = { country = "DE", currency = "EUR" }
go_pay = { country = "ID", currency = "IDR" }
google_pay = { country = "AU,NZ,JP,HK,SG,MY,TH,VN,BH,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,RO,HR,LI,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,TR,IS,CA,US", currency = "AED,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HTG,HUF,IDR,ILS,INR,IQD,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LYD,MAD,MDL,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLE,SOS,SRD,STN,SVC,SZL,THB,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW" }
ideal = { country = "NL", currency = "EUR" }
indomaret = { country = "ID", currency = "IDR" }
kakao_pay = { country = "KR", currency = "KRW" }
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NO,PL,PT,RO,ES,SE,CH,NL,GB,US", currency = "AUD,EUR,CAD,CZK,DKK,NOK,PLN,RON,SEK,CHF,GBP,USD"}
lawson = { country = "JP", currency = "JPY" }
mandiri_va = { country = "ID", currency = "IDR" }
mb_way = { country = "PT", currency = "EUR" }
mini_stop = { country = "JP", currency = "JPY" }
mobile_pay = { country = "DK,FI", currency = "DKK,SEK,NOK,EUR" }
momo = { country = "VN", currency = "VND" }
momo_atm = { country = "VN", currency = "VND" }
online_banking_czech_republic = { country = "CZ", currency = "EUR,CZK" }
online_banking_finland = { country = "FI", currency = "EUR" }
online_banking_fpx = { country = "MY", currency = "MYR" }
online_banking_poland = { country = "PL", currency = "PLN" }
online_banking_slovakia = { country = "SK", currency = "EUR,CZK" }
online_banking_thailand = { country = "TH", currency = "THB" }
open_banking_uk = { country = "GB", currency = "GBP" }
oxxo = { country = "MX", currency = "MXN" }
pay_bright = { country = "CA", currency = "CAD" }
pay_easy = { country = "JP", currency = "JPY" }
pay_safe_card = { country = "AT,AU,BE,BR,BE,CA,HR,CY,CZ,DK,FI,FR,GE,DE,GI,HU,IS,IE,KW,LV,IE,LI,LT,LU,MT,MX,MD,ME,NL,NZ,NO,PY,PE,PL,PT,RO,SA,RS,SK,SI,ES,SE,CH,TR,AE,GB,US,UY", currency = "EUR,AUD,BRL,CAD,CZK,DKK,GEL,GIP,HUF,KWD,CHF,MXN,MDL,NZD,NOK,PYG,PEN,PLN,RON,SAR,RSD,SEK,TRY,AED,GBP,USD,UYU" }
seven_eleven = { country = "JP", currency = "JPY" }
lawson = { country = "JP", currency = "JPY" }
mini_stop = { country = "JP", currency = "JPY" }
family_mart = { country = "JP", currency = "JPY" }
permata_bank_transfer = { country = "ID", currency = "IDR" }
seicomart = { country = "JP", currency = "JPY" }
pay_easy = { country = "JP", currency = "JPY" }
boleto = { country = "BR", currency = "BRL" }
ideal = { country = "NL", currency = "EUR" }
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NO,PL,PT,RO,ES,SE,CH,NL,GB,US", currency = "AUD,EUR,CAD,CZK,DKK,NOK,PLN,RON,SEK,CHF,GBP,USD" }
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT", currency = "EUR" }
seven_eleven = { country = "JP", currency = "JPY" }
sofort = { country = "AT,BE,DE,ES,CH,NL", currency = "CHF,EUR"}
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD" }
sofort = { country = "AT,BE,DE,ES,CH,NL", currency = "CHF,EUR" }

swish = { country = "SE", currency = "SEK" }
touch_n_go = { country = "MY", currency = "MYR" }
trustly = { country = "ES,GB,SE,NO,AT,NL,DE,DK,FI,EE,LT,LV", currency = "CZK,DKK,EUR,GBP,NOK,SEK" }
twint = { country = "CH", currency = "CHF" }
vipps = { country = "NO", currency = "NOK" }
walley = { country = "SE,NO,DK,FI", currency = "DKK,EUR,NOK,SEK" }
we_chat_pay = { country = "AU,NZ,CN,JP,HK,SG,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,LI,MT,SI,GR,PT,IT,CA,US", currency = "AUD,CAD,CNY,EUR,GBP,HKD,JPY,NZD,SGD,USD,CNY" }


[pm_filters.volt]
Expand Down Expand Up @@ -575,7 +609,7 @@ enabled = false
global_tenant = { schema = "public", redis_key_prefix = "", clickhouse_database = "default" }

[multitenancy.tenants]
public = { name = "hyperswitch", base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" }
public = { base_url = "http://localhost:8080", schema = "public", redis_key_prefix = "", clickhouse_database = "default" }

[user_auth_methods]
encryption_key = "A8EF32E029BC3342E54BF2E172A4D7AA43E8EF9D2C3A624A9F04E2EF79DC698F"
Expand Down
1 change: 1 addition & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3567,6 +3567,7 @@ pub struct WalletResponse {
details: Option<WalletResponseData>,
}

/// Hyperswitch supports SDK integration with Apple Pay and Google Pay wallets. For other wallets, we integrate with their respective connectors, redirecting the customer to the connector for wallet payments. As a result, we don’t receive any payment method data in the confirm call for payments made through other wallets.
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum WalletResponseData {
Expand Down
1 change: 0 additions & 1 deletion crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,6 @@ key1="Payment Access Key"
api_secret="Tariff ID"
[novalnet.connector_webhook_details]
merchant_secret="Source verification key"
placeholder="Enter Payment Access Key"
[[novalnet.metadata.google_pay]]
name="merchant_name"
label="Google Pay Merchant Name"
Expand Down
1 change: 0 additions & 1 deletion crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,6 @@ key1="Payment Access Key"
api_secret="Tariff ID"
[novalnet.connector_webhook_details]
merchant_secret="Source verification key"
placeholder="Enter Payment Access Key"
[[novalnet.metadata.google_pay]]
name="merchant_name"
label="Google Pay Merchant Name"
Expand Down
1 change: 0 additions & 1 deletion crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,6 @@ key1="Payment Access Key"
api_secret="Tariff ID"
[novalnet.connector_webhook_details]
merchant_secret="Source verification key"
placeholder="Enter Payment Access Key"
[[novalnet.metadata.google_pay]]
name="merchant_name"
label="Google Pay Merchant Name"
Expand Down
45 changes: 40 additions & 5 deletions crates/drainer/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,56 @@ impl Multitenancy {
pub fn get_tenants(&self) -> &HashMap<String, Tenant> {
&self.tenants.0
}
pub fn get_tenant_names(&self) -> Vec<String> {
self.tenants.0.keys().cloned().collect()
pub fn get_tenant_ids(&self) -> Vec<String> {
self.tenants
.0
.values()
.map(|tenant| tenant.tenant_id.clone())
.collect()
}
pub fn get_tenant(&self, tenant_id: &str) -> Option<&Tenant> {
self.tenants.0.get(tenant_id)
}
}

#[derive(Debug, Deserialize, Clone, Default)]
#[serde(transparent)]
#[derive(Debug, Clone, Default)]
pub struct TenantConfig(pub HashMap<String, Tenant>);

impl<'de> Deserialize<'de> for TenantConfig {
fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
#[derive(Deserialize)]
struct Inner {
base_url: String,
schema: String,
redis_key_prefix: String,
clickhouse_database: String,
}

let hashmap = <HashMap<String, Inner>>::deserialize(deserializer)?;

Ok(Self(
hashmap
.into_iter()
.map(|(key, value)| {
(
key.clone(),
Tenant {
tenant_id: key,
base_url: value.base_url,
schema: value.schema,
redis_key_prefix: value.redis_key_prefix,
clickhouse_database: value.clickhouse_database,
},
)
})
.collect(),
))
}
}

#[derive(Debug, Deserialize, Clone, Default)]
pub struct Tenant {
pub name: String,
pub tenant_id: String,
pub base_url: String,
pub schema: String,
pub redis_key_prefix: String,
Expand Down
Loading

0 comments on commit 8f26d2e

Please sign in to comment.