Skip to content

Commit 297fd70

Browse files
committed
Merge branch 'main' of github.com:juspay/hyperswitch into add-cypress-ci
* 'main' of github.com:juspay/hyperswitch: refactor(router): remove `connector_account_details` and `connector_webhook_details` in merchant_connector_account list response (#5457) feat: add env variable for enable key manager service (#5442) chore(version): 2024.07.29.0 feat(payments): support sort criteria in payments list (#5389) refactor(connector): add amount conversion framework to placetopay (#4988) feat(connector): [Bambora APAC] add mandate flow (#5376) ci: set code owners for payment methods files (#5453) refactor(opensearch): Add Error Handling for Empty Query and Filters in Request (#5432) chore: address Rust 1.80 clippy lints (#5447) feat(connector): [FISERV] Move connector to hyperswitch_connectors (#5441) ci: add support for just hack_v2 check for PRs (#5426) fix: added created at and modified at keys in PaymentAttemptResponse (#5412) refactor(merchant_account_v2): recreate id for `merchant_account` v2 (#5439) chore(version): 2024.07.26.0 feat(events): forward the tenant configuration as part of the kafka message (#5224) refactor(connector): add amount conversion framework to payone (#4981) refactor(user_roles): make org and merchant id nullable (#5353) fix(euclid): change the address taken in SessionFlowRouting from shipping to billing address (#5435)
2 parents c7fc143 + 45a1494 commit 297fd70

File tree

103 files changed

+2483
-1012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2483
-1012
lines changed

.github/CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ crates/router/src/core/routing.rs @juspay/hyperswitch-routing
5959
crates/router/src/core/payments/routing @juspay/hyperswitch-routing
6060
crates/router/src/core/payments/routing.rs @juspay/hyperswitch-routing
6161

62+
crates/api_models/src/payment_methods.rs @juspay/hyperswitch-routing
63+
crates/router/src/core/payment_methods.rs @juspay/hyperswitch-routing
64+
crates/router/src/routes/payment_methods.rs @juspay/hyperswitch-routing
65+
crates/router/src/types/api/payment_methods.rs @juspay/hyperswitch-routing
66+
crates/router/src/types/storage/payment_method.rs @juspay/hyperswitch-routing
67+
crates/router/src/db/payment_method.rs @juspay/hyperswitch-routing
68+
crates/diesel_models/src/payment_method.rs @juspay/hyperswitch-routing
69+
crates/diesel_models/src/query/payment_method.rs @juspay/hyperswitch-routing
70+
crates/storage_impl/src/payment_method.rs @juspay/hyperswitch-routing
71+
crates/openapi/src/routes/payment_method.rs @juspay/hyperswitch-routing
72+
crates/router/src/core/payment_methods/cards.rs @juspay/hyperswitch-routing
73+
crates/router/src/core/payment_methods/utils.rs @juspay/hyperswitch-routing
74+
crates/router/src/core/payment_methods/transformers.rs @juspay/hyperswitch-routing
75+
crates/router/src/core/payment_methods/vault.rs @juspay/hyperswitch-routing
76+
crates/router/src/core/payment_methods/migration.rs @juspay/hyperswitch-routing
77+
crates/router/src/core/payment_methods/surcharge_decision_configs.rs @juspay/hyperswitch-routing
78+
crates/router/src/workflows/payment_method_status_update.rs @juspay/hyperswitch-routing
79+
crates/router/src/core/payments/tokenization.rs @juspay/hyperswitch-routing
80+
6281
crates/api_models/src/connector_onboarding.rs @juspay/hyperswitch-dashboard
6382
crates/api_models/src/user @juspay/hyperswitch-dashboard
6483
crates/api_models/src/user.rs @juspay/hyperswitch-dashboard

.github/workflows/CI-pr.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ env:
3333
RUSTUP_MAX_RETRIES: 10
3434
# Don't emit giant backtraces in the CI logs.
3535
RUST_BACKTRACE: short
36-
# Use `sccache` for caching compilation artifacts
37-
RUSTC_WRAPPER: sccache
3836

3937
jobs:
4038
formatting:
@@ -90,6 +88,10 @@ jobs:
9088
name: Check compilation on MSRV toolchain
9189
runs-on: ${{ matrix.runner }}
9290

91+
env:
92+
# Use `sccache` for caching compilation artifacts
93+
RUSTC_WRAPPER: sccache
94+
9395
strategy:
9496
fail-fast: false
9597
matrix:
@@ -175,6 +177,10 @@ jobs:
175177
name: Run tests on stable toolchain
176178
runs-on: ${{ matrix.runner }}
177179

180+
env:
181+
# Use `sccache` for caching compilation artifacts
182+
RUSTC_WRAPPER: sccache
183+
178184
strategy:
179185
fail-fast: false
180186
matrix:
@@ -284,3 +290,49 @@ jobs:
284290

285291
- name: Spell check
286292
uses: crate-ci/typos@master
293+
294+
295+
check-v2:
296+
name: Check compilation for V2 features
297+
runs-on: ubuntu-latest
298+
steps:
299+
- name: Checkout repository
300+
uses: actions/checkout@v4
301+
302+
- name: Install mold linker
303+
uses: rui314/setup-mold@v1
304+
if: ${{ runner.os == 'Linux' }}
305+
with:
306+
make-default: true
307+
308+
- name: Install Rust
309+
uses: dtolnay/rust-toolchain@master
310+
with:
311+
toolchain: stable 2 weeks ago
312+
components: clippy
313+
314+
- name: Install rust cache
315+
uses: Swatinem/[email protected]
316+
317+
- name: Install cargo-hack
318+
uses: taiki-e/[email protected]
319+
with:
320+
tool: cargo-hack
321+
checksum: true
322+
323+
- name: Install just
324+
uses: taiki-e/[email protected]
325+
with:
326+
tool: just
327+
checksum: true
328+
329+
- name: Deny warnings
330+
shell: bash
331+
run: |
332+
sed -i 's/rustflags = \[/rustflags = \[\n "-Dwarnings",/' .cargo/config.toml
333+
# Allow the `clippy::todo` lint for v2 checks
334+
sed -i --null-data 's/ "-Wclippy::todo",\n//' .cargo/config.toml
335+
336+
- name: Cargo hack_v2
337+
shell: bash
338+
run: just hack_v2

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,54 @@ All notable changes to HyperSwitch will be documented here.
44

55
- - -
66

7+
## 2024.07.29.0
8+
9+
### Features
10+
11+
- **connector:**
12+
- [FISERV] Move connector to hyperswitch_connectors ([#5441](https://github.com/juspay/hyperswitch/pull/5441)) ([`2bee694`](https://github.com/juspay/hyperswitch/commit/2bee694d5bb7393c11817bbee26b459609f6dd8c))
13+
- [Bambora APAC] add mandate flow ([#5376](https://github.com/juspay/hyperswitch/pull/5376)) ([`dbfa006`](https://github.com/juspay/hyperswitch/commit/dbfa006b475736bf415588680d7fc1a16bf16891))
14+
- **payments:** Support sort criteria in payments list ([#5389](https://github.com/juspay/hyperswitch/pull/5389)) ([`043ea6d`](https://github.com/juspay/hyperswitch/commit/043ea6d8dc9fe8108e0b7eb8113217bc37fa488a))
15+
16+
### Bug Fixes
17+
18+
- Added created at and modified at keys in PaymentAttemptResponse ([#5412](https://github.com/juspay/hyperswitch/pull/5412)) ([`9795397`](https://github.com/juspay/hyperswitch/commit/979539702190363c67045d509be04498efd9a1fa))
19+
20+
### Refactors
21+
22+
- **connector:** Add amount conversion framework to placetopay ([#4988](https://github.com/juspay/hyperswitch/pull/4988)) ([`08334da`](https://github.com/juspay/hyperswitch/commit/08334dae82145e1fd699e0008fedcbd8bb7b23c7))
23+
- **merchant_account_v2:** Recreate id for `merchant_account` v2 ([#5439](https://github.com/juspay/hyperswitch/pull/5439)) ([`93976db`](https://github.com/juspay/hyperswitch/commit/93976db30a91b3e67d854681fb4b9db8eea7e295))
24+
- **opensearch:** Add Error Handling for Empty Query and Filters in Request ([#5432](https://github.com/juspay/hyperswitch/pull/5432)) ([`b60933e`](https://github.com/juspay/hyperswitch/commit/b60933e310abb4ee56355f28dfb56d9c60083f04))
25+
26+
### Miscellaneous Tasks
27+
28+
- Address Rust 1.80 clippy lints ([#5447](https://github.com/juspay/hyperswitch/pull/5447)) ([`074e90c`](https://github.com/juspay/hyperswitch/commit/074e90c9f9fbc26255ed27400a6a781aa6958339))
29+
30+
**Full Changelog:** [`2024.07.26.0...2024.07.29.0`](https://github.com/juspay/hyperswitch/compare/2024.07.26.0...2024.07.29.0)
31+
32+
- - -
33+
34+
## 2024.07.26.0
35+
36+
### Features
37+
38+
- **connector:** [HELCIM] Move connector to hyperswitch_connectors ([#5287](https://github.com/juspay/hyperswitch/pull/5287)) ([`0f89a0a`](https://github.com/juspay/hyperswitch/commit/0f89a0acbfc2d55f415e0daeb27e8d9022e6a862))
39+
- **events:** Forward the tenant configuration as part of the kafka message ([#5224](https://github.com/juspay/hyperswitch/pull/5224)) ([`623cf4c`](https://github.com/juspay/hyperswitch/commit/623cf4c841847f109597ee50017d6cfc0b4d9982))
40+
41+
### Bug Fixes
42+
43+
- **cypress:** Fix cypress tests, failing due to error codes being recently changed ([#5425](https://github.com/juspay/hyperswitch/pull/5425)) ([`7228a87`](https://github.com/juspay/hyperswitch/commit/7228a874a3db43b89ae07941b04396215db394ef))
44+
- **euclid:** Change the address taken in SessionFlowRouting from shipping to billing address ([#5435](https://github.com/juspay/hyperswitch/pull/5435)) ([`9ca9545`](https://github.com/juspay/hyperswitch/commit/9ca9545318d8e62d62b4dc58a09b90fcdeb58870))
45+
46+
### Refactors
47+
48+
- **connector:** Add amount conversion framework to payone ([#4981](https://github.com/juspay/hyperswitch/pull/4981)) ([`5eccffa`](https://github.com/juspay/hyperswitch/commit/5eccffac9d9f2b3e38ad07f6e12907e2c135b840))
49+
- **user_roles:** Make org and merchant id nullable ([#5353](https://github.com/juspay/hyperswitch/pull/5353)) ([`0330aff`](https://github.com/juspay/hyperswitch/commit/0330aff958b80872fbd6a6fccc61ff1984c59511))
50+
51+
**Full Changelog:** [`2024.07.25.0...2024.07.26.0`](https://github.com/juspay/hyperswitch/compare/2024.07.25.0...2024.07.26.0)
52+
53+
- - -
54+
755
## 2024.07.25.0
856

957
### Features

Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-reference/openapi_spec.json

Lines changed: 166 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@
15941594
"schema": {
15951595
"type": "array",
15961596
"items": {
1597-
"$ref": "#/components/schemas/MerchantConnectorResponse"
1597+
"$ref": "#/components/schemas/MerchantConnectorListResponse"
15981598
}
15991599
}
16001600
}
@@ -12033,6 +12033,156 @@
1203312033
}
1203412034
}
1203512035
},
12036+
"MerchantConnectorListResponse": {
12037+
"type": "object",
12038+
"required": [
12039+
"connector_type",
12040+
"connector_name",
12041+
"merchant_connector_id",
12042+
"status"
12043+
],
12044+
"properties": {
12045+
"connector_type": {
12046+
"$ref": "#/components/schemas/ConnectorType"
12047+
},
12048+
"connector_name": {
12049+
"$ref": "#/components/schemas/Connector"
12050+
},
12051+
"connector_label": {
12052+
"type": "string",
12053+
"description": "A unique label to identify the connector account created under a business profile",
12054+
"example": "stripe_US_travel",
12055+
"nullable": true
12056+
},
12057+
"merchant_connector_id": {
12058+
"type": "string",
12059+
"description": "Unique ID of the merchant connector account",
12060+
"example": "mca_5apGeP94tMts6rg3U3kR"
12061+
},
12062+
"profile_id": {
12063+
"type": "string",
12064+
"description": "Identifier for the business profile, if not provided default will be chosen from merchant account",
12065+
"nullable": true,
12066+
"maxLength": 64
12067+
},
12068+
"payment_methods_enabled": {
12069+
"type": "array",
12070+
"items": {
12071+
"$ref": "#/components/schemas/PaymentMethodsEnabled"
12072+
},
12073+
"description": "An object containing the details about the payment methods that need to be enabled under this merchant connector account",
12074+
"example": [
12075+
{
12076+
"accepted_countries": {
12077+
"list": [
12078+
"FR",
12079+
"DE",
12080+
"IN"
12081+
],
12082+
"type": "disable_only"
12083+
},
12084+
"accepted_currencies": {
12085+
"list": [
12086+
"USD",
12087+
"EUR"
12088+
],
12089+
"type": "enable_only"
12090+
},
12091+
"installment_payment_enabled": true,
12092+
"maximum_amount": 68607706,
12093+
"minimum_amount": 1,
12094+
"payment_method": "wallet",
12095+
"payment_method_issuers": [
12096+
"labore magna ipsum",
12097+
"aute"
12098+
],
12099+
"payment_method_types": [
12100+
"upi_collect",
12101+
"upi_intent"
12102+
],
12103+
"payment_schemes": [
12104+
"Discover",
12105+
"Discover"
12106+
],
12107+
"recurring_enabled": true
12108+
}
12109+
],
12110+
"nullable": true
12111+
},
12112+
"metadata": {
12113+
"type": "object",
12114+
"description": "You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.",
12115+
"nullable": true
12116+
},
12117+
"test_mode": {
12118+
"type": "boolean",
12119+
"description": "A boolean value to indicate if the connector is in Test mode. By default, its value is false.",
12120+
"default": false,
12121+
"example": false,
12122+
"nullable": true
12123+
},
12124+
"disabled": {
12125+
"type": "boolean",
12126+
"description": "A boolean value to indicate if the connector is disabled. By default, its value is false.",
12127+
"default": false,
12128+
"example": false,
12129+
"nullable": true
12130+
},
12131+
"frm_configs": {
12132+
"type": "array",
12133+
"items": {
12134+
"$ref": "#/components/schemas/FrmConfigs"
12135+
},
12136+
"description": "Contains the frm configs for the merchant connector",
12137+
"example": "\n[{\"gateway\":\"stripe\",\"payment_methods\":[{\"payment_method\":\"card\",\"payment_method_types\":[{\"payment_method_type\":\"credit\",\"card_networks\":[\"Visa\"],\"flow\":\"pre\",\"action\":\"cancel_txn\"},{\"payment_method_type\":\"debit\",\"card_networks\":[\"Visa\"],\"flow\":\"pre\"}]}]}]\n",
12138+
"nullable": true
12139+
},
12140+
"business_country": {
12141+
"allOf": [
12142+
{
12143+
"$ref": "#/components/schemas/CountryAlpha2"
12144+
}
12145+
],
12146+
"nullable": true
12147+
},
12148+
"business_label": {
12149+
"type": "string",
12150+
"description": "The business label to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead",
12151+
"example": "travel",
12152+
"nullable": true
12153+
},
12154+
"business_sub_label": {
12155+
"type": "string",
12156+
"description": "The business sublabel to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead",
12157+
"example": "chase",
12158+
"nullable": true
12159+
},
12160+
"applepay_verified_domains": {
12161+
"type": "array",
12162+
"items": {
12163+
"type": "string"
12164+
},
12165+
"description": "identifier for the verified domains of a particular connector account",
12166+
"nullable": true
12167+
},
12168+
"pm_auth_config": {
12169+
"type": "object",
12170+
"nullable": true
12171+
},
12172+
"status": {
12173+
"$ref": "#/components/schemas/ConnectorStatus"
12174+
},
12175+
"additional_merchant_data": {
12176+
"allOf": [
12177+
{
12178+
"$ref": "#/components/schemas/AdditionalMerchantData"
12179+
}
12180+
],
12181+
"nullable": true
12182+
}
12183+
},
12184+
"additionalProperties": false
12185+
},
1203612186
"MerchantConnectorResponse": {
1203712187
"type": "object",
1203812188
"description": "Response of creating a new Merchant Connector for the merchant account.\"",
@@ -13477,7 +13627,9 @@
1347713627
"required": [
1347813628
"attempt_id",
1347913629
"status",
13480-
"amount"
13630+
"amount",
13631+
"created_at",
13632+
"modified_at"
1348113633
],
1348213634
"properties": {
1348313635
"attempt_id": {
@@ -13541,6 +13693,18 @@
1354113693
"default": "three_ds",
1354213694
"nullable": true
1354313695
},
13696+
"created_at": {
13697+
"type": "string",
13698+
"format": "date-time",
13699+
"description": "Time at which the payment attempt was created",
13700+
"example": "2022-09-10T10:11:12Z"
13701+
},
13702+
"modified_at": {
13703+
"type": "string",
13704+
"format": "date-time",
13705+
"description": "Time at which the payment attempt was last modified",
13706+
"example": "2022-09-10T10:11:12Z"
13707+
},
1354413708
"cancellation_reason": {
1354513709
"type": "string",
1354613710
"description": "If the payment was cancelled the reason will be provided here",

config/config.example.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ airwallex.base_url = "https://api-demo.airwallex.com/"
186186
applepay.base_url = "https://apple-pay-gateway.apple.com/"
187187
authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
188188
bambora.base_url = "https://api.na.bambora.com"
189-
bamboraapac.base_url = "https://demo.bambora.co.nz/interface/api/dts.asmx"
189+
bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api"
190190
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
191191
billwerk.base_url = "https://api.reepay.com/"
192192
billwerk.secondary_base_url = "https://card.reepay.com/"
@@ -699,7 +699,7 @@ sdk_eligible_payment_methods = "card"
699699

700700
[multitenancy]
701701
enabled = false
702-
global_tenant = { schema = "public", redis_key_prefix = "" }
702+
global_tenant = { schema = "public", redis_key_prefix = "", clickhouse_database = "default"}
703703

704704
[multitenancy.tenants]
705705
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

0 commit comments

Comments
 (0)