prompt
stringlengths
24
63.1k
response
stringlengths
296
101k
metadata
stringlengths
143
152
[REFACTOR] Worldpay payments integration ### Feature Description WorldPay payments integration currently makes use of modular APIs which gives more control over the integration. This approach is not best compatible with HyperSwitch due to WP's 3DS flows - which requires sending PAN (card numbers) in multiple places. For `on_session` transactions, this would contribute to the added complexity since data is not stored in such transactions (or stored for ~15mins in redis cache). Migrating to WP's standard payments API follows payment resource creation in an uniform way. ### Possible Implementation Migrate from modular APIs [[ref](https://developer.worldpay.com/products/access/card-payments)] to standard payment APIs [[ref](https://developer.worldpay.com/products/access/payments/openapi)]. ### Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes, I am willing to submit a PR!
<think> PR Context: - Title: feat(connector): worldpay - add dynamic fields and update terminal status mapping - Merged: 2024-11-28T14:50:09Z - Files changed: 17 files - Commits: 14 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR contains changes to - update status mapping for Worldpay - payments and refunds - add required fields for Worldpay - fix refund retrieve bug for Worldpay Described in detail - #6316 point # 5 ### Additional Changes - [ ] This PR modifies the API contract - [ ] Thi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): worldpay - add dynamic fields and update terminal status mapping (#6468) Files to modify: **crates/diesel_models/src/query/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Add: - function: private::from - impl: impl From<PaymentOutcome> for enums::RefundStatus **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Add: - function: pub::get_worldpay_billing_required_fields **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"issue_number": 6316, "pr_number": 6468, "commits_count": 1, "files_changed": 17, "response_length": 1780, "file_count": 11, "needs_breakdown": false}
[FEAT] Multiple credential support for a connector in Cypress ## Requirement Execute cypress tests for a connector having **multiple credentials** which can be used for different scenarios (one api key for `cards`, another for `bank redirects` and etc.,). ## Implementation ### Introduce new format for `creds.json` `creds.json` should include both the formats. if a connector requires us passing **multiple credentials**, then that connector api key object **should** include multiple `connector_account_details` object all named under a generic name `connector_<number>` where `number` is an `integer`. Refer example given below for more clarity: ```json // connector having multiple credentials <connector_name_1>: { "connector_1": { "connector_account_details": { "auth_type": "KeyType", "api_key": "", "api_secret": "", "key1": "", "key2": "" }, "metadata": {} }, "connector_2": { "connector_account_details": { "auth_type": "KeyType", "api_key": "", "api_secret": "", "key1": "", "key2": "" }, "metadata": {} }, }, // connector with a single credential <connector_name_2>: { "connector_account_details": { "auth_type": "KeyType", "api_key": "", "api_secret": "", "key1": "", "key2": "" } } ``` ### Introduce new `object` (`Configs`) for `connector.js` Within `connector.js`, introduce new object called as `Configs` alongside to `Request` and `Response` where user can define `flags` to achieve granular control over what test is being run. An example implementation given below for reference: ```js getCustomExchange({ Configs: { TRIGGER_SKIP: true, // skips redirection flow from running. takes in a boolean DELAY: { STATUS: true, // flag to turn delay feature on or off. takes in a boolean TIMEOUT: 5000, // timeout in milliseconds }, CONNECTOR_CREDENTIAL: connector_1 / connector_2 // flag to route tests to a specific profile // etc., }, Requst: {}, Response: {} }), ``` ### Modify `getValueByKey` function in `Utils.js` Validate if `connector_account_details` dot exist within `<connector>` object in creds. If it does not, start a loop and see if `connector_account_details` exist within every object. If true, return the `connector_account_details` while setting an object as a Cypress environment flag (`MULTIPLE_CONNECTORS`) with status `true` and length. If any validation fails, directly return the object (`data[key]`). An example implementation given below for reference: ```js if (data && typeof data === "object" && key in data) { // Connector object has multiple keys if (typeof data[key].connector_account_details === "undefined") { const keys = Object.keys(data[key]); for (let i = 0; i < keys.length; i++) { const currentItem = data[key][keys[i]]; if (currentItem.hasOwnProperty("connector_account_details")) { Cypress.env("MULTIPLE_CONNECTORS", { status: true, count: keys.length, }); return currentItem; } } } return data[key]; } else { return null; } ``` ### Add a new test to MCA create call If `MULTIPLE_CONNECTORS.status` is `TRUE`. Check `MULTIPLE_CONNECTORS.count` and create `profile` and `mca` beneath that `profile` based on the number of `count`. An example of possible implementation given below for reference: ```js if (Cypress.env("MULTIPLE_CONNECTORS")?.status) { for (let i = 0; i < Cypress.env("MULTIPLE_CONNECTORS").count; i++) { cy.createBusinessProfileTest( createBusinessProfileBody, globalState, "profile" + i // new optional fields ); cy.createConnectorCallTest( "payment_processor", createConnectorBody, payment_methods_enabled, globalState, "profile" + i, // new optional fields "merchantConnector" + i // new optional fields ); } } ``` Store these created `profile_id`s and `mca`s in `globalState` for future usage. Pass `CONNECTOR_CREDENTIAL` value as `connector_1` or `connector_2` in `<connector>.js` In `commands.js`, `execute` these configs before a `request` has been made. `execute` here means to make these configs work. Preferably, make this execution of configs a function and pass the values accordingly along with trace to find from where the function has been called. ## Limitations - Cypress cannot call itself unless a wrapper around Cypress is written (`Rustpress`?) - This stops us from running the entire test suite against every credentials - One possible work around for this is to have multiple keys (`cybersource_1`, `cybersource_2`) but this will result in a lot of confusion - Current implementation **requires** the user to mandatorily pass a `CONNECTOR_CREDENTIAL` config to pass a different `profileId` - Hence, the tests will only run once but, specific tests like `incremental auth` will be forced to run against different credential - `00025-IncrementalAuth.cy.js` can be stopped from execution based on `MULTIPLE_CONNECTORS` environment variable as it is set during run time and the file is read asynchronously when the execution starts (to address this, we will have to make a function call to see if it is set during run time and it is, then skip)
<think> PR Context: - Title: feat(cypress): add multiple creds and flags support - Merged: 2024-12-03T11:39:21Z - Files changed: 30 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces 2 new features: - Multiple credentials for a connector - Configuration flags closes #6645 (check this issue for detailed documentation / flow / explanation) ### Additional Changes - [ ] This PR modifies the AP </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6645, "pr_number": 6588, "commits_count": 0, "files_changed": 30, "response_length": 783, "file_count": 0, "needs_breakdown": false}
[BUG] Make get_redis_conn return result in StorageInterface ### Bug Description Currently `get_redis_conn` function in StorageInterface exposes `redis_conn` directly instead use `redis_conn()` function from `Store` and return Result in this function. ### Expected Behavior It should return err in case of redis connection goes down ### Actual Behavior It waits forever to connect to redis ### Steps To Reproduce 1. Run the application 2. Stop redis service 3. Try to do some redis operation ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? No Rust Version: 1.70.0 ### Have you spent some time to check if this bug has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: refactor(redis): invoke `redis_conn()` method instead of cloning `redis_conn` property in `StorageInterface` - Merged: 2023-08-01T07:44:31Z - Files changed: 13 files - Commits: 17 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Fixes #1497 ## Motivation and Context Please find the details in the issue [1497](https://github.com/juspay/hyperswitch/issues/1497) ## How did you test it? unit tests and postman ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `ca </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(redis): invoke `redis_conn()` method instead of cloning `redis_conn` property in `StorageIn Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/db.rs** Modify existing code **crates/router/src/db/api_keys.rs** Modify existing code **crates/router/src/db/cache.rs** Modify existing code **crates/router/src/db/merchant_connector_account.rs** Modify existing code **crates/router/src/routes/dummy_connector/core.rs** Modify existing code **crates/router/src/routes/dummy_connector/utils.rs** Modify existing code **crates/router/src/services.rs** Modify existing code **crates/router/tests/cache.rs** Modify existing code **crates/router/tests/services.rs** Add: - function: private::get_redis_conn_failure - function: private::get_redis_conn_success - mod: private::utils
{"issue_number": 1497, "pr_number": 1552, "commits_count": 1, "files_changed": 13, "response_length": 1927, "file_count": 15, "needs_breakdown": false}
[FEATURE] Remove special characters from payment attempt ID ### Feature Description Remove special characters from payment attempt_id For some gateways like expresscheckout where attempt_id can be passed as reference to txn, special characters limit the possibility of integrating the apis where such referenceIds are passed in URL and gateway doesn't expect a base64 encoded referenceId in URL. ### Possible Implementation replace hyphen characters `-` with underscore `_` ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: refactor: use simple uuid instead of hyphens - Merged: 2023-02-19T14:34:02Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Refactoring ## Description <!-- Describe your changes in detail --> Since we are passing the attempt id as reference to few connectors, some might not accept special characters. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: use simple uuid instead of hyphens (#605) Files to modify: **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_method_validate.rs** Modify existing code
{"issue_number": 603, "pr_number": 605, "commits_count": 1, "files_changed": 2, "response_length": 1033, "file_count": 4, "needs_breakdown": false}
[FEATURE] Implement `MerchantKeyStoreInterface` for `MockDb` ### Feature Description Currently the MerchantKeyStoreInterface is not implemented for MockDb. It is required for merchant account functions. And without this implementation, we cannot write tests for them. ### Possible Implementation Checkout #172 for more details. ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: test: fix failing unit tests - Merged: 2023-07-20T10:50:21Z - Files changed: 6 files - Commits: 6 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR includes the following changes: - Updates the AES-GCM-256 tests to use test vectors provided by NIST for the decryption test. - Refactors the JWE and JWS to accept payload as `impl AsRef<[u8]>` instead of `String`. - Fixes the JWE </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** test: fix failing unit tests (#1743) Files to modify: **crates/common_utils/src/crypto.rs** Modify existing code **crates/redis_interface/src/lib.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/db/merchant_connector_account.rs** Modify existing code **crates/router/src/services/encryption.rs** Add: - impl: impl ValueExt
{"issue_number": 1697, "pr_number": 1743, "commits_count": 1, "files_changed": 6, "response_length": 1251, "file_count": 8, "needs_breakdown": false}
Fails to build with rust 1.77.0 ### Bug Description I have the following error with rust 1.77.0: ``` --- stderr thread 'main' panicked at crates/router_env/src/cargo_workspace.rs:57:5: Unknown workspace members package ID format. Please run `cargo metadata --format-version=1 | jq '.workspace_members'` and update this build script to match the updated package ID format. ``` The format of ids in 'cargo metadata' has changed with cargo 1.77, it's documented here: https://github.com/rust-lang/cargo/issues/13528 ### Expected Behavior It should build. ### Actual Behavior It fails to build. ### Steps To Reproduce exec `cargo build` with rust 1.77.0 ### Context For The Bug ``` --- stderr thread 'main' panicked at crates/router_env/src/cargo_workspace.rs:57:5: Unknown workspace members package ID format. Please run `cargo metadata --format-version=1 | jq '.workspace_members'` and update this build script to match the updated package ID format. ``` ### Environment If not (or if building/running locally), please provide the following details: 1. Operating System: FreeBSD 2. Rust version (output of `rustc --version`): ```rustc 1.77.0 (aedd173a2 2024-03-17) (built from a source tarball) binary: rustc commit-hash: aedd173a2c086e558c2b66d3743b344f977621a7 commit-date: 2024-03-17 host: x86_64-unknown-freebsd release: 1.77.0 LLVM version: 17.0.6``` 3. App version (output of `cargo r --features vergen -- --version`): `` ### Have you spent some time checking if this bug has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes, I am willing to submit a PR!
<think> PR Context: - Title: build(router_env): obtain workspace member package names from cargo_metadata more deterministically - Merged: 2024-03-26T17:21:00Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/4139 This PR updates the build script code to obtain cargo workspace member package names to use a better and more deterministic way to do so. Previously, we used to perform string m </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** build(router_env): obtain workspace member package names from cargo_metadata more deterministically Files to modify: **crates/router_env/src/cargo_workspace.rs** Modify existing code
{"issue_number": 4137, "pr_number": 4215, "commits_count": 1, "files_changed": 3, "response_length": 1019, "file_count": 3, "needs_breakdown": false}
refactor(authentication): moved cavv storing from table to temp locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Refactoring ## Description <!-- Describe your changes in detail --> https://github.com/juspay/hyperswitch/pull/7978 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: refactor(authentication): moved cavv storing from table to temp locker - Merged: 2025-05-14T07:50:11Z - Files changed: 21 files - Commits: 1 commits Implementation approach: Reverts [juspay/hyperswitch#8005](https://github.com/juspay/hyperswitch/pull/7978) </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(authentication): moved cavv storing from table to temp locker (#8021) Files to modify: **crates/diesel_models/src/authentication.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/authentication.rs** Remove: - struct: pub::AuthenticationStore **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/authentication.rs** Modify existing code **crates/router/src/connector/gpayments/gpayments_types.rs** Modify existing code **crates/router/src/connector/netcetera/transformers.rs** Modify existing code **crates/router/src/connector/threedsecureio/transformers.rs** Modify existing code **crates/router/src/core/authentication.rs** Modify existing code **crates/router/src/core/authentication/utils.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payments/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/types/api/authentication.rs** Modify existing code **crates/router/src/types/domain.rs** Remove: - mod: pub::authentication **crates/router/src/types/transformers.rs** Modify existing code
{"issue_number": 8005, "pr_number": 8021, "commits_count": 1, "files_changed": 21, "response_length": 2236, "file_count": 23, "needs_breakdown": true}
bug(user): Magic link is not expiring after being used once When a verified user is using magic link, that magic link is not blacklisted after being used once. User is able to use the same magic link to login to dashboard multiple times.
<think> PR Context: - Title: fix(users): Magic link is not expiring after one usage - Merged: 2024-06-14T09:59:23Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently verify email API will be picked by the decision manager only if the user is not verified. But this API should be called always in case of verify email and magic link flow. This PR fixes it. ### Additional Changes - [ ] This </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(users): Magic link is not expiring after one usage (#4971) Files to modify: **crates/router/src/core/user.rs** Modify existing code **crates/router/src/types/domain/user.rs** Add: - function: pub::is_verified **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code
{"issue_number": 4970, "pr_number": 4971, "commits_count": 1, "files_changed": 3, "response_length": 1094, "file_count": 5, "needs_breakdown": false}
Missing terms and conditions for the contests. The team should add terms and conditions for the contests like Hacktoberfest.
<think> PR Context: - Title: docs: add terms and conditions - Merged: 2024-09-22T18:37:34Z - Files changed: 4 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [X] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** docs: add terms and conditions (#5975) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-b Files to modify: **crates/common_enums/src/enums.rs** Modify existing code
{"issue_number": 5974, "pr_number": 5975, "commits_count": 1, "files_changed": 4, "response_length": 942, "file_count": 3, "needs_breakdown": false}
[BUG] Docker compose failing because of the web module not having healthcheck ### Bug Description When `docker compose up -d` is ran, it returns the following error message: `dependency failed to start: container hyperswitch-hyperswitch-web-1 has no healthcheck configured` ### Expected Behavior The Web module should be started ### Actual Behavior The Web module doesn't start due to this ### Steps To Reproduce 1. Clone repo from scratch 2. Run `docker compose up -d` ### Context For The Bug This can be resolved with either adding a healthcheck part to the web module or changing the demo part to not require healthcheck from the web part. Additionally, we could only check if it has started rather than if it is healthy, as that is something which works. ### Environment I am running this locally. 1. Operating System or Linux distribution: Mac OS X 15.4 M3 Pro 2. Rust version (output of `rustc --version`): / 3. App version (output of `cargo r --features vergen -- --version`): / ### Have you spent some time checking if this bug has been raised before? - [x] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? No, but I'm happy to collaborate on a PR with someone else
<think> PR Context: - Title: fix: fixes the docker setup to clean up the scarf data - Merged: 2025-05-12T08:26:50Z - Files changed: 2 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> The hyperswitch server would run even without the completion of migration runner polluting the data in the scarf dashboard. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7945, "pr_number": 7999, "commits_count": 0, "files_changed": 2, "response_length": 784, "file_count": 0, "needs_breakdown": false}
feat(payment_request): add field `amount` to `OrderDetails` and make `order_details` a `Vec` in `payments_create` request ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Made changes to order_details, to contain an amount(per quantity of the product) field. Also order_details is now a vector Why the change? the order can have multiple products, with unique prices and quantity...the old structure didnt accomodate for it ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. --> Payments create request, will have the order_details field in metadata inside. ``` "metadata": { "order_details" : [{ "product_name" : "gillete creme", "quantity" : 2, "amount" : 600 }, { "product_name" : "gillete razor", "quantity" : 1, "amount" : 300 }], "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } ``` Metadata Type in DB will also change, as it will contain order_details as a vector : ``` pub struct Metadata { /// Information about the product and quantity for specific connectors. (e.g. Klarna) pub order_details: Option<Vec<OrderDetails>>, /// Any other metadata that is to be provided #[schema(value_type = Object, example = r#"{ "city": "NY", "unit": "245" }"#)] #[serde(flatten)] pub data: pii::SecretSerdeValue, /// Payload coming in request as a metadata field pub payload: Option<pii::SecretSerdeValue>, /// Allowed payment method types for a payment intent #[schema(value_type = Option<Vec<PaymentMethodType>>)] pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>, } ``` ## Motivation and Context <!-- Why is this change required? What problem does it solve? the order can have multiple products, with unique prices and quantity...the old structure didnt accomodate for it so making order_details a vector , and adding amount field --> ## How did you test it? <!-- via postman call --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: revert(order_details): revert back `order_details` to be an object, and removing `meta_data` from `PaymentIntent` - Merged: 2023-05-26T07:49:33Z - Files changed: 16 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Order_details was changed from an object to a vector in payment-create....reverting it back to an object . removing field meta_data from payment_intent table. ### Additional Changes - [x] This PR modifies the API contract - [x] This PR </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** revert(order_details): revert back `order_details` to be an object, and removing `meta_data` from `P Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/klarna/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/connector/zen/transformers.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/db/payment_intent.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/tests/connectors/zen.rs** Modify existing code **crates/storage_models/src/payment_intent.rs** Modify existing code **crates/storage_models/src/schema.rs** Modify existing code
{"issue_number": 964, "pr_number": 1279, "commits_count": 1, "files_changed": 16, "response_length": 1975, "file_count": 16, "needs_breakdown": true}
feat(router): added incoming dispute webhooks flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description Added support for incoming dispute webhooks. ### Additional Changes - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Manually Tested Webhook Request <img width="1256" alt="image" src="https://user-images.githubusercontent.com/99009240/226270250-5f8926dd-cba5-4a52-81c7-48c679ec9110.png"> DB Entry <img width="763" alt="image" src="https://user-images.githubusercontent.com/99009240/226270204-d9c4403d-d20c-4085-bd0b-6a434bd9c4ba.png"> Outgoing webhook to merchant <img width="780" alt="image" src="https://user-images.githubusercontent.com/99009240/226270349-bc958318-a2e5-4b8e-9d8f-dc9bc3fa494e.png"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: Changelog for release v0.5.4 - Merged: 2023-04-04T12:48:00Z - Files changed: 1 files - Commits: 3 commits Implementation approach: # 0.5.4 (2023-04-04) ## New Features * **request:** add `RequestBuilder` method to attach default request headers (#826) (6f61f830) * **middleware:** add middleware to attach default response headers (#824) (6d7b11a0) * **core:** added multiple payment_attempt support for payment_intent (#439) (35d3e277) * **router:** added incoming dispute webhooks flow (#769) (a733eafb) ## Bug Fixes * **cards_info:** add extra columns to cards_info struct (#813) (442bed0f) * **connector:** </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 769, "pr_number": 837, "commits_count": 0, "files_changed": 1, "response_length": 758, "file_count": 6, "needs_breakdown": false}
fix(router_env): resolve/remove `FIXME`'s and redundent files ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This PR is regarding the `FIXME`'s and `TODO`'s resolution for the crate `router_env` <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context This PR is part of the chain of micro PR's focused on removing todo 1. #136 2. #139 3. #144 4. #151 <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code
<think> PR Context: - Title: fix: remove and resolve `FIXME`s and `TODO`s from db module - Merged: 2022-12-20T12:25:25Z - Files changed: 22 files - Commits: 9 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This change addresses `todo!()` in the `MockDb` interface implementation and group them under issue #172 . It fixes and removes other `FIXME`s from the db folder. <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corr </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: remove and resolve `FIXME`s and `TODO`s from db module (#174) Files to modify: **crates/common_utils/src/lib.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/db/address.rs** Modify existing code **crates/router/src/db/configs.rs** Modify existing code **crates/router/src/db/connector_response.rs** Modify existing code **crates/router/src/db/customers.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/db/locker_mock_up.rs** Modify existing code **crates/router/src/db/mandate.rs** Modify existing code **crates/router/src/db/merchant_account.rs** Modify existing code **crates/router/src/db/merchant_connector_account.rs** Modify existing code **crates/router/src/db/payment_attempt.rs** Modify existing code **crates/router/src/db/payment_intent.rs** Modify existing code **crates/router/src/db/payment_method.rs** Modify existing code **crates/router/src/db/process_tracker.rs** Modify existing code **crates/router/src/db/queue.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/db/temp_card.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/scheduler/workflows.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code
{"issue_number": 168, "pr_number": 174, "commits_count": 1, "files_changed": 22, "response_length": 2295, "file_count": 24, "needs_breakdown": true}
fix(docker): fix stack overflow for docker images ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Add a default `RUST_MIN_STACK` size in the docker images for router ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/discussions/4636 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - generating a docker image locally and testing it ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: fix(docker): fix stack overflow for docker images - Merged: 2024-05-17T12:01:03Z - Files changed: 1 files - Commits: 1 commits Implementation approach: Hotfix for #4660 </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 4660, "pr_number": 4683, "commits_count": 0, "files_changed": 1, "response_length": 296, "file_count": 0, "needs_breakdown": false}
Unable to compile version on ubuntu ### Bug Description getting an error while compiling on node 18.19, please I need the right command to get it working perfectly well. Thanks so much
<think> PR Context: - Title: fix(connector): [Prophetpay] Use refund_id as reference_id for Refund - Merged: 2023-11-23T12:22:30Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Replaced connector_request_reference_id with refund_id for refund. - Removed response_code since we are not receiving it in case of failure - Made tranSeqNumber optional Closes [#3353](https://github.com/juspay/hyperswitch-cloud/issues/ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [Prophetpay] Use refund_id as reference_id for Refund (#2966) Files to modify: **crates/router/src/connector/prophetpay/transformers.rs** Modify existing code
{"issue_number": 3353, "pr_number": 2966, "commits_count": 1, "files_changed": 1, "response_length": 980, "file_count": 3, "needs_breakdown": false}
fix(connector): [AUTHORIZEDOTNET] customer id population fixed in authorize flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fixed customer ID population in the Authorize flow. - Previously, when passing customer details for normal payments, the createConnectorCustomer flow correctly created the customer. - However, in the `Authorize` flow, we were passing the payment_id as the customer_id. If the length validation failed, a random string was being passed instead. - This resulted in a random string always being sent as the customer_id, which caused a new customer to be created on Authorize.NET’s dashboard for every transaction. - As a result, duplicate customers were being created. Fix: - Updated the flow to pass the correct customer_id in the customer details instead of payment_id. - This prevents duplicate customer creation on Authorize.NET. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_HcJT7607MkJ2yANWr7PUgr8djox0jNozuRQSSW40guBXj5RQnH0CPKvbtjZ4MKBA' \ --data-raw ' { "amount": 1, "currency": "USD", "confirm": true, // "customer_id": "cus_sweta2", // "email": "[email protected]", "capture_method": "manual", "description": "test payment", "customer": { "id": "sweta33", "name": "Sweta Sharma", "email": "[email protected]", "phone": "1234567890", "phone_country_code": "+1" }, "setup_future_usage": "off_session", "payment_type": "normal", "off_session": true, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "07", "card_exp_year": "26", "card_holder_name": "Joseph Does", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "email": "[email protected]" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "email": "[email protected]" } } ' ``` Response ``` {"payment_id":"pay_Itc4g0ujKGRW0tWhku2e","merchant_id":"merchant_1756373651","status":"requires_capture","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":1,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_Itc4g0ujKGRW0tWhku2e_secret_7YHCDDZ805TWhxdirnfP","created":"2025-08-28T12:33:37.236Z","currency":"USD","customer_id":"sweta33","customer":{"id":"sweta33","name":"Sweta Sharma","email":"[email protected]","phone":"1234567890","phone_country_code":"+1"},"description":"test payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":{"description":"The street address and postal code matched.","avs_result_code":"Y"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe","origin_zip":null},"phone":null,"email":"[email protected]"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe","origin_zip":null},"phone":null,"email":"[email protected]"},"order_details":null,"email":"[email protected]","name":"Sweta Sharma","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"sweta33","created_at":1756384417,"expires":1756388017,"secret":"epk_5af34f19e9754bd79f97846e3ef3c2c9"},"manual_retry_allowed":false,"connector_transaction_id":"120069967875","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"120069967875","payment_link":null,"profile_id":"pro_uSL0fZR2ECJYAD8I2u1r","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_yyPYHyKpU13WHygZFtpl","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-08-28T12:48:37.235Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_dcrhr0yU9aq5L3qwH90J","network_transaction_id":"HWAN991WJ003XPFWKEF1T5E","payment_method_status":"active","updated":"2025-08-28T12:33:40.138Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` customer created only once for normal payments <img width="597" height="525" alt="Screenshot 2025-08-28 at 6 09 09 PM" src="https://github.com/user-attachments/assets/6184684f-b99a-43d1-8b8f-f77b0d6bf16c" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: fix(connector): Revert [AUTHORIZEDOTNET] customer id population fixed in authorize flow - Merged: 2025-09-04T07:19:18Z - Files changed: 1 files - Commits: 1 commits Implementation approach: Reverts juspay/hyperswitch#9079 If a customer profile is not created during the Authorize call, the customer_profile_id and customer_payment_profile_id are not returned in the transaction response. As a result, the connector_mandate_id is populated as null, causing subsequent MIT transactions with "payment_type": "normal" to fail. To avoid this issue, we are reverting this PR. Impact of revert: Reverting will ensure MIT transactions work as expected, but it will lead to two customer re </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): Revert [AUTHORIZEDOTNET] customer id population fixed in authorize flow (#9253) Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code
{"issue_number": 9079, "pr_number": 9253, "commits_count": 1, "files_changed": 1, "response_length": 1038, "file_count": 3, "needs_breakdown": false}
Todo redis interface ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This PR is a part of greater refactoring which aims on removing `// TODO: ...` & `// FIXME: ..` from the entire codebase. The objective of this PR is to fix `xgroup_create` by adding a guard or some specific `RedisEntryId` while also adding unit tests for the same. It also adds crate documentation for the `redis_interface` crate <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context The codebase wide initiative in fixing existing problems, `TODO:`s and `FIXME:`s while also adding documentations. <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? unit-tests included <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [x] I added unit tests for my changes where possible
<think> PR Context: - Title: fix(router_env): resolve/remove `FIXME`'s and redundent files - Merged: 2022-12-19T10:11:26Z - Files changed: 7 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This PR is regarding the `FIXME`'s and `TODO`'s resolution for the crate `router_env` <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(router_env): resolve/remove `FIXME`'s and redundent files (#168) Files to modify: **crates/router_env/src/logger/config.rs** Modify existing code **crates/router_env/src/logger/formatter.rs** Modify existing code **crates/router_env/src/logger/macros.rs** Modify existing code **crates/router_env/src/logger/setup.rs** Remove: - function: private::on_event - struct: pub::DebugLayer - impl: impl Layer<S> for DebugLayer
{"issue_number": 136, "pr_number": 168, "commits_count": 1, "files_changed": 7, "response_length": 1242, "file_count": 6, "needs_breakdown": false}
[FEATURE] Populate status code and delivery attempt information in outgoing webhooks ClickHouse events ### Description As of opening this issue, the outgoing webhooks ClickHouse events contain a few fields: https://github.com/juspay/hyperswitch/blob/ca61e47585071865cf7df5c05fdbe3f57818ca95/crates/router/src/events/outgoing_webhook_logs.rs#L11-L21 There are `error` and `is_error` fields that indicate whether an error occurred when delivering the webhook to the merchant server, but do not include any information on whether the merchant server even received the webhook. To address this issue, we must include the following optional fields in the ClickHouse events: - `status_code` - `delivery_attempt` - `initial_attempt_id` The fields would have to be added in the `OutgoingWebhookEvent` struct, and the corresponding columns must be added in the ClickHouse table. Once the fields have been added in code, the fields must be populated from the [`Event` in the database](https://github.com/juspay/hyperswitch/blob/ca61e47585071865cf7df5c05fdbe3f57818ca95/crates/router/src/types/domain/event.rs#L15-L31): - The `delivery_attempt` and `initial_attempt_id` are available directly in the `Event` struct. - The `status_code` field is available within the `response` struct, if the webhook was delivered to the merchant server.
<think> PR Context: - Title: feat(analytics): populate status_code, initial_attempt_id & delivery_attempt on clickhouse for outgoing webhook events - Merged: 2024-08-12T06:56:25Z - Files changed: 3 files - Commits: 30 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Closes #5070. This PR enhances the outgoing_webhook_events and outgoing_webhook_events_audit tables by adding three new columns: initial_attempt_id, status_code, and delivery_attempt. These additions are essential for tracking the initial_attempt_id, status_code, and delivery_attempt status for outgoing webhook events, allo </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(analytics): populate status_code, initial_attempt_id & delivery_attempt on clickhouse for outgo Files to modify: **crates/router/src/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/events/outgoing_webhook_logs.rs** Modify existing code
{"issue_number": 5070, "pr_number": 5383, "commits_count": 1, "files_changed": 3, "response_length": 1120, "file_count": 4, "needs_breakdown": false}
docs(analytics): Instructions to set up `currency_conversion` (third party dependency API) ## Requirements After the changes by [this](#6418) PR, we need to update the documentation for `analytics` crate setup process. ## Reason Due to the third party dependency on `currency_conversion` crate, we need to ensure the proper setup of this service as well.
<think> PR Context: - Title: docs(analytics): add setup instructions for currency_conversion service - Merged: 2024-11-13T09:54:17Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Now that `analytics` depends on `currency_conversion` crate after this [PR](#6418), we need to include instructions in `analytics` documentation to set up this service. ## Fixes #6513 ### Additional Changes - [ ] This PR modifies the API </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6513, "pr_number": 6516, "commits_count": 0, "files_changed": 1, "response_length": 801, "file_count": 0, "needs_breakdown": false}
Adding Deep health check for Hyperswitch Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy - [x] Failure of health check should emit logs providing evidential data regarding the failure The deep health will verify the following services - [x] #3267 - [x] #3268 - [x] #3269 - [x] #3270 - [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
<think> PR Context: - Title: fix(ui): hide visible scrollbar from checkout widget for windows - Merged: 2025-10-01T13:15:54Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR hides the visible scrollbars on payment link's checkout widget. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to th </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 3264, "pr_number": 9541, "commits_count": 0, "files_changed": 1, "response_length": 794, "file_count": 0, "needs_breakdown": false}
CI DB Migration consistency checks failing after diesel_cli 2.3.0 update After the release of diesel_cli version `2.3.0`, the CI checks for DB migration consistency are failing due to a formatting difference in the output. diesel_cli version 2.3.0 expects to call rustfmt to format its output. If rustfmt is not installed on the system it will give an error. Need to add a step to install rustfmt to fix the workflow
<think> PR Context: - Title: ci(migration-check): install rustfmt to address migration run failures - Merged: 2025-09-15T12:52:03Z - Files changed: 1 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> - `diesel_cli` version `2.3.0` expects to call `rustfmt` to format its output. If `rustfmt` is not installed on the system it will give an error. - Added a step to install `rustfmt` to fix the workflow ### Additional Changes - [ ] This </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 9385, "pr_number": 9386, "commits_count": 0, "files_changed": 1, "response_length": 800, "file_count": 0, "needs_breakdown": false}
feat(roles): add support for roles list - Add support to list all roles for a user. Roles which are equal and below given entity level should be listed - Add support to list roles at a given entity level for a user.
<think> PR Context: - Title: feat(roles): add list support for roles - Merged: 2024-09-02T07:08:19Z - Files changed: 13 files - Commits: 9 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add support to - List available roles with info for the user - List roles at entity level for the user ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment vari </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(roles): add list support for roles (#5754) Files to modify: **crates/api_models/src/events/user_role.rs** Modify existing code **crates/api_models/src/user.rs** Remove: - struct: pub::ListUsersInEntityResponse - struct: pub::MinimalRoleInfo **crates/api_models/src/user_role.rs** Add: - struct: pub::ListUsersInEntityResponse **crates/api_models/src/user_role/role.rs** Add: - struct: pub::RoleInfoResponseNew - struct: pub::ListRolesAtEntityLevelRequest - struct: pub::MinimalRoleInfo - enum: pub::RoleCheckType **crates/diesel_models/src/query/role.rs** Add: - function: pub::generic_roles_list_for_org **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Add: - function: pub::list_roles_with_info - function: pub::list_roles_at_entity_level **crates/router/src/db/kafka_store.rs** Add: - function: private::list_roles_for_org_by_parameters **crates/router/src/db/role.rs** Add: - function: private::list_roles_for_org_by_parameters - function: private::list_roles_for_org_by_parameters **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user_role.rs** Add: - function: pub::list_roles_with_info - function: pub::list_invitable_roles_at_entity_level - function: pub::list_updatable_roles_at_entity_level **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 5753, "pr_number": 5754, "commits_count": 1, "files_changed": 13, "response_length": 2301, "file_count": 15, "needs_breakdown": false}
[REFACTOR] : [Square] Error Message For Connector Implementation ### :memo: Feature Description - In terms of errors, we are currently throwing a 'not supported' message, which shouldn't be the case as we are yet to decide on the implementation. ### :hammer: Possible Implementation - In order to manage payment methods that are not implemented by Hyperswitch or yet to be implemented, the connector transformers file should make use of the NotImplemented ConnectorError enum variant. - By doing so, we will throw same error message for all the Connector Implementation - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2831 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): [Square] change error message from NotSupported to NotImplemented - Merged: 2024-02-27T11:37:14Z - Files changed: 1 files - Commits: 4 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Consistent error messages for not implemented payment method. ## Motivation and Context Resolves #2861 ## How did you test it? payment connector create ``` { "connector_type": "fiz_operations", "connector_name": "volt", "connector_account_details": { "auth_type": "MultiAuthKey", "a </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [Square] change error message from NotSupported to NotImplemented (#2875) Co-au Files to modify: **crates/router/src/connector/square/transformers.rs** Modify existing code
{"issue_number": 2861, "pr_number": 2875, "commits_count": 1, "files_changed": 1, "response_length": 1016, "file_count": 3, "needs_breakdown": false}
feat(auth): Support profile level authentication - After the dashboard is changed to profile level, there will be 3 types of APIs based on the level 1. Merchant Level only - API Keys - Merchant Account - Business profile 2. Profile Level only - Connectors - Routing - Operations (Payment, refund, disputes except list and filter) - etc... 1. Profile + Merchant - Operations list and filter - etc... ### Merchant Level APIs - No changes here. ### Profile Level only - These should start accepting an optional profile_id in the function parameter, which will be passed from auth layer. - There are some APIs which are currently at pseudo profile level like payments create and refunds create. - Currently these kind APIs take profile_id in the payload or query param. - From now on, these should not accept these in the request and take those values from the auth layer. - To support the current API calls, these will fallback to body if profile_id in header is not present. ### Profile + Merchant Level - These APIs should operate both in merchant level and profile level. - These APIs accept a vec of profile_ids in the function parameter. - There should be different routes for these APIs and probably the core function will remain same. - The route function will be different for each route but calls the same core function. - If the profile_id vec is not empty, then the API will send the data for those specific profile_ids else for the whole merchant. ## Breaking changes - Current APIs will be changed in a way that the current calls will work without any changes. So there shouldn't be any breaking changes. ## Auth - Auth layer will now give either 1. org_id, merchant_id and profile_id 2. org_id, merchant_id and Vec<profile_id> - There are currently two types of JWT Auths. 1. JWTAuth 2. JWTMerchantFromRoute - Both of these will have a new implementation which will send the data as mentioned in the first point. - Both of these have profile_id as optional type for backwards compatibility. - Once we have a stable version where profile_id is always present in the JWT, then we can have following JWT Auths for more checks. 1. JWTAuth 2. JWTMerchantFromRoute 3. JWTProfileFromRoute 4. JWTMerchantAndProfileFromRoute - These will always have profile_id in the payload. - Routes can choose to pass or not to pass the profile data to the core function.
<think> PR Context: - Title: feat(auth): Add `profile_id` in `AuthenticationData` - Merged: 2024-08-01T14:04:04Z - Files changed: 7 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Since we are going to change the dashboard to profile level, we need profile level authentication. This PR introduces profile_id in the AuthenticationData. Core API will take this into consideration before sending any response. ### Additi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(auth): Add `profile_id` in `AuthenticationData` (#5492) Files to modify: **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/db/merchant_account.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - struct: pub::AuthenticationDataWithMultipleProfiles **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code **crates/router/src/utils/user.rs** Modify existing code
{"issue_number": 5491, "pr_number": 5492, "commits_count": 1, "files_changed": 7, "response_length": 1382, "file_count": 9, "needs_breakdown": false}
[REFACTOR]: [Klarna] Remove Default Case Handling ### :memo: Feature Description - We utilize match statements to make pivotal decisions, such as generating requests based on the payment method type and managing responses received from the connector. - These conditions generally go hand in hand with enum variants. - Default case is used because a match statement needs to be exhaustive i.e. every variant needs to be covered. - So, if all the explicit cases are handled then default is used to handle the rest. - Each connector have these match statements but many of them don’t provide reference to each variant in their default case, rather a `_` is put to handle all the other cases. - This approach carries a risk because developers may inadvertently overlook the need for explicit handling of the new cases. ### :hammer: Possible Implementation - Instead of relying on a default match case `_`, developers should handle each and every variant explicitly. - By doing so, if there are any changes in the future, they can readily assess the impact of their modifications simply by compiling the code. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/1955 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): [Klarna] Expand wildcard match arms - Merged: 2023-10-01T18:24:54Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Match arms using the wildcard patten (`_`) can be dangereous when extending enums since developers may miss locations where new variants should be handled. This patch expands all wildcard patterns in the Klarna connector to avoid this problem. ## Motivation and Context Fixes #2273 ## How did you test it? `cargo ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [Klarna] Expand wildcard match arms (#2403) Files to modify: **crates/router/src/connector/klarna.rs** Modify existing code
{"issue_number": 2273, "pr_number": 2403, "commits_count": 1, "files_changed": 1, "response_length": 937, "file_count": 3, "needs_breakdown": false}
[FEATURE]: [PayU] Use `connector_response_reference_id` as reference to merchant ### :memo: Feature Description - Reference id are used to map transactions in the connector’s dashboard. - Hyperswitch manages several reference ids, such as `payment_id`, `attempt_id`, and `connector_transaction_id` for a single transaction. - However, merchants may encounter uncertainty when determining which ID to utilize in the connector dashboard to identify the payment. ### :hammer: Possible Implementation - When we receive a response from the connector for the payment, we deserialize it and populate the `response` field in RouterData. - For the `TransactionResponse` type, we must fill the `connector_response_reference_id` with a corresponding reference id for the merchant to identify the transaction. - One might need to have exposure to api docs of the connector for which it is being implemented to decide what to fill in connector_response_reference_id. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/1735 🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: feat(connector): [PayU] Use connector_response_response_id as reference to merchant - Merged: 2023-10-05T19:21:01Z - Files changed: 1 files - Commits: 15 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Fixes #2344 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [PayU] Use connector_response_response_id as reference to merchant (#2452) Co-autho Files to modify: **crates/router/src/connector/payu/transformers.rs** Modify existing code
{"issue_number": 2344, "pr_number": 2452, "commits_count": 1, "files_changed": 1, "response_length": 1012, "file_count": 3, "needs_breakdown": false}
refactor(connector): [bluesnap] add connector_txn_id fallback for webhook ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> add connector_txn_id fallback for webhook ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> #3316 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Trigger webhooks from Bluesnap with and without `merchant_transaction_id` and receive outgoing webhooks from Hyperswitch <img width="1424" alt="Screenshot 2024-01-10 at 7 13 24 PM" src="https://github.com/juspay/hyperswitch/assets/55536657/5a743336-f53a-421f-9d23-d0e75344232d"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor(connector): [bluesnap] add connector_txn_id fallback for webhook - Merged: 2024-01-10T14:54:49Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> add connector_txn_id fallback for webhook ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [bluesnap] add connector_txn_id fallback for webhook (#3317) Files to modify: **crates/router/src/connector/bluesnap.rs** Modify existing code
{"issue_number": 3315, "pr_number": 3317, "commits_count": 1, "files_changed": 1, "response_length": 973, "file_count": 3, "needs_breakdown": false}
refactor: use single purpose token and auth for accept invite - use single purpose JWT auth and single purpose token for accept invite - remove user without merchant JWT auth and user auth token
<think> PR Context: - Title: refactor(user): use single purpose token and auth to accept invite - Merged: 2024-05-02T09:49:50Z - Files changed: 5 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Use single purpose JWT auth and single purpose token for accept invite - Remove user without merchant JWT auth and user auth token ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application co </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(user): use single purpose token and auth to accept invite (#4498) Files to modify: **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/routes/user_role.rs** Modify existing code **crates/router/src/services/authentication.rs** Remove: - function: pub::new_token - function: private::authenticate_and_fetch - struct: pub::UserWithoutMerchantFromToken - struct: pub::UserAuthToken - struct: pub::UserWithoutMerchantJWTAuth - impl: impl UserAuthToken - impl: impl AuthenticateAndFetch<UserWithoutMerchantFromToken, A> for UserWithoutMerchantJWTAuth **crates/router/src/services/authentication/blacklist.rs** Remove: - function: private::check_in_blacklist - impl: impl BlackList for UserAuthToken **crates/router/src/types/domain/user.rs** Modify existing code
{"issue_number": 4497, "pr_number": 4498, "commits_count": 1, "files_changed": 5, "response_length": 1646, "file_count": 7, "needs_breakdown": false}
[FEATURE] add tokenization action handling to payment flow in v2 ### Feature Description This feature add connector-level tokenization to Hyperswitch V2, allowing secure storage of card data as tokens at payment connectors like Braintree. ### Possible Implementation For connector-level tokenization: 1.When a payment comes with raw card data and the connector supports tokenization, send the card details to the connector’s tokenization API. 2. Receive the tokenized payment method ID. 3. Use the token for the subsequent authorization or capture call. ### Have you spent some time checking if this feature request has been raised before? - [x] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes, I am willing to submit a PR!
<think> PR Context: - Title: feat(payments): add tokenization action handling to payment flow for braintree - Merged: 2025-09-30T08:07:13Z - Files changed: 3 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This feature add connector-level tokenization to Hyperswitch V2, allowing secure storage of card data as tokens at payment connectors like Braintree. Additionally Tokenization in router is not implemented, because of temp locker mechanism whi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payments): add tokenization action handling to payment flow for braintree (#9506) Files to modify: **crates/router/src/core/payments.rs** Add: - function: private::is_payment_method_tokenization_enabled_for_connector - function: private::is_payment_flow_allowed_for_connector - enum: pub::TokenizationAction **crates/router/src/core/payments/operations.rs** Add: - function: private::get_connector_tokenization_action **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Add: - function: private::get_connector_tokenization_action
{"issue_number": 9501, "pr_number": 9506, "commits_count": 1, "files_changed": 3, "response_length": 1396, "file_count": 5, "needs_breakdown": false}
feat(connector): add template code for recurly add a template code for recurly connector
<think> PR Context: - Title: feat(connector): add template code for recurly - Merged: 2025-03-05T10:40:40Z - Files changed: 24 files - Commits: 13 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> connector integration template code for recurly. Issue: This PR closes the issue #7283 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application conf </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): add template code for recurly (#7284) Co-authored-by: Aniket Burman <aniket.burman@ Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::recurly **crates/hyperswitch_connectors/src/connectors/recurly.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Recurly - impl: impl Recurly - impl: impl api::Payment for Recurly - impl: impl api::PaymentSession for Recurly - impl: impl api::ConnectorAccessToken for Recurly - impl: impl api::MandateSetup for Recurly - impl: impl api::PaymentAuthorize for Recurly - impl: impl api::PaymentSync for Recurly - impl: impl api::PaymentCapture for Recurly - impl: impl api::PaymentVoid for Recurly - impl: impl api::Refund for Recurly - impl: impl api::RefundExecute for Recurly - impl: impl api::RefundSync for Recurly - impl: impl api::PaymentToken for Recurly - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Recurly - impl: impl ConnectorCommonExt<Flow, Request, Response> for Recurly - impl: impl ConnectorCommon for Recurly - impl: impl ConnectorValidation for Recurly - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Recurly - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Recurly - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Recurly - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Recurly - impl: impl webhooks::IncomingWebhook for Recurly - impl: impl ConnectorSpecifications for Recurly - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::RecurlyRouterData - struct: pub::RecurlyPaymentsRequest - struct: pub::RecurlyCard - struct: pub::RecurlyAuthType - struct: pub::RecurlyPaymentsResponse - struct: pub::RecurlyRefundRequest - struct: pub::RefundResponse - struct: pub::RecurlyErrorResponse - enum: pub::RecurlyPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for RecurlyRouterData<T> - impl: impl TryFrom<&RecurlyRouterData<&PaymentsAuthorizeRouterData>> for RecurlyPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for RecurlyAuthType - impl: impl From<RecurlyPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, RecurlyPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&RecurlyRouterData<&RefundsRouterData<F>>> for RecurlyRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::recurly **crates/router/tests/connectors/recurly.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::RecurlyTest - impl: impl ConnectorActions for RecurlyTest - impl: impl utils::Connector for RecurlyTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 7283, "pr_number": 7284, "commits_count": 1, "files_changed": 24, "response_length": 8808, "file_count": 17, "needs_breakdown": true}
[BUG]: Decryption failure in chat prevents retrieval of conversation history Internal users are unable to view their past chat conversations through the chat/ai/list endpoint, which is meant to be used for internal users. When attempting to retrieve the chat history, the system fails to decrypt the stored messages, resulting in error.
<think> PR Context: - Title: fix(chat): alter encryption logic for ai service - Merged: 2025-10-01T13:05:25Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR addresses an issue where chat conversation history could not be decrypted in the `chat/ai/list` endpoint. The root cause was an inconsistency between the encryption method used when storing chat interactions (`chat/ai/data`) and the decryption method used when retrieving them </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(chat): alter encryption logic for ai service (#9562) Files to modify: **crates/router/src/utils/chat.rs** Modify existing code
{"issue_number": 9561, "pr_number": 9562, "commits_count": 1, "files_changed": 1, "response_length": 915, "file_count": 3, "needs_breakdown": false}
deps(common_utils): put the async ext trait behind a feature ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates ## Description <!-- Describe your changes in detail --> This PR puts the `AsyncExt` trait and certain async functions in the `common_utils` crate behind a feature flag. ### Additional Changes None - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> Required to make the `api_models` crate free of any async-relate dependencies. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> cargo build + cargo hack ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: Changelog for release v0.5.5 - Merged: 2023-04-11T07:30:11Z - Files changed: 1 files - Commits: 1 commits Implementation approach: # 0.5.5 (2023-04-10) ## New Features * **api_models:** derive `strum::Display` for `RefundStatus` (#846) (4524d4f5) * allow (de)serializing countries to/from alpha-2, alpha-3 and numeric country codes (#836) (899767cf) * **connector:** add authorize, capture, void, psync, refund, rsync for PayPal connector (#747) (36049c13) ## Bug Fixes * Add locker sign keyid in env (#844) (70dff140) ## Other Changes * **common_utils:** put the async ext trait behind a feature (#835) (d </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 835, "pr_number": 850, "commits_count": 0, "files_changed": 1, "response_length": 758, "file_count": 3, "needs_breakdown": false}
[REFACTOR]: [PAYU] Add amount conversion framework to Payu ### :memo: Feature Description Currently, amounts are represented as `i64` values throughout the application. We want to introduce a `Unit` struct that explicitly states the denomination. A new type, `MinorUnit`, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows. Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application. ### :hammer: Possible Implementation - For each connector, we need to create an amount conversion function. Connectors will specify the format they require, and the core framework will handle the conversion accordingly. - Connectors should invoke the `convert` function to receive the amount in their required format. - Refer to the [connector documentation](https://docs.payu.in/reference/refund_transaction_api) to determine the required amount format for each connector. - You can refer [this PR](https://github.com/juspay/hyperswitch/pull/4825) for more context. 🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` , `crates/router/src/types/api.rs` , `crates/router/tests/connectors/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :package: Submission Process: - Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself. - Once assigned, submit a pull request (PR). - Maintainers will review and provide feedback, if any. - Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules). Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest. ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): add amount conversion framework to payu - Merged: 2024-10-29T12:10:37Z - Files changed: 4 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR adds amount conversion framework to payu, for sending to connector. fixes #5961 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): add amount conversion framework to payu (#6199) Co-authored-by: rahulsinghpatwa Files to modify: **crates/hyperswitch_connectors/src/connectors/payu.rs** Remove: - struct: pub::Payu Add: - function: pub::new - struct: pub::Payu - impl: impl Payu **crates/hyperswitch_connectors/src/connectors/payu/transformers.rs** Add: - function: private::try_from - struct: pub::PayuRouterData - impl: impl TryFrom<(MinorUnit, T)> for PayuRouterData<T> **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/payu.rs** Modify existing code
{"issue_number": 5961, "pr_number": 6199, "commits_count": 1, "files_changed": 4, "response_length": 1416, "file_count": 6, "needs_breakdown": false}
Todo redis interface ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This PR is a part of greater refactoring which aims on removing `// TODO: ...` & `// FIXME: ..` from the entire codebase. The objective of this PR is to fix `xgroup_create` by adding a guard or some specific `RedisEntryId` while also adding unit tests for the same. It also adds crate documentation for the `redis_interface` crate <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context The codebase wide initiative in fixing existing problems, `TODO:`s and `FIXME:`s while also adding documentations. <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? unit-tests included <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [x] I added unit tests for my changes where possible
<think> PR Context: - Title: fix: resolve `TODO` comments in storage models crate - Merged: 2022-12-15T13:40:02Z - Files changed: 13 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description The PR aims to resolve `TODO`'s and `FIXME`'s from the crate `strorage_models` <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. ` </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: resolve `TODO` comments in storage models crate (#151) Files to modify: **crates/common_utils/src/lib.rs** Add: - function: pub::convert_to_pdt - struct: pub::Milliseconds **crates/router/src/db/process_tracker.rs** Modify existing code **crates/router/src/scheduler/consumer.rs** Modify existing code **crates/router/src/scheduler/utils.rs** Modify existing code **crates/router/src/types/storage/process_tracker.rs** Modify existing code **crates/storage_models/src/address.rs** Remove: - function: private::convert_to_pdt **crates/storage_models/src/payment_intent.rs** Modify existing code **crates/storage_models/src/process_tracker.rs** Remove: - struct: pub::Milliseconds **crates/storage_models/src/query/payment_attempt.rs** Modify existing code **crates/storage_models/src/query/process_tracker.rs** Modify existing code **crates/storage_models/src/query/refund.rs** Modify existing code
{"issue_number": 136, "pr_number": 151, "commits_count": 1, "files_changed": 13, "response_length": 1738, "file_count": 13, "needs_breakdown": false}
feat: create an api to get countries and currencies for a connector and pmt Currently there is no way to set countries and currencies for a particular connector and payment method type. This api should give the list of countries and currencies supported by a given connector and payment method type combination. This will be used by frontend to set filters.
<think> PR Context: - Title: feat(payment_method): API to list countries and currencies supported by a country and payment method type - Merged: 2024-03-28T07:15:34Z - Files changed: 9 files - Commits: 17 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Make a api to fetch the countries and currencies supported by a particular connector. This api will be used by the dashboard to restrict payment methods to specific countries/currencies. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies th </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payment_method): API to list countries and currencies supported by a country and payment method Files to modify: **crates/api_models/src/events/payment.rs** Add: - impl: impl ApiEventMetric for ListCountriesCurrenciesRequest - impl: impl ApiEventMetric for ListCountriesCurrenciesResponse **crates/api_models/src/payment_methods.rs** Add: - struct: pub::ListCountriesCurrenciesRequest - struct: pub::ListCountriesCurrenciesResponse - struct: pub::CountryCodeWithName **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Add: - function: pub::list_countries_currencies_for_connector_payment_method - function: pub::list_countries_currencies_for_connector_payment_method_util **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::list_countries_currencies_for_connector_payment_method **crates/router/src/types/api/payment_methods.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 4163, "pr_number": 4126, "commits_count": 1, "files_changed": 9, "response_length": 2015, "file_count": 11, "needs_breakdown": false}
feat(payments): support for card_network filter in payments list - Support for card_network as filters in payments list - Card network values in payments filter values
<think> PR Context: - Title: feat(payments): support for card_network filter in payments list - Merged: 2024-10-14T10:37:03Z - Files changed: 4 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Support for card_network as filters in payments list - Card network values in payments filter values ### Additional Changes - [X] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifie </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payments): support for card_network filter in payments list (#5994) Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"issue_number": 5995, "pr_number": 5994, "commits_count": 1, "files_changed": 4, "response_length": 1183, "file_count": 6, "needs_breakdown": false}
fix(connector): [ARCHIPEL] Change connector fields that are currently implemented as required in the code to optional … implemented as required in the code to optional ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Change connector fields that are currently implemented as required in the code to optional - billing address and card holder name are optional fields ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 3. `crates/router/src/configs` 4. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### After Changes make /payments without optional field billing.address `curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_T1HKwjm5U0WlfjAgmTAcoE2ejpTsm5J02qCBBqYTNVkHZ7KY5ZKkz2HLfR26Mz5r' \ --data '{ "amount": 600, "amount_to_capture": 600, "currency": "EUR", "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_cvc": "123", "card_exp_month": "01", "card_exp_year": "50", "card_number": "4242424242424242" } } }'` <img width="1066" alt="Screenshot 2025-06-13 at 3 28 27 PM" src="https://github.com/user-attachments/assets/bdfd344c-60ee-411c-9c45-d8add742381b" /> ### Before Changes make /payments without optional field billing.address <img width="1066" alt="Screenshot 2025-06-13 at 3 32 54 PM" src="https://github.com/user-attachments/assets/6121dc6d-3dc3-41c0-a478-53e266f252cf" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: fix(connector): [ARCHIPEL] Change connector fields that are currently implemented as required in the code to optional - Merged: 2025-06-17T09:29:52Z - Files changed: 1 files - Commits: 1 commits Implementation approach: … implemented as required in the code to optional (#8342) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for [8342](https://github.com/juspay/hyperswitch/pull/8342) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application config </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [ARCHIPEL] Change connector fields that are currently implemented as required in the Files to modify: **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Add: - function: private::from
{"issue_number": 8342, "pr_number": 8364, "commits_count": 1, "files_changed": 1, "response_length": 1080, "file_count": 3, "needs_breakdown": false}
docs(openapi): Show API version selection dropdown in API Reference Add a version selection dropdown in API reference to allow exploring v2 APIs
<think> PR Context: - Title: docs(openapi): Show API version selection dropdown in Mintlify - Merged: 2025-06-13T09:03:06Z - Files changed: 30 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Moved both `v1` and `v2` API docs under `api-reference` directory - Renamed `openapi_spec.json` files for v1 and v2 - Updated OpenAPI spec file paths in `openapi` crate - Modified OpenAPI spec path in CI pipeline ### Additional Changes </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** docs(openapi): Show API version selection dropdown in Mintlify (#8333) Files to modify: **crates/openapi/src/main.rs** Modify existing code
{"issue_number": 8332, "pr_number": 8333, "commits_count": 1, "files_changed": 30, "response_length": 939, "file_count": 3, "needs_breakdown": false}
[FEATURE] VIPPS Payment (Norwegian) ### Feature Description Use vipps as payment. https://developer.vippsmobilepay.com/docs/recommended-flows/online/ ### Possible Implementation User can choose Vipps as payment and will be able to pay with this ### Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: feat(router): add incoming header request logs - Merged: 2024-03-05T09:43:48Z - Files changed: 9 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> added incoming header request logs ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): add incoming header request logs (#3939) Files to modify: **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::UnmaskedHeaders **crates/router/src/services/api.rs** Modify existing code
{"issue_number": 4182, "pr_number": 3939, "commits_count": 1, "files_changed": 9, "response_length": 1077, "file_count": 5, "needs_breakdown": false}
[REFACTOR] accept customer details in customer object Currently, for a payment, the `CustomerDetails` such as email, phone, name are accepted in the `PaymentsRequest` struct https://github.com/juspay/hyperswitch/blob/795500797d1061630b5ca493187a4e19d98d26c0/crates/api_models/src/payments.rs#L59 It is not clear that these fields are related to the customer. One may think that the fields are for a payment and one time use only. But these are stored in the `Customers` table. A better api design would be to accept the customer details in a `customers` field in `PaymentsRequest`. It would look something like this ```json { "customer" : { "id": "cus_1235", "email" : "[email protected]" } } ```
<think> PR Context: - Title: refactor(core): accept customer data in customer object - Merged: 2023-06-16T13:53:15Z - Files changed: 11 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> This PR will support sending the customer details in the `customers` object in `PaymentsRequest` in all three endpoints - payments-create - payments-update - payments-confirm The changes are added in a backwards compatible manner, the older fields will be deprecated soon. ### Additional Changes - [x] This PR modifies the API contract <!-- Pr </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(core): accept customer data in customer object (#1447) Co-authored-by: Abhishek Marrivagu < Files to modify: **crates/api_models/src/payments.rs** Remove: - function: private::from - impl: impl From<PaymentsRequest> for VerifyRequest Add: - struct: pub::CustomerDetails **crates/router/src/core/payments/helpers.rs** Add: - function: private::validate_options_for_inequality - function: pub::validate_customer_details_in_request - function: pub::get_customer_details_from_request **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/openapi.rs** Modify existing code
{"issue_number": 1446, "pr_number": 1447, "commits_count": 1, "files_changed": 11, "response_length": 2093, "file_count": 13, "needs_breakdown": false}
Use `Self` instead of type names in `impl` blocks Set up `clippy` to warn on [`clippy::use_self`](https://rust-lang.github.io/rust-clippy/master/#use_self) and address the lints thrown. (Originated from https://github.com/juspay/orca/pull/190#discussion_r1054060076)
<think> PR Context: - Title: chore(router): clippy::use_self - Merged: 2022-12-22T05:50:54Z - Files changed: 28 files - Commits: 2 commits Implementation approach: ## Description use Self alias wherever necessary to avoid repetition ## Motivation and Context This PR closes #193 ## Checklist - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** chore(router): clippy::use_self (#203) Files to modify: **connector-template/transformers.rs** Modify existing code **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/applepay/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/klarna/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/errors/api_error_response.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/cancel_flow.rs** Modify existing code **crates/router/src/core/payments/flows/capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/services/api/client.rs** Modify existing code **crates/router/src/services/api/request.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/storage/payment_intent.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils/ext_traits.rs** Modify existing code
{"issue_number": 193, "pr_number": 203, "commits_count": 1, "files_changed": 28, "response_length": 2696, "file_count": 30, "needs_breakdown": true}
refactor(connector): [Gocardless] Mask PII data ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Mask pii information passed and received in the connector request and response for Gocardless. ## Test Case 1. Create a payment intent with Gocardless ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{}}' \ --data-raw '{ "amount": 0, "order_details": null, "currency": "USD", "confirm": false, "capture_method": "automatic", "authentication_type": "three_ds", "customer_id": "arjun", "email": "[email protected]", "description": "Hello this is description", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "metadata": {}, "setup_future_usage": "off_session", "mandate_data": { "mandate_type": { "multi_use": { "amount": 1000, "currency": "USD" } } } }' ``` 2.Confirm the mandate payment ``` curl --location 'http://localhost:8080/payments/pay_FXMSggPlgoGMg9r6AlpY/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BRdlOJtJTl8WPK503hzNIbM8mTJC7Ayp1D4tiMyP9JzUXTEvR1N65YLI4uy7C2w2' \ --data-raw '{ "return_url": "http://localhost:9060/completion", "payment_method": "bank_debit", "setup_future_usage": "off_session", "payment_method_type": "ach", "payment_type": "setup_mandate", "payment_method_data": { "bank_debit": { "ach_bank_debit": { "billing_details": { "name": "Shivam S", "email": "[email protected]", "address": { "line1": "123", "line2": "123", "city": "vjnsf", "state": "Alaska", "zip": "10001", "country": "US" } }, "account_number": "27155003358", "bank_account_holder_name": "tests tests", "routing_number": "026073150", "bank_type": "checking" } } }, "mandate_data": { "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2023-12-07T12:16:08.622Z", "online": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" } } }, "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8", "language": "en-GB", "color_depth": 24, "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "0.0.0.0" } }' ``` 3. Check if all the sensitive data in the `masked_response` is masked ``` curl --location '{{base_url}}/analytics/v1/connector_event_logs?type=Payment&payment_id={{payment_id}}' \ --header 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'authorization: Bearer JWT_token' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \ --header 'Content-Type: application/json' \ --header 'Referer: https://integ.hyperswitch.io/' \ --header 'api-key: {{api-key}}' \ --header 'sec-ch-ua-platform: "macOS"' ``` Response should contain: ``` "masked_response\":\"{\\\"mandates\\\":{\\\"id\\\":\\\"*** alloc::string::String ***\\\"}} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor: [Noon] adding new field max_amount to mandate request - Merged: 2024-01-17T12:06:24Z - Files changed: 1 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Resolves [#3844](https://github.com/juspay/hyperswitch-cloud/issues/3844) _Note 1.While connector create ensure `test_mode` is set to true 2.Ensure the currency passed is `AED` and country is `AE`_ ## How did you test it? 1.Create a </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: [Noon] adding new field max_amount to mandate request (#3209) Co-authored-by: AkshayaFoige Files to modify: **crates/router/src/connector/noon/transformers.rs** Modify existing code
{"issue_number": 3844, "pr_number": 3209, "commits_count": 1, "files_changed": 1, "response_length": 992, "file_count": 3, "needs_breakdown": false}
refactor(connector): remove `peek()` on PII info ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> Closes #308 ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> In connectors when mapping the PII information while building the request we are mapping as plain text(String), it is not recommended as it can be logged. so removing those logs from connector code. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: Changelog for release V0.4.0 - Merged: 2023-03-05T12:57:59Z - Files changed: 1 files - Commits: 3 commits Implementation approach: # 0.3.0 (2023-03-05) ## Chores * **connectors:** log connector request and response at debug level (#624) (6a487b19) ## Continuous Integration * **workflow:** adding build only sandbox feature to reduce build time (#664) (d1c9305e) * **workflow:** run cargo hack only for code changes (#663) (f931c427) ## Documentation Changes * **openapi:** document security schemes (#676) (c5fda7ac) ## New Features * **session_token:** create session token only if pmt is enabled (#703) </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 642, "pr_number": 715, "commits_count": 0, "files_changed": 1, "response_length": 758, "file_count": 5, "needs_breakdown": false}
Nix Support Nix support for orca: - Dev shell to include all the required tools, setup - Build with nix flakes - CI/CD with nix flakes
<think> PR Context: - Title: feat(nix): add support for running external services through services-flake - Merged: 2024-11-05T14:07:43Z - Files changed: 4 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #57 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are t </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 57, "pr_number": 6377, "commits_count": 0, "files_changed": 4, "response_length": 805, "file_count": 0, "needs_breakdown": false}
fix(connector): Use `ConnectorError::InvalidConnectorConfig` for an invalid `CoinbaseConnectorMeta` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> I've removed `to_connector_meta_from_secret_with_required_field`, which uses `MissingRequiredField` as an error (I also didn't like the unnecessary initialization of the `MissingRequiredField` before we knew if it would be needed). Instead, I added a `TryFrom` implementation for `CoinbaseConnectorMeta`, which uses the requested `ConnectorError::InvalidConnectorConfig`. Additionally, I included `CoinbaseConnectorMeta::try_from` in the `validate_auth_and_metadata_type` as suggested. ### Migration ``` -- The migration is for adding an empty `pricing_type` attribute for `CoinbaseConnectorMeta` where it is missing. UPDATE merchant_connector_account SET metadata = jsonb_insert( metadata, '{pricing_type}', '""', true ) WHERE connector_name = 'coinbase' AND NOT metadata ? 'pricing_type'; ``` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This PR addresses the bug from the issue: https://github.com/juspay/hyperswitch/issues/2899. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Run unit test:** ``` cargo test --release --package router --lib connector::coinbase::transformers::tests::coinbase_payments_request_try_from_works -- --exact ``` ![image](https://github.com/juspay/hyperswitch/assets/8159517/a296af9b-a454-4d9b-a8ad-1939a837f04b) ### Migration script test https://onecompiler.com/postgresql/3zz2tpkad **Test script with test data and run migration:** ```label=dsa CREATE TABLE merchant_connector_account ( id SERIAL PRIMARY KEY, connector_name VARCHAR(255) NOT NULL ); ALTER TABLE merchant_connector_account ADD COLUMN metadata JSONB DEFAULT NULL; -- insert test data INSERT INTO merchant_connector_account ( id, connector_name, metadata ) VALUES (1, 'coinbase', '{ "pricing_type": "fixed-rate" }'), (2, 'coinbase', '{ "whatever_attribute": "abc" }'), (3, 'coinbase', '{}'); -- Before select * from merchant_connector_account; -- Run migration: -- The migration is for adding an empty `pricing_type` attribute for `CoinbaseConnectorMeta` where it is missing. UPDATE merchant_connector_account SET metadata = jsonb_insert( metadata, '{pricing_type}', '""', true ) WHERE connector_name = 'coinbase' AND NOT metadata ? 'pricing_type'; -- After select * from merchant_connector_account; ``` **Output:** ``` Output: CREATE TABLE ALTER TABLE INSERT 0 3 id | connector_name | metadata ----+----------------+-------------------------------- 1 | coinbase | {"pricing_type": "fixed-rate"} 2 | coinbase | {"whatever_attribute": "abc"} 3 | coinbase | {} (3 rows) UPDATE 2 id | connector_name | metadata ----+----------------+--------------------------------------------------- 1 | coinbase | {"pricing_type": "fixed-rate"} 2 | coinbase | {"pricing_type": "", "whatever_attribute": "abc"} 3 | coinbase | {"pricing_type": ""} (3 rows) ``` **Run locally:** **Invalid metadata:** ![image](https://github.com/juspay/hyperswitch/assets/8159517/5e087dad-9dab-4441-a444-787d8e720c1a) **Empty metadata:** ![image](https://github.com/juspay/hyperswitch/assets/8159517/0f745195-0b0b-4276-aeba-c18ad11d3749) **Correct metadata:** ![image](https://github.com/juspay/hyperswitch/assets/8159517/a5fe8ffa-12d2-449d-8363-a214aadca2fb) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: chore: nits and small code improvements found during investigation of PR#3168 - Merged: 2024-01-10T11:44:19Z - Files changed: 4 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> While addressing [PR#3168](https://github.com/juspay/hyperswitch/pull/3168), I came across several minor issues and made some small code improvements. These changes were unrelated to the main issue and were requested to be undone. Consequent </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** chore: nits and small code improvements found during investigation of PR#3168 (#3259) Files to modify: **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/connector/worldline/transformers.rs** Modify existing code **crates/router/src/core/fraud_check.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code
{"issue_number": 3168, "pr_number": 3259, "commits_count": 1, "files_changed": 4, "response_length": 1202, "file_count": 6, "needs_breakdown": false}
feat: Create a decision starter API for email flows As we have split the API flows, there is no API to trigger the email specific flows like Verify email, Accept invite from email, etc... For this API to work correctly, email token should have the information about the origin.
<think> PR Context: - Title: feat: Add decision starter API for email flows - Merged: 2024-05-06T07:23:35Z - Files changed: 10 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Create a new API `from_email` which will take email token and give the token for the next flow. - Add `flow` field in email token which will help `from_email` API to decide the next flow. ### Additional Changes - [x] This PR modifies </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat: Add decision starter API for email flows (#4533) Co-authored-by: hyperswitch-bot[bot] <1485255 Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::UserFromEmailRequest **crates/router/src/core/user.rs** Add: - function: pub::user_from_email **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::user_from_email **crates/router/src/services/email/types.rs** Add: - function: pub::get_flow **crates/router/src/types/domain/user/decision_manager.rs** Add: - function: pub::get_token **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 4532, "pr_number": 4533, "commits_count": 1, "files_changed": 10, "response_length": 1584, "file_count": 11, "needs_breakdown": false}
[FEATURE]: [Fiserv] Currency Unit Conversion ### :memo: Feature Description - Each currency can be described in terms of base or minor units. - For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit. - In Hyperswitch, the amount value is expected to be always provided in minor units. - For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent) - Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them. - We have functions `to_currency_base_unit` and `to_currency_lower_unit` in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector. ### :hammer: Possible Implementation - ConnectorCommon trait have been implemented for the connector. - This trait contains `get_currency_unit` method. This method needs to be implemented. - It will define what type of conversion needs to be done during `connector_router_data` creation. Concurrently handle the creation of `connector_router_data` to be passed for the connector request body creation. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2196 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: feat(connector): [Fiserv] Currency Unit Conversion - Merged: 2023-11-05T11:11:46Z - Files changed: 2 files - Commits: 9 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Addressing Issue: #2225 - Modified two files in `hyperswitch/crates/router/src/connector/` - `fiserv.rs` - Implement `get_currency_unit` function - Modify `ConnectorIntegration` implementations for `Fiserv` - `fiserv/transformers.rs` - Implement `FiservRouterD </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Fiserv] Currency Unit Conversion (#2715) Files to modify: **crates/router/src/connector/fiserv.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/fiserv/transformers.rs** Add: - function: private::try_from - struct: pub::FiservRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for FiservRouterData<T>
{"issue_number": 2225, "pr_number": 2715, "commits_count": 1, "files_changed": 2, "response_length": 1243, "file_count": 4, "needs_breakdown": false}
chore(codeowners): add codeowners data for PR reviews ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description Adding a CODEOWNERS file for facilitating PR reviews for teams ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> This leads to better ownership boundaries & increased efficiency for reviewers ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Doesn't need to be tested ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor(router): enable saved payment method for payment link bug fix - Merged: 2024-04-23T10:23:32Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> list saved payment method customer is not working for payment link. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(router): enable saved payment method for payment link bug fix (#4435) Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code
{"issue_number": 1, "pr_number": 4435, "commits_count": 1, "files_changed": 2, "response_length": 975, "file_count": 3, "needs_breakdown": false}
[REFACTOR] : [Noon] Error Message For Connector Implementation ### :memo: Feature Description - In terms of errors, we are currently throwing a 'not supported' message, which shouldn't be the case as we are yet to decide on the implementation. ### :hammer: Possible Implementation - In order to manage payment methods that are not implemented by Hyperswitch or yet to be implemented, the connector transformers file should make use of the NotImplemented ConnectorError enum variant. - By doing so, we will throw same error message for all the Connector Implementation - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2831 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): [Noon] change error message from not supported to not implemented - Merged: 2024-02-02T08:00:07Z - Files changed: 1 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [Noon] change error message from not supported to not implemented (#2849) Co-au Files to modify: **crates/router/src/connector/noon/transformers.rs** Modify existing code
{"issue_number": 2844, "pr_number": 2849, "commits_count": 1, "files_changed": 1, "response_length": 1014, "file_count": 3, "needs_breakdown": false}
feat(connector): [ACI] Currency Unit Conversion ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(connector): [ProphetPay] Template generation - Merged: 2023-10-19T08:02:13Z - Files changed: 16 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Default connector template for prophetpay ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [ProphetPay] Template generation (#2610) Co-authored-by: Arjun Karthik <m.arjunkart Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/connector.rs** Add: - mod: pub::prophetpay **crates/router/src/connector/prophetpay.rs** Add: - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Prophetpay - impl: impl api::payments::MandateSetup for Prophetpay - impl: impl api::Payment for Prophetpay - impl: impl api::PaymentSession for Prophetpay - impl: impl api::ConnectorAccessToken for Prophetpay - impl: impl api::PaymentAuthorize for Prophetpay - impl: impl api::PaymentSync for Prophetpay - impl: impl api::PaymentCapture for Prophetpay - impl: impl api::PaymentVoid for Prophetpay - impl: impl api::Refund for Prophetpay - impl: impl api::RefundExecute for Prophetpay - impl: impl api::RefundSync for Prophetpay - impl: impl api::PaymentToken for Prophetpay - impl: impl ConnectorIntegration< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for Prophetpay - impl: impl ConnectorCommonExt<Flow, Request, Response> for Prophetpay - impl: impl ConnectorCommon for Prophetpay - impl: impl ConnectorValidation for Prophetpay - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for Prophetpay - impl: impl ConnectorIntegration< api::SetupMandate, types::SetupMandateRequestData, types::PaymentsResponseData, > for Prophetpay - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Prophetpay - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Prophetpay - impl: impl api::IncomingWebhook for Prophetpay - mod: pub::transformers **crates/router/src/connector/prophetpay/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::ProphetpayRouterData - struct: pub::ProphetpayPaymentsRequest - struct: pub::ProphetpayCard - struct: pub::ProphetpayAuthType - struct: pub::ProphetpayPaymentsResponse - struct: pub::ProphetpayRefundRequest - struct: pub::RefundResponse - struct: pub::ProphetpayErrorResponse - enum: pub::ProphetpayPaymentStatus - enum: pub::RefundStatus - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for ProphetpayRouterData<T> - impl: impl TryFrom<&ProphetpayRouterData<&types::PaymentsAuthorizeRouterData>> for ProphetpayPaymentsRequest - impl: impl TryFrom<&types::ConnectorAuthType> for ProphetpayAuthType - impl: impl From<ProphetpayPaymentStatus> for enums::AttemptStatus - impl: impl TryFrom< types::ResponseRouterData<F, ProphetpayPaymentsResponse, T, types::PaymentsResponseData>, > for types::RouterData<F, T, types::PaymentsResponseData> - impl: impl TryFrom<&ProphetpayRouterData<&types::RefundsRouterData<F>>> for ProphetpayRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>> for types::RefundsRouterData<api::Execute> - impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>> for types::RefundsRouterData<api::RSync> **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::prophetpay **crates/router/tests/connectors/prophetpay.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::ProphetpayTest - impl: impl ConnectorActions for ProphetpayTest - impl: impl utils::Connector for ProphetpayTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 2750, "pr_number": 2610, "commits_count": 1, "files_changed": 16, "response_length": 8844, "file_count": 12, "needs_breakdown": true}
Get Plan prices **Request to Subscription Povider to get plans prices** api/v2/item_prices?item_id[is]=cbdemo_enterprise-suite' **Response from Subscription Provider** ``` { "list": [ { "item_price": { "id": "cbdemo_enterprise-suite-INR-Daily", "name": "Enterprise Suite INR Daily", "item_family_id": "cbdemo_omnisupport-solutions", "item_id": "cbdemo_enterprise-suite", "status": "active", "external_name": "Enterprise Suite", "pricing_model": "flat_fee", "price": 10000, "period": 1, "currency_code": "INR", "period_unit": "day", "free_quantity": 0, "channel": "web", "resource_version": 1755510951486, "updated_at": 1755510951, "created_at": 1755510951, "is_taxable": true, "item_type": "plan", "show_description_in_invoices": false, "show_description_in_quotes": false, "deleted": false, "object": "item_price" } }, { "item_price": { "id": "cbdemo_enterprise-suite-monthly", "name": "Enterprise Suite Monthly", "item_family_id": "cbdemo_omnisupport-solutions", "item_id": "cbdemo_enterprise-suite", "description": "Enterprise Suite billed monthly", "status": "active", "external_name": "Enterprise Suite Monthly", "pricing_model": "flat_fee", "price": 14100, "period": 1, "currency_code": "INR", "period_unit": "month", "free_quantity": 0, "channel": "web", "resource_version": 1754897341938, "updated_at": 1754897341, "created_at": 1754897341, "is_taxable": true, "item_type": "plan", "show_description_in_invoices": false, "show_description_in_quotes": false, "deleted": false, "object": "item_price" } }, { "item_price": { "id": "cbdemo_enterprise-suite-annual", "name": "Enterprise Suite Annual", "item_family_id": "cbdemo_omnisupport-solutions", "item_id": "cbdemo_enterprise-suite", "description": "Enterprise Suite billed annually", "status": "active", "external_name": "Enterprise Suite Annual", "pricing_model": "flat_fee", "price": 169000, "period": 1, "currency_code": "INR", "period_unit": "year", "free_quantity": 0, "channel": "web", "resource_version": 1754897341789, "updated_at": 1754897341, "created_at": 1754897341, "is_taxable": true, "item_type": "plan", "show_description_in_invoices": false, "show_description_in_quotes": false, "deleted": false, "object": "item_price" } } ] } ```
<think> PR Context: - Title: feat(connector): Add support for get plan prices for Chargebee - Merged: 2025-09-19T08:20:28Z - Files changed: 16 files - Commits: 25 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR integrates the get plan prices endpoint for chargebee, required to be called in the respective API handler for the same (not yet implemented) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): Add support for get plan prices for Chargebee (#9300) Co-authored-by: hyperswitch-b Files to modify: **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Add: - function: private::get_chargebee_plan_prices_query_params - function: private::get_headers - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::subscriptions::GetSubscriptionPlanPricesFlow for Chargebee - impl: impl ConnectorIntegration< GetSubscriptionPlanPrices, GetSubscriptionPlanPricesRequest, GetSubscriptionPlanPricesResponse, > for Chargebee - impl: impl GetSubscriptionPlanPricesV2 for Chargebee - impl: impl ConnectorIntegrationV2< GetSubscriptionPlanPrices, hyperswitch_domain_models::router_data_v2::flow_common_types::GetSubscriptionPlanPricesData, GetSubscriptionPlanPricesRequest, GetSubscriptionPlanPricesResponse, > for Chargebee **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Add: - function: private::try_from **crates/hyperswitch_connectors/src/connectors/recurly.rs** Add: - impl: impl api::subscriptions_v2::GetSubscriptionPlanPricesV2 for Recurly - impl: impl ConnectorIntegrationV2< GetSubscriptionPlanPrices, GetSubscriptionPlanPricesData, GetSubscriptionPlanPricesRequest, GetSubscriptionPlanPricesResponse, > for Recurly **crates/hyperswitch_connectors/src/default_implementations.rs** Remove: - impl: impl Subscriptions for connectors::DummyConnector<T> Add: - impl: impl GetSubscriptionPlanPricesFlow for $connector - impl: impl ConnectorIntegration< GetSubscriptionPlanPrices, GetSubscriptionPlanPricesRequest, GetSubscriptionPlanPricesResponse > for $connector - impl: impl Subscriptions for connectors::DummyConnector<T> - impl: impl GetSubscriptionPlanPricesFlow for connectors::DummyConnector<T> - impl: impl ConnectorIntegration< GetSubscriptionPlanPrices, GetSubscriptionPlanPricesRequest, GetSubscriptionPlanPricesResponse, > for connectors::DummyConnector<T> **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::GetSubscriptionPlanPricesData **crates/hyperswitch_domain_models/src/router_flow_types.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlanPrices **crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlanPricesRequest **crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlanPricesResponse - struct: pub::SubscriptionPlanPrices - enum: pub::PeriodUnit **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Modify existing code **crates/hyperswitch_interfaces/src/api/subscriptions.rs** Add: - trait: pub::GetSubscriptionPlanPricesFlow - trait: private::GetSubscriptionPlanPricesFlow **crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs** Remove: - trait: pub::SubscriptionsV2 Add: - trait: pub::SubscriptionsV2 - trait: pub::GetSubscriptionPlanPricesV2 **crates/hyperswitch_interfaces/src/conversion_impls.rs** Remove: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for GetSubscriptionPlansData **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"issue_number": 9054, "pr_number": 9300, "commits_count": 1, "files_changed": 16, "response_length": 4657, "file_count": 18, "needs_breakdown": true}
feat(themes): Setup DB for themes There should a separate table for themes for storing the `theme_id`s for a particular lineage. This should be the schema: | org_id | merchant_id | profile_id | theme_id | | ------ | ----------- | ---------- | -------- | | o1 | m1 | p1 | t1 | | o1 | m1 | p2 | t2 | This will be used for changing theme automatically when user switches any entities.
<think> PR Context: - Title: feat(themes): Setup themes table - Merged: 2024-11-14T09:16:40Z - Files changed: 15 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR creates a new table named `themes` in the DB. This will be used to store the `theme_id` for any lineage of `tenant_id`, `org_id`, `merchant_id` and `profile_id`. ### Additional Changes - [ ] This PR modifies the API contract - [ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(themes): Setup themes table (#6533) Files to modify: **crates/common_utils/src/types.rs** Add: - mod: pub::theme **crates/common_utils/src/types/theme.rs** Add: - enum: pub::ThemeLineage **crates/diesel_models/src/query/user.rs** Add: - mod: pub::theme **crates/diesel_models/src/query/user/theme.rs** Add: - function: pub::insert - function: private::lineage_filter - function: pub::find_by_lineage - function: pub::delete_by_theme_id_and_lineage - impl: impl ThemeNew - impl: impl Theme **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user.rs** Add: - mod: pub::theme **crates/diesel_models/src/user/theme.rs** Add: - struct: pub::Theme - struct: pub::ThemeNew **crates/router/src/db.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::insert_theme - function: private::find_theme_by_lineage - function: private::delete_theme_by_lineage_and_theme_id - impl: impl ThemeInterface for KafkaStore **crates/router/src/db/user.rs** Add: - mod: pub::theme **crates/router/src/db/user/theme.rs** Add: - function: private::insert_theme - function: private::find_theme_by_lineage - function: private::delete_theme_by_lineage_and_theme_id - function: private::check_theme_with_lineage - function: private::insert_theme - function: private::find_theme_by_lineage - function: private::delete_theme_by_lineage_and_theme_id - trait: pub::ThemeInterface - impl: impl ThemeInterface for Store - impl: impl ThemeInterface for MockDb **crates/storage_impl/src/mock_db.rs** Modify existing code
{"issue_number": 6532, "pr_number": 6533, "commits_count": 1, "files_changed": 15, "response_length": 2537, "file_count": 15, "needs_breakdown": false}
fix(list): improve querying time for payments list Quick Fix. Currently payment list is giving intermittent 5xx. After analyzing logs we got to knwo that it is happening for the count query That query need to be called always and we can skip this in most of the cases. Also add the logs around count. This can be a temporary help, till will move to more durable solution.
<think> PR Context: - Title: fix(payments_list): skip count query if no filters and add logging - Merged: 2024-10-17T10:51:43Z - Files changed: 9 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Skip count query if no filters are applied for attempts, in this we don't need to filter attempts as count of active attempt ids will be the total count. - Profile id filter is already getting applied in intents, so removing it from last active attempts. - Add logging around count </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments_list): skip count query if no filters and add logging (#6331) Files to modify: **crates/api_models/src/payments.rs** Add: - function: pub::has_no_attempt_filters - impl: impl PaymentListFilterConstraints **crates/diesel_models/src/query/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/routes/metrics.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"issue_number": 6330, "pr_number": 6331, "commits_count": 1, "files_changed": 9, "response_length": 1613, "file_count": 11, "needs_breakdown": false}
fix(user): use mget to check in blocklist ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Use MGet to check whether role or user is blacklisted in KV. Instead of checking user and role separately, MGet can help to do it in one call. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Enhancement ## How did you test it? Singup --> Sigin --> Create a new role --> Invite new user with newly created role --> Sign In new user --> perform some operations which the user with assigned role can perform --> now update the role --> try performing same operation for the newly invited user. It won't be valid since role has been blocklist. Can also check KV for blocklisted role_id and user_id. Curls for singup/singin curl --location 'http://localhost:8080/user/signup' \ --header 'Content-Type: application/json' \ --header 'Cookie: token=JWT' \ --data-raw '{ "email": "[email protected]", "password": "Test@12", "country": "IN" } ' curl --location 'http://localhost:8080/user/signin' \ --header 'Content-Type: application/json' \ --header 'Cookie: token=JWT' \ --data-raw '{ "email": "[email protected]", "password": "260e5c5c-dc96-4cb9-870c-eb18ab8ab577" }' Create Role: curl --location 'http://localhost:8080/user/role' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "role_name": "test", "groups": ["operations_view", "operations_manage"], "role_scope": "organization" }' Update Role: curl --location --request PUT 'http://localhost:8080/user/role/role_QvY913dYo2b05D64bJ8l' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "groups": ["operations_view"] }' ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: fix(redis_interface): remove mget function from redis interface - Merged: 2024-04-05T12:22:15Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Getting multiple values from Redis at one time was working fine in local environment but was failing when deployed because of mutiple clusters at infra level. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(redis_interface): remove mget function from redis interface (#4303) Co-authored-by: hyperswitch- Files to modify: **crates/redis_interface/src/commands.rs** Remove: - function: pub::get_multiple_keys - function: pub::get_and_deserialize_multiple_keys
{"issue_number": 3945, "pr_number": 4303, "commits_count": 1, "files_changed": 1, "response_length": 1062, "file_count": 3, "needs_breakdown": false}
Adding events for Payment Reject Created from #4525 This covers adding events for Payment Reject operation This event should include the payment data similar to [PaymentCancel](https://github.com/juspay/hyperswitch/pull/4166) It should also include any metadata for the event e.g reason for payment rejection, error codes, rejection source etc
<think> PR Context: - Title: feat(events): Add payment reject audit events - Merged: 2024-11-12T07:18:54Z - Files changed: 2 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Pass along request_state to payment_core Modify the UpdateTracker trait to accept request state Modify the PaymentReject implementation of UpdateTracker to generate an event ### Additional Changes - [ ] This PR modifies the API contr </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(events): Add payment reject audit events (#6465) Co-authored-by: Anish Kacham <f2010091@hyderab Files to modify: **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/events/audit_events.rs** Modify existing code
{"issue_number": 4669, "pr_number": 6465, "commits_count": 1, "files_changed": 2, "response_length": 1054, "file_count": 4, "needs_breakdown": false}
[BUG] : `connector_name` in `MerchantConnectorCreate` accepts any value ### Bug Description When creating a merchant connector account, the `connector_name` field is of string type. This would mean that any value can be passed to that field. There is no check done to validate whether the connector name given, is actually supported. This creates an issue in the payments flow when the `connector` is accessed as enum here https://github.com/juspay/hyperswitch/blob/58332f055e640ec810a3c6cc8e534f2f862e57dc/crates/router/src/types/api.rs#L144. The conversion function from string to enum can be found here https://github.com/juspay/hyperswitch/blob/58332f055e640ec810a3c6cc8e534f2f862e57dc/crates/router/src/types/api.rs#L185 ### Expected Behavior It should only accept the `connector_name` which are supported by hyperswitch. ### Actual Behavior It accepts any value and then fails when creating the payment. ### Steps To Reproduce Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant. 1. Create a `connector_account` with any `connector_name`. ( could be a typo ). 2. Create a payment with actual connector name. 3. The payment fails saying `Merchant connector account does not exist in our records` ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? No If yes, please provide the value of the `x-request-id` response header for helping us debug your issue. If not (or if building/running locally), please provide the following details: 1. Operating System or Linux distribution: Macos 2. Rust version (output of `rustc --version`): `rustc 1.68.2 (9eb3afe9e 2023-03-27)` 3. App version (output of `cargo r -- --version`): `` ### Have you spent some time to check if this bug has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? No, but I'm happy to collaborate on a PR with someone else
<think> PR Context: - Title: fix(router): use `Connector` enum for `connector_name` field in `MerchantConnectorCreate` - Merged: 2023-07-07T13:29:34Z - Files changed: 3 files - Commits: 6 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description When creating a merchant connector account, the connector_name field is of string type. This would mean that any value can be passed to that field. There is no check done to validate whether the connector name given, is actually supported. This creates an issue in the payments flow wh </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(router): use `Connector` enum for `connector_name` field in `MerchantConnectorCreate` (#1637) Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code
{"issue_number": 1023, "pr_number": 1637, "commits_count": 1, "files_changed": 3, "response_length": 1056, "file_count": 4, "needs_breakdown": false}
ci: run cybersource along with stripe ci: run cybersource along with stripe
<think> PR Context: - Title: ci: introduce `cybersource` cypress test to run in parallel - Merged: 2024-11-14T11:52:04Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> Run Cybersource in parallel along with Stripe. closes #6542 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment var </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6542, "pr_number": 6541, "commits_count": 0, "files_changed": 1, "response_length": 789, "file_count": 0, "needs_breakdown": false}
feat(test_utils): Add custom-headers and custom delay support to rustman ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature - [x] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> Closes #2646 This PR as usual, narrows the main aim of rustman by making specific to Hyperswitch. With this, you should now be able to: - Set delay between each request sent as per your own wish while default being `7` milliseconds - Pass in custom-headers of your wish in run time ### How custom-headers works Custom headers inject the headers that you pass in command line into the `event.prerequest.js` file and sets a flag to `true`. After the collection is run, it checks the flag and depending on that, it will `git checkout HEAD -- <collection_name>/event.prerequest.js` to restore the file to same as before. We can also pass `-e environment.json` where you pass in custom headers but that requires some significant changes to be done to the collections to support that. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This will allow us to pass different headers in run-time to test new things and also allow you to set delay of your wish. You can now set the delay to `100000000000` and wait for ages to run a single test :D ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Command used: (Custom headers taken from #2116) Delay set to 0.5 seconds ```sh cargo run --bin test_utils -- --base_url=http://127.0.0.1:8080 --admin_api_key=test_admin --connector_name=stripe --folder "QuickStart" --header "payment_confirm_source:merchant_server" --header "another_header_key:and_its_value" --delay_request 4294967295 ``` In run-time, we can see the custom-headers being injected here: ![image](https://github.com/juspay/hyperswitch/assets/69745008/f0b35bb5-3e5d-4731-906b-d4d38c27090a) ![image](https://github.com/juspay/hyperswitch/assets/69745008/d07633f4-b5f8-499a-bb3f-efe16d41dbde) Value being stored in DB: ![image](https://github.com/juspay/hyperswitch/assets/69745008/d071621c-2723-4513-8567-913982e94749) Ran Stripe Collection: <img width="511" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/aaefe649-f782-47a9-9166-d6bec893c52c"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code
<think> PR Context: - Title: feat(connector): [Multisafepay] add error handling - Merged: 2023-11-02T07:35:55Z - Files changed: 11 files - Commits: 13 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ### Description - Resolves [#2636](https://github.com/juspay/hyperswitch-cloud/issues/2636) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Multisafepay] add error handling (#2595) Co-authored-by: Prasunna Soppa <70575890+ Files to modify: **crates/router/src/connector/multisafepay.rs** Modify existing code **crates/router/src/connector/multisafepay/transformers.rs** Add: - enum: pub::MultisafepayAuthResponse **Commit 2:** feat(connector): [Multisafepay] add error handling (#2595) Co-authored-by: Prasunna Soppa <70575890+ Files to modify: **crates/router/src/connector/multisafepay.rs** Modify existing code **crates/router/src/connector/multisafepay/transformers.rs** Add: - enum: pub::MultisafepayAuthResponse
{"issue_number": 2636, "pr_number": 2595, "commits_count": 2, "files_changed": 11, "response_length": 1403, "file_count": 7, "needs_breakdown": false}
feat(user_roles): support tenant_id reads For tenancy support tenant_id in user roles queries - Adding tenant id to reads, deletes and updates queries.
<think> PR Context: - Title: feat(users): add tenant id reads in user roles - Merged: 2024-11-29T10:54:00Z - Files changed: 9 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Support tenant id in user roles queries. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding cha </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): add tenant id reads in user roles (#6661) Co-authored-by: hyperswitch-bot[bot] <1485255 Files to modify: **crates/diesel_models/src/query/user_role.rs** Remove: - function: pub::find_by_user_id - function: pub::find_by_user_id_merchant_id - function: pub::list_by_user_id **crates/router/src/analytics.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/db/user_role.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"issue_number": 6660, "pr_number": 6661, "commits_count": 1, "files_changed": 9, "response_length": 1609, "file_count": 11, "needs_breakdown": false}
[FEATURE]: [BitPay] Currency Unit Conversion ### :memo: Feature Description - Each currency can be described in terms of base or minor units. - For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit. - In Hyperswitch, the amount value is expected to be always provided in minor units. - For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent) - Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them. - We have functions `to_currency_base_unit` and `to_currency_lower_unit` in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector. ### :hammer: Possible Implementation - ConnectorCommon trait have been implemented for the connector. - This trait contains `get_currency_unit` method. This method needs to be implemented. - It will define what type of conversion needs to be done during `connector_router_data` creation. Concurrently handle the creation of `connector_router_data` to be passed for the connector request body creation. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2196 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: feat(connector): [BitPay] Currency Unit Conversion - Merged: 2023-10-31T14:16:55Z - Files changed: 2 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [BitPay] Currency Unit Conversion (#2736) Files to modify: **crates/router/src/connector/bitpay.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/bitpay/transformers.rs** Add: - function: private::try_from - struct: pub::BitpayRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for BitpayRouterData<T> **Commit 2:** feat(connector): [BitPay] Currency Unit Conversion (#2736) Files to modify: **crates/router/src/connector/bitpay.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/bitpay/transformers.rs** Add: - function: private::try_from - struct: pub::BitpayRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for BitpayRouterData<T>
{"issue_number": 2220, "pr_number": 2736, "commits_count": 2, "files_changed": 2, "response_length": 1720, "file_count": 7, "needs_breakdown": false}
[FEATURE] replace manual implementation using `from_str` function of strum ### Feature Description In the `convert_connector` function the manual implementation of converting the connector from string can be replaced using the `from_str` function provided by `strum` ### Possible Implementation Use `from_str` function of strum ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? No, but I'm happy to collaborate on a PR with someone else
<think> PR Context: - Title: refactor: use `strum::EnumString` implementation for connector name conversions - Merged: 2023-05-19T13:10:14Z - Files changed: 5 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - fixes #1042 - added test cases for type conversions ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: use `strum::EnumString` implementation for connector name conversions (#1052) Co-authored- Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/storage/payment_attempt.rs** Modify existing code **crates/router/tests/connectors/noon.rs** Modify existing code **crates/router/tests/connectors/payeezy.rs** Modify existing code
{"issue_number": 1042, "pr_number": 1052, "commits_count": 1, "files_changed": 5, "response_length": 1265, "file_count": 7, "needs_breakdown": false}
docs: Adding Unified error codes to the API - Ref Adding Unified error codes to the API - Ref
<think> PR Context: - Title: docs(error_codes): add unified error codes - Merged: 2024-10-15T14:02:06Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [X] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Helps closing - #6318 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6318, "pr_number": 6319, "commits_count": 0, "files_changed": 1, "response_length": 772, "file_count": 0, "needs_breakdown": false}
Required fields absent in PML in case of Gift Card for OnSession (v2) In case of `Adyen` connector and `Givex` payment method subtype, required fields are absent in PML output when `setup_future_usage` is `OnSession` Need to move givex required fields to common in the required fields TOML
<think> PR Context: - Title: fix(config): Set common required fields for Givex (v2) - Merged: 2025-09-18T08:51:00Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Moved required fields for `givex` gift card for `Adyen` from `non-mandate` to `common` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application confi </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 9413, "pr_number": 9414, "commits_count": 0, "files_changed": 1, "response_length": 784, "file_count": 0, "needs_breakdown": false}
Updating logo in API ref
<think> PR Context: - Title: docs: Updating logo for Api ref - Merged: 2024-12-05T11:09:38Z - Files changed: 4 files - Commits: 24 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [X] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6742, "pr_number": 6741, "commits_count": 0, "files_changed": 4, "response_length": 762, "file_count": 0, "needs_breakdown": false}
[FEAT] [CONNECTOR: NORDEA] Implement SEPA Bank Debit ## Relevant Docs - [Access Authorization API](https://developer.nordeaopenbanking.com/documentation?api=Access%20Authorization%20API) (To get Access Token) - [Payments API SEPA Credit Transfer](https://developer.nordeaopenbanking.com/documentation?api=Payments%20API%20SEPA%20Credit%20Transfer) - [Payment Common API](https://developer.nordeaopenbanking.com/documentation?api=Payments%20Common%20API) (I assume this doc gets updated first often) - [Nordea developer FAQ](https://support.nordeaopenbanking.com/hc/en-us) ### Digest and Signature creation Docs - [Digest creation and calculation FAQ](https://support.nordeaopenbanking.com/hc/en-us/articles/7951756726044-Digest-creation-calculation-FAQ) - [eIDAS certificate](https://developer.nordeaopenbanking.com/documentation?api=Access%20Authorization%20API#authentication_with_eidas_certificate) - [Generation of Signature](https://developer.nordeaopenbanking.com/documentation?api=Access%20Authorization%20API#testing_eidas_signature) (postman JavaScript code) ## Testing - Nordea Playground (Try API Console): https://developer.nordeaopenbanking.com/console/ - [Personal API Postman collection v5](https://raw.githubusercontent.com/NordeaOB/swaggers/master/Nordea%20Open%20Banking%20v5%20Personal%20API.postman_collection.json) - [Personal API Postman collection v4](https://raw.githubusercontent.com/NordeaOB/swaggers/master/Nordea%20Open%20Banking%20v4%20Personal%20API%20Example%20FI%2CDK%2CNO%20and%20SE.postman_collection.json)
<think> PR Context: - Title: feat(core/connector): introduce authentication token flow and add sepa bankdebit for nordea - Merged: 2025-08-11T07:26:26Z - Files changed: 30 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Summary This PR introduces Nordea as a new payment connector with support for SEPA bank debit payments. It also implements a new **Authentication Token Flow** mechanism that enables two-step OAuth authentication, which is required by </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core/connector): introduce authentication token flow and add sepa bankdebit for nordea (#8133) Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_utils/src/lib.rs** Add: - function: pub::now_rfc7231_http_date **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nordea.rs** Remove: - function: private::get_auth_header Add: - function: pub::generate_digest_from_request - function: private::format_private_key - function: private::generate_signature - function: private::get_form_urlencoded_payload - function: private::build_request - function: private::get_http_method - function: private::get_http_method - function: private::build_request - function: private::build_request - function: private::build_request - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - function: private::authentication_token_for_token_creation - struct: private::SignatureParams - impl: impl api::ConnectorAuthenticationToken for Nordea - impl: impl api::PaymentsPreProcessing for Nordea - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Nordea - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Nordea - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Nordea - impl: impl ConnectorSpecifications for Nordea - mod: private::requests - mod: private::responses **crates/hyperswitch_connectors/src/connectors/nordea/requests.rs** Add: - struct: pub::NordeaRouterData - struct: pub::NordeaOAuthRequest - struct: pub::NordeaOAuthExchangeRequest - struct: pub::AccountNumber - struct: pub::CreditorAccountReference - struct: pub::NordeaAddress - struct: pub::CreditorBank - struct: pub::CreditorAccount - struct: pub::DebitorAccount - struct: pub::InstructedAmount - struct: pub::RecurringInformation - struct: pub::ThirdPartyMessages - struct: pub::NordeaPaymentsRequest - struct: pub::NordeaPaymentsConfirmRequest - enum: pub::GrantType - enum: pub::AccessScope - enum: pub::AccountType - enum: pub::RecurrenceType - enum: pub::FundsAvailabilityRequest - enum: pub::PaymentsUrgency - enum: pub::TppCategory - enum: pub::TppCode - enum: pub::NordeaAuthenticationMethod - enum: pub::NordeaConfirmLanguage **crates/hyperswitch_connectors/src/connectors/nordea/responses.rs** Add: - struct: pub::NordeaOAuthExchangeResponse - struct: pub::NordeaGroupHeader - struct: pub::NordeaResponseLinks - struct: pub::TransactionFee - struct: pub::BankFee - struct: pub::ExchangeRate - struct: pub::MessagePagination - struct: pub::NordeaPaymentsInitiateResponseData - struct: pub::NordeaPaymentsInitiateResponse - struct: pub::NordeaPaymentsConfirmErrorObject - struct: pub::NordeaPaymentsResponseWrapper - struct: pub::NordeaPaymentsConfirmResponse - struct: pub::NordeaOriginalRequest - struct: pub::NordeaFailures - struct: pub::NordeaErrorBody - struct: pub::NordeaErrorResponse - enum: pub::NordeaPaymentStatus - enum: pub::FeesType - enum: pub::ChargeBearer **crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs** Remove: - function: private::try_from - struct: pub::NordeaRouterData - struct: pub::NordeaPaymentsRequest - struct: pub::NordeaCard - impl: impl TryFrom<&NordeaRouterData<&PaymentsAuthorizeRouterData>> for NordeaPaymentsRequest **crates/hyperswitch_connectors/src/default_implementations.rs** Add: - impl: impl ConnectorAuthenticationToken for connectors::DummyConnector<T> - impl: impl ConnectorIntegration< AccessTokenAuthentication, AccessTokenAuthenticationRequestData, AccessTokenAuthenticationResponse, > for connectors::DummyConnector<T> **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_ip_address **crates/hyperswitch_domain_models/src/router_data.rs** Add: - struct: pub::AccessTokenAuthenticationResponse **crates/hyperswitch_domain_models/src/router_data_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::AuthenticationTokenFlowData **crates/hyperswitch_domain_models/src/router_flow_types/access_token_auth.rs** Add: - struct: pub::AccessTokenAuthentication **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::AccessTokenAuthenticationRequestData - impl: impl TryFrom<router_data::ConnectorAuthType> for AccessTokenAuthenticationRequestData - impl: impl TryFrom<( router_data::ConnectorAuthType, Option<AccessTokenAuthenticationResponse>, )> for AccessTokenRequestData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - trait: pub::ConnectorAuthenticationTokenV2 **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::authentication_token_for_token_creation **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Add: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for AuthenticationTokenFlowData **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/access_token.rs** Add: - function: pub::execute_authentication_token **crates/router/src/core/payments/flows/approve_flow.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/cancel_flow.rs** Modify existing code **crates/router/src/core/payments/flows/cancel_post_capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/complete_authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/incremental_authorization_flow.rs** Modify existing code **crates/router/src/core/payments/flows/post_session_tokens_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/reject_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_update_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/payments/flows/update_metadata_flow.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/refunds_v2.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/types.rs** Remove: - function: private::foreign_try_from - impl: impl ForeignTryFrom<ConnectorAuthType> for AccessTokenRequestData **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 8134, "pr_number": 8133, "commits_count": 1, "files_changed": 30, "response_length": 9320, "file_count": 51, "needs_breakdown": true}
feat(router): Make `payment_method_subtype` optional We can have situations where we don't know the `payment_method_subtype`. e.g. Frontend doesn't know whether a `card` is `credit` or `debit`. To support such scenarios we need to make `payment_method_subtype` nullable
<think> PR Context: - Title: feat(router): Make payment_method_subtype optional in payment_attempt [V2] - Merged: 2025-03-24T07:53:07Z - Files changed: 16 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Added diesel migration to make `payment_method_subtype` Nullable in `payment_attempt` table - Made `payment_method_subtype` an `Option` in request and response structs ### Additional Changes - [x] This PR modifies the API contract - </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): Make payment_method_subtype optional in payment_attempt [V2] (#7568) Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/revenue_recovery.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types/api/payment_methods.rs** Modify existing code
{"issue_number": 7567, "pr_number": 7568, "commits_count": 1, "files_changed": 16, "response_length": 1885, "file_count": 15, "needs_breakdown": false}
fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and add error code mapping '800.100.203' ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - fix deserialization error for incoming webhook response for trustpay made `Code` as optional field - add error code mapping '800.100.203' ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> No testing can be done since it matches error code in production which cant be replicated ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and add error code mapping '800.100.203' - Merged: 2024-03-27T09:09:21Z - Files changed: 2 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - fix deserialization error for incoming webhook response for trustpay made `Code` as optional field - add error code mapping '800.100.203' PR raised against main - #4199 ### Additional Changes - [ ] This PR modifies the API con </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and Files to modify: **crates/router/src/connector/trustpay.rs** Modify existing code **crates/router/src/connector/trustpay/transformers.rs** Modify existing code
{"issue_number": 4199, "pr_number": 4225, "commits_count": 1, "files_changed": 2, "response_length": 1136, "file_count": 4, "needs_breakdown": false}
refactor(customers_v2): address panics and some bugs in customers v2 endpoints ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR addresses panics and some bugs in customers v2 endpoints. This PR includes the following changes: - Fixes the customers v2 update and retrieve endpoints to use the correct HTTP methods (`PUT` and `GET` respectively). - Adds the `#[serde(deny_unknown_fields)]` to customer v2 request types. - Moves the `id` field to be at the beginning of the `CustomerResponse` and `CustomerDeleteResponse` structs, so that the JSON serialization also follows the same. - Introduces the `GlobalCustomerId` type and updates existing customer v2 (and other v2 modules like payment methods, payments, mandates) to use the `GlobalCustomerId` type instead of strings. - Removes some of the wrappers around the customer ID types (`CustomerId`, `GlobalId` and `UpdateCustomerId` defined in the `api_models` crate), and implements the methods / traits on the underlying ID types instead. - This was done since the underlying ID types and thus the field names differed, and it didn't make much difference as compared to implementing the methods / traits directly on the underlying ID type. - Removes the `customer_id` / `id` field from `CustomerUpdateRequest` type in both v1 and v2. This field was never expected to be passed in the request body, but only there for the purpose of API events. This PR introduces a `CustomerUpdateRequestInternal` type instead which wraps around the request and the ID type, and is used internally, not part of the public API interface. - Adds missing pieces of code to have the customers v2 create, retrieve, update, delete, list endpoints working. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> - Moves the `id` field to be at the beginning of the `CustomerResponse` and `CustomerDeleteResponse` structs. - Updates the `customer_id` field in the payment methods and payments v2 API types to use `GlobalCustomerId` instead of `CustomerId`. - Removes the `customer_id` / `id` field from `CustomerUpdateRequest` type in both v1 and v2. - A few OpenAPI spec related fixes. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> The changes included in this PR help ensure that the customers v2 endpoints run without causing panics. This should also help unblock other tasks that depend on the customers v2 endpoints. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - Create customer v2: ```shell curl --location 'http://localhost:8080/v2/customers' \ --header 'x-profile-id: pro_E6JIGLUJ0YUOCeyhbczu' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_fun38x9Yy3LoxGzdu0YK6KwO06xJT9aGfnm52FW6EL8hwNBKSXC3iilT8nDCEfOB' \ --data-raw '{ "merchant_reference_id": "customer_1734263771", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65", "description": "First customer", "default_billing_address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "default_shipping_address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Retrieve customer v2: ```shell curl --location 'http://localhost:8080/v2/customers/12345_cus_0193ca2bc9e170e282ca121616ebec7a' \ --header 'x-profile-id: pro_E6JIGLUJ0YUOCeyhbczu' \ --header 'api-key: dev_fun38x9Yy3LoxGzdu0YK6KwO06xJT9aGfnm52FW6EL8hwNBKSXC3iilT8nDCEfOB' ``` - Update customer v2: ```shell curl --location --request PUT 'http://localhost:8080/v2/customers/12345_cus_0193ca2bc9e170e282ca121616ebec7a' \ --header 'x-profile-id: pro_E6JIGLUJ0YUOCeyhbczu' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_fun38x9Yy3LoxGzdu0YK6KwO06xJT9aGfnm52FW6EL8hwNBKSXC3iilT8nDCEfOB' \ --data-raw '{ "merchant_reference_id": "customer_1734263927", "name": "Jane Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65", "description": "Second customer", "default_billing_address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "default_shipping_address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Delete customer v2: ```shell curl --location --request DELETE 'http://localhost:8080/v2/customers/12345_cus_0193ca2bc9e170e282ca121616ebec7a' \ --header 'x-profile-id: pro_E6JIGLUJ0YUOCeyhbczu' \ --header 'api-key: dev_fun38x9Yy3LoxGzdu0YK6KwO06xJT9aGfnm52FW6EL8hwNBKSXC3iilT8nDCEfOB' ``` - Customer list v2: ```shell curl --location 'http://localhost:8080/v2/customers/list' \ --header 'x-profile-id: pro_E6JIGLUJ0YUOCeyhbczu' \ --header 'api-key: dev_fun38x9Yy3LoxGzdu0YK6KwO06xJT9aGfnm52FW6EL8hwNBKSXC3iilT8nDCEfOB' ``` ### Known Bugs / Issues 1. The `default_billing_address` and `default_shipping_address` fields seem to be correctly encrypted and populated in the database, but not in the response (during customer create, update and retrieve). This is due to the way in which encryption is being handled in our code. 2. The `merchant_reference_id` is accepted in the customers update request, but it is not being accessed anywhere in the customers update flow. Moreover, the behavior once this is fixed should be such that it allows updating the reference ID from a null value to a non-null value, but does not allow updating the reference ID once set. 3. Customer delete v2 may not have redacted address completely, because of encryption issues (slightly related to 1). I'll be addressing these bugs in a separate PR, since 1 and 3 may need changes to the `ToEncryption` macro. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: refactor(customers_v2): include minor fixes for customer v2 flows - Merged: 2024-12-20T08:30:05Z - Files changed: 5 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR includes minor fixes suggested in my previous PR #6836. This PR includes the following changes: - Import `CustomerUpdateRequestInternal` instead of fully qualifying it. - Renames the `fetch_domain_model_and_update_and_generate_de </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(customers_v2): include minor fixes for customer v2 flows (#6876) Files to modify: **crates/api_models/src/events/customer.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"issue_number": 6836, "pr_number": 6876, "commits_count": 1, "files_changed": 5, "response_length": 1160, "file_count": 6, "needs_breakdown": false}
feat(connector): Add recovery support for stripebilling ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Context: In case of some billing connectors we dont get the enough data in the webhook itself to support creation of payment intent and payment attempt in our system. So previously we derived a flow named "AdditionalRevenuerecoveryDetails" in this PR:#7402 which name is now changed to "BillingConnectorPaymentSync". This flow is used to fetch payment details of the invoices from the billing connectors using an API call to that billing connector. In this pr we are calling the flow and getting the details which are needed to create payment intent and attempt in our system. 1. Creates a connector integration in stripe billing that supports the API call. 2. Call the flow in recovery_incoming.rs file and using that details further we are creating the payment intent and attempt and verifying them. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 3. `crates/router/src/configs` 4. `loadtest/config` --> ## Motivation and Context ## Testing 1. Go to stripe create a new webhook endpoint with a dummy url to get webhook secret key. 2. create a payment processor stripe ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_mQRYaJduFokPeZ54W6bN' \ --header 'x-profile-id: pro_me6dnNKlhwuq32xhfjCA' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "api-key }, "payment_methods_enabled": [ { "payment_method_type": "card_redirect", "payment_method_subtypes": [ { "payment_method_subtype": "card_redirect", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "wallet", "payment_method_subtypes": [ { "payment_method_subtype": "google_pay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "apple_pay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "we_chat_pay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "ali_pay", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "paypal", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "mb_way", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "pay_later", "payment_method_subtypes": [ { "payment_method_subtype": "klarna", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "affirm", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "afterpay_clearpay", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "walley", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_redirect", "payment_method_subtypes": [ { "payment_method_subtype": "giropay", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "ideal", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "eps", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bancontact_card", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "przelewy24", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sofort", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "blik", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "trustly", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "online_banking_finland", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "online_banking_poland", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_transfer", "payment_method_subtypes": [ { "payment_method_subtype": "ach", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sepa", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bacs", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method_type": "bank_debit", "payment_method_subtypes": [ { "payment_method_subtype": "ach", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "sepa", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "bacs", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "becs", "payment_experience": null, "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "pro_me6dnNKlhwuq32xhfjCA" }' ``` change the profile id and other feilds while creating you own one 3. copy the mca id of stripe and paste it in the billing mca curl in feature metadata ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_mQRYaJduFokPeZ54W6bN' \ --header 'x-profile-id: pro_me6dnNKlhwuq32xhfjCA' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "billing_processor", "connector_name": "stripebilling", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{your api key}" }, "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "frm_configs": null, "feature_metadata" : { "revenue_recovery":{ "max_retry_count" : 16, "billing_connector_retry_threshold": 2, "billing_account_reference": { "{your stripe mca id here}": "stripebilling" } } }, "connector_webhook_details": { "merchant_secret": "{webhook secret you have copied here}" }, "profile_id": "pro_me6dnNKlhwuq32xhfjCA" }' ``` 4. copy the mca id, profile id and merchant id to construct the endpoint of the webhook. 5. install ngrok and run the service it will give you a https url for your local host port. 6. copy the https url of ngrok 7. construct the webhook endpoint : url/v2/webhooks/merchant_id/profile_id/billing_mca_id 8. paste this endpoint in the place of dummy url you have used to create endpoint in stripe dashboard 9. now create a test subscription use this card "4000 0000 0000 0341" while creating a test subscription and the billing day should start from the next day. If you are creating a test subscription today billing date should start from tommorow. 10. now move the clock past one month. 11. no observe the payment intent table and payment attempt table in db and verify those details with ones we are getting. Images of the logs: <img width="1728" alt="Screenshot 2025-03-11 at 5 52 53 PM" src="https://github.com/user-attachments/assets/0a97b656-2417-4812-b9cd-a808183411ea" /> <img width="1728" alt="Screenshot 2025-03-11 at 5 53 10 PM" src="https://github.com/user-attachments/assets/5a9872f1-45a3-4bf5-978c-6e477df36c9f" /> <img width="1728" alt="Screenshot 2025-03-11 at 5 53 21 PM" src="https://github.com/user-attachments/assets/5cbac559-09d8-4939-b2a6-04bc8f50a1bc" /> <img width="1728" alt="Screenshot 2025-03-11 at 5 54 32 PM" src="https://github.com/user-attachments/assets/3eb3fb41-afd4-4a05-8c8b-715310a79d7d" /> <img width="1710" alt="Screenshot 2025-03-10 at 4 52 08 PM" src="https://github.com/user-attachments/assets/05477fdc-656b-42cd-ba27-880d5748cc19" /> <img width="1190" alt="Screenshot 2025-03-10 at 4 52 20 PM" src="https://github.com/user-attachments/assets/d9900f24-2b8f-45c5-b6c5-bd5dcd62357d" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transaction monitoring support - Merged: 2025-05-06T07:36:19Z - Files changed: 1 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Consuming the following fields in the webhook which will support the transaction monitoring feature further. In stripebilling the subscribed webhook contains an object of that particular invoice. The details needed in the issue are available in the invoice object. Consume Billing add </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transa Files to modify: **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Add: - function: private::from - function: private::from - struct: pub::StripebillingWebhookLinesObject - struct: pub::StripebillingWebhookLinesData - struct: pub::StripebillingWebhookLineDataPeriod - struct: pub::StripebillingInvoiceBillingAddress - impl: impl From<StripebillingInvoiceBillingAddress> for api_models::payments::AddressDetails
{"issue_number": 7461, "pr_number": 7722, "commits_count": 1, "files_changed": 1, "response_length": 1430, "file_count": 3, "needs_breakdown": false}
feat: add groups for get_role_from_token api
<think> PR Context: - Title: feat(roles): Add groups for `get_from_token` api - Merged: 2024-02-29T10:23:28Z - Files changed: 4 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Get role from token will respond with groups if asked. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(roles): Add groups for `get_from_token` api (#3872) Files to modify: **crates/api_models/src/events/user_role.rs** Modify existing code **crates/api_models/src/user_role/role.rs** Add: - enum: pub::GetRoleFromTokenResponse **crates/router/src/core/user_role/role.rs** Add: - function: pub::get_role_from_token_with_permissions **crates/router/src/routes/user_role.rs** Modify existing code
{"issue_number": 3871, "pr_number": 3872, "commits_count": 1, "files_changed": 4, "response_length": 1196, "file_count": 6, "needs_breakdown": false}
[REFACTOR]: [Tsys] Remove Default Case Handling ### :memo: Feature Description - We utilize match statements to make pivotal decisions, such as generating requests based on the payment method type and managing responses received from the connector. - These conditions generally go hand in hand with enum variants. - Default case is used because a match statement needs to be exhaustive i.e. every variant needs to be covered. - So, if all the explicit cases are handled then default is used to handle the rest. - Each connector have these match statements but many of them don’t provide reference to each variant in their default case, rather a `_` is put to handle all the other cases. - This approach carries a risk because developers may inadvertently overlook the need for explicit handling of the new cases. ### :hammer: Possible Implementation - Instead of relying on a default match case `_`, developers should handle each and every variant explicitly. - By doing so, if there are any changes in the future, they can readily assess the impact of their modifications simply by compiling the code. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/1955 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(router): tsys default case handling - Merged: 2023-10-25T18:25:59Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- https://github.com/juspay/hyperswitch/issues/2288 --> Resolves: #2288 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(router): tsys default case handling (#2672) Files to modify: **crates/router/src/connector/tsys/transformers.rs** Modify existing code
{"issue_number": 2288, "pr_number": 2672, "commits_count": 1, "files_changed": 1, "response_length": 924, "file_count": 3, "needs_breakdown": false}
[FEATURE] Add x-mcp extension to OpenAPI schema Mintlify supports extracting API endpoints from openAPI json into MCP servers: https://mintlify.com/docs/mcp We need to add: ```json "x-mcp": { "enabled": true }, ``` at the top level of our OpenAPI schema to enable this functionality
<think> PR Context: - Title: feat(openapi): Add x-mcp extension to v1 spec - Merged: 2025-06-27T08:52:30Z - Files changed: 4 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Modified `openapi/src/main.rs` to append `x-mcp` extension to v1 OpenAPI schema ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(openapi): Add x-mcp extension to v1 spec (#8443) Co-authored-by: GORAKHNATH YADAV <gorakhcodes@ Files to modify: **crates/openapi/src/main.rs** Modify existing code
{"issue_number": 8442, "pr_number": 8443, "commits_count": 1, "files_changed": 4, "response_length": 951, "file_count": 3, "needs_breakdown": false}
remove mandates from nmi collection and fix assertions in paypal remove mandates from nmi collection and fix assertions in paypal
<think> PR Context: - Title: ci(postman): fix nmi and paypal collection - Merged: 2024-03-21T08:14:43Z - Files changed: 30 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> touched 2 collections namely, NMI and PayPal: - fixed assertion in PayPal which broke due to [this](https://github.com/juspay/hyperswitch/commit/fc81f90f6168dc6e08cbfacdda0f59e99def07da) commit - removed mandate collection from NMI as it </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 4127, "pr_number": 4129, "commits_count": 0, "files_changed": 30, "response_length": 773, "file_count": 0, "needs_breakdown": false}
[FEATURE] add support for filtering in `payments_session` ### Feature Description After supporting multiple connector accounts through `business_label` , `business_country` and `business_sub_label`, PaymentsSession flow ( creating session tokens - wallets ) should filter based on this. ### Possible Implementation Add a similar filter which is in `list_payment_methods` ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: refactor(session_token): add support for business filtering in payments session - Merged: 2023-05-11T15:34:49Z - Files changed: 13 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Refactoring ## Description <!-- Describe your changes in detail --> - This PR refactors the get connector function of `PaymentsSession` operation to use idiomatic rust. - Add business country and business label filtering. <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(session_token): add support for business filtering in payments session (#1128) Files to modify: **crates/router/src/core/payment_methods/cards.rs** Remove: - function: private::filter_mca_based_on_business_details **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Add: - function: pub::filter_mca_based_on_business_details **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_method_validate.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code
{"issue_number": 1091, "pr_number": 1128, "commits_count": 1, "files_changed": 13, "response_length": 2086, "file_count": 15, "needs_breakdown": false}
fix: populate merchant connector id and profile id in payments list Currently in payments list response, merchant connector id and profile id is not getting populated for payments list response, though the value is present in db.
<think> PR Context: - Title: fix(payments): populate merchant connector id and profile id in list - Merged: 2024-03-18T06:57:12Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description `Profile_id` and `merchant_connector_id` is to be populated for payments list response. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Pro </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments): populate merchant connector id and profile id in list (#4104) Files to modify: **crates/router/src/core/payments/transformers.rs** Modify existing code
{"issue_number": 4103, "pr_number": 4104, "commits_count": 1, "files_changed": 1, "response_length": 971, "file_count": 3, "needs_breakdown": false}
refactor(drainer, router): KMS decrypt database password when `kms` feature is enabled ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR enables the use of KMS encrypted database passwords for the `router` and `drainer` crates when the `kms` feature is enabled. ### Additional Changes - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables I prefer being explicit that a variable expects a KMS-encryted value, so I use `kms_encrypted_password` and KMS decrypt it to obtain the password when the `kms` feature is enabled, and use the `password` config value directly whenever the `kms` feature is disabled. Let me know if it would be preferable to use the `password` config value in both scenarios. When `kms` feature is enabled, the `ROUTER__MASTER_DATABASE__PASSWORD`, `ROUTER__REPLICA_DATABASE__PASSWORD` and `DRAINER__MASTER_DATABASE__PASSWORD` environment variables should now be replaced with `ROUTER__MASTER_DATABASE__KMS_ENCRYPTED_PASSWORD`, `ROUTER__REPLICA_DATABASE__KMS_ENCRYPTED_PASSWORD` and `DRAINER__MASTER_DATABASE__KMS_ENCRYPTED_PASSWORD` instead, while ensuring that their values are replaced with their KMS encrypted equivalents. KMS encrypted database passwords can be obtained like so: ```shell $ echo -n 'MyVerySecretDatabasePassword' | base64 # Use the obtained ciphertext as the value for the config variable $ aws kms encrypt --output json --key-id my-aws-key-id --plaintext <BASE64_ENCODED_DATABASE_PASSWORD> ``` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> This should add another layer of security for the database passwords. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Manually. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor: extract kms module to `external_services` crate - Merged: 2023-03-24T09:12:47Z - Files changed: 15 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR extracts the `kms` module in the `router` crate to a new crate `external_services`. (Name suggestions for the new crate are welcome.) ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: extract kms module to `external_services` crate (#793) Files to modify: **crates/drainer/src/env.rs** Modify existing code **crates/external_services/src/lib.rs** Add: - mod: pub::kms - mod: pub::consts - mod: pub::metrics **crates/router/src/configs/settings.rs** Remove: - struct: pub::Kms **crates/router/src/configs/validations.rs** Remove: - function: pub::validate - impl: impl super::settings::Kms **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/env.rs** Modify existing code **crates/router/src/services.rs** Remove: - mod: pub::kms **crates/router_env/tests/env.rs** Modify existing code
{"issue_number": 733, "pr_number": 793, "commits_count": 1, "files_changed": 15, "response_length": 1641, "file_count": 12, "needs_breakdown": false}
[FEATURE] : Add `WASM` support for `endpoint_prefix` in dashboard ### Feature Description Add WASM configs for dashboard to take `endpoint_prefix` as input for Adyen Connector Create. ### Possible Implementation Add WASM configs for dashboard to take `endpoint_prefix` as input for Adyen Connector Create. ### Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes, I am willing to submit a PR!
<think> PR Context: - Title: fix(wasm): [Adyen] update connector account configs and integration bugs - Merged: 2024-03-01T12:34:05Z - Files changed: 10 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Update Connector Account configs for WASM build - Update Postman Collection test case for Cancelled payments - Make `endpoint_prefix` as Optional in MCA-create - Change `connector_refund_id` to `psp_reference` - Add support to enforce 3D </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(wasm): [Adyen] update connector account configs and integration bugs (#3910) Files to modify: **crates/connector_configs/src/common_config.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/connector_configs/src/response_modifier.rs** Modify existing code **crates/connector_configs/src/transformer.rs** Modify existing code **crates/diesel_models/src/enums.rs** Modify existing code **crates/router/src/connector/adyen.rs** Remove: - function: private::build_request **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"issue_number": 3911, "pr_number": 3910, "commits_count": 1, "files_changed": 10, "response_length": 1429, "file_count": 9, "needs_breakdown": false}
[FEATURE]: [Authorizedotnet] Use `connector_response_reference_id` as reference to merchant ### :memo: Feature Description - Reference id are used to map transactions in the connector’s dashboard. - Hyperswitch manages several reference ids, such as `payment_id`, `attempt_id`, and `connector_transaction_id` for a single transaction. - However, merchants may encounter uncertainty when determining which ID to utilize in the connector dashboard to identify the payment. ### :hammer: Possible Implementation - When we receive a response from the connector for the payment, we deserialize it and populate the `response` field in RouterData. - For the `TransactionResponse` type, we must fill the `connector_response_reference_id` with a corresponding reference id for the merchant to identify the transaction. - One might need to have exposure to api docs of the connector for which it is being implemented to decide what to fill in connector_response_reference_id. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/1735 🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: feat(connector): [Authorizedotnet] use connector_response_reference_id as reference to merchant - Merged: 2023-10-11T11:04:07Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Implement `connector_response_reference_id` as reference for Authorizedotnet ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/env </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Authorizedotnet] use connector_response_reference_id as reference to merchant (#24 Files to modify: **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code
{"issue_number": 2323, "pr_number": 2497, "commits_count": 1, "files_changed": 1, "response_length": 1034, "file_count": 3, "needs_breakdown": false}
fix(router_env): fix opentelemetry traces for router_env ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> - Add back the git specific dependencies for opentelemetry - Add telemetry_subscriber - update the instrument imports - There has been some vocabulary changes in tracing as well which has introduced high coupling & hence most of the tracing packages now point to the git commit - We are still running changes not included in 0.18 & will need to wait for the 0.19 release... There's some nomenclature change by tracing [here](https://github.com/tokio-rs/tracing/pull/1015) ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> Tempo based tracing was disabled in a previous refactor PR This involved a bit more changes here with the tracing_subscriber & core libraries... ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Running it on the local docker setup ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: fix: fixing tempo & histogram without using custom dependencies - Merged: 2023-01-06T08:07:49Z - Files changed: 5 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature - [x] Enhancement ## Description INFO: Raising with with base set to `fix_traces`, while merging please change the base to `main` This is an extension to the PR #201 This removes some of the custom dependencies with `tracing` and `opentelemetry` <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application confi </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 201, "pr_number": 302, "commits_count": 0, "files_changed": 5, "response_length": 793, "file_count": 0, "needs_breakdown": false}
[REFACTOR] Refactor process tracker (scheduler) code to increase code reusability and improve logging ### Description 1. The process tracker (scheduler) code includes some amount of repetitive code, which can be extracted out to functions with suitable parameters to accommodate all usages. One such instance is the construction of the `ProcessTrackerNew` type, which is being done manually in multiple places, one of which is: https://github.com/juspay/hyperswitch/blob/fff780218ac356bb9b599896e766dd45266ac34a/crates/router/src/core/payment_methods/vault.rs#L1013-L1027 There exists the `ProcessTrackerExt::make_process_tracker_new()` method which can be used for the purpose, with suitable modifications. https://github.com/juspay/hyperswitch/blob/fff780218ac356bb9b599896e766dd45266ac34a/crates/scheduler/src/db/process_tracker.rs#L276-L303 2. The methods from the `ProcessTrackerExt` trait can be moved as methods on `diesel_models::ProcessTracker` and `diesel_models::ProcessTrackerNew` types, and the remaining ones (`reset()`, `retry()` and `finish_with_status()`) can be moved to the `ProcessTrackerInterface` trait. 3. The `business_status` column in the `process_tracker` database table contains high cardinality data due to the business status containing the process tracker ID itself, making it difficult for filtering based on business status. This can be improved by removing the process tracker ID from the business status, thus restricting the number of possible values for the column to a reasonably fixed number and reducing cardinality. (Attaching a screenshot of `business_status` column from a testing environment as of now.) ![Screenshot of business status column in process tracker table](https://github.com/juspay/hyperswitch/assets/22217505/c87d0e93-f5f0-42f1-9686-58092d98a87f) 4. The logging setup within the scheduler can be improved to better indicate about errors occurring when things fail within the scheduler.
<think> PR Context: - Title: refactor(scheduler): improve code reusability and consumer logs - Merged: 2024-02-21T12:37:03Z - Files changed: 17 files - Commits: 16 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR contains changes to address the problems listed in #3711, namely: 1. Updates `ProcessTrackerExt::make_process_tracker_new()` method to accept a `tag` parameter in order to increase reusability. 2. Moves the `PTRunner` enum to the ` </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(scheduler): improve code reusability and consumer logs (#3712) Files to modify: **crates/diesel_models/src/process_tracker.rs** Add: - function: pub::is_valid_business_status - function: pub::new - function: private::test_enum_to_string - enum: pub::ProcessTrackerRunner - impl: impl ProcessTracker - impl: impl ProcessTrackerNew - mod: private::tests **crates/redis_interface/src/commands.rs** Modify existing code **crates/router/src/bin/scheduler.rs** Remove: - function: private::test_enum_to_string - enum: pub::PTRunner - mod: private::workflow_tests **crates/router/src/configs/validations.rs** Modify existing code **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Remove: - function: private::update_process_tracker Add: - function: private::reset_process - function: private::retry_process - function: private::finish_process_with_business_status **crates/router/src/types/storage.rs** Modify existing code **crates/router/src/workflows/api_key_expiry.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/scheduler/src/consumer.rs** Modify existing code **crates/scheduler/src/consumer/workflows.rs** Modify existing code **crates/scheduler/src/db/process_tracker.rs** Remove: - function: private::process_tracker_update_process_status_by_ids - function: private::is_valid_business_status - function: private::make_process_tracker_new - function: private::reset - trait: pub::ProcessTrackerExt Add: - function: private::reset_process - function: private::retry_process **crates/scheduler/src/utils.rs** Modify existing code
{"issue_number": 3711, "pr_number": 3712, "commits_count": 1, "files_changed": 17, "response_length": 2841, "file_count": 19, "needs_breakdown": true}
[FEATURE] Use empty enums instead of unit structs for PII masking strategies ### Feature Description Currently, we make use of unit structs that implement the `masking::Strategy<T>` trait to represent PII masking strategies. We would like to replace these with empty enums instead (So `struct MyStrategy;` becomes `enum MyStrategy {}`). The difference between the two is that you can still construct a value out of a unit struct, but you can never construct a value out of an empty enum (since it has no variants to construct). However, you can still use empty enums as type parameters to generic constructs like the `masking::Secret<Data, Strategy>` type. The argument against this is that we wouldn't be able to construct a `dyn masking::Strategy<T>`, but ideally, owing to the current implementation of PII masking in Hyperswitch, we should never have the need to obtain a `dyn masking::Strategy<T>` trait object. ### Possible Implementation For all unit structs that implement `masking::Strategy<T>`, convert them to unit enums. ### Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? No, but I'm happy to collaborate on a PR with someone else
<think> PR Context: - Title: refactor(masking): use empty enums as masking:Strategy<T> types - Merged: 2023-11-28T08:12:44Z - Files changed: 4 files - Commits: 2 commits Implementation approach: as per #1973 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Use empty enums as strategy type parameter, instead of unit structs, to prevent instantiation. ### Additional Changes no ## Motivation and Context #1973 ## How did you test it? `cargo clippy --all-features` Assuming existing tests should catch s </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(masking): use empty enums as masking:Strategy<T> types (#2874) Files to modify: **crates/cards/src/validate.rs** Remove: - struct: pub::CardNumberStrategy Add: - enum: pub::CardNumberStrategy **crates/common_utils/src/pii.rs** Remove: - struct: pub::PhoneNumberStrategy - struct: pub::EncryptionStratergy - struct: pub::ClientSecret - struct: pub::EmailStrategy - struct: pub::IpAddress - struct: pub::UpiVpaMaskingStrategy Add: - enum: pub::PhoneNumberStrategy - enum: pub::EncryptionStratergy - enum: pub::ClientSecret - enum: pub::EmailStrategy - enum: pub::IpAddress - enum: pub::UpiVpaMaskingStrategy **crates/masking/src/secret.rs** Modify existing code **crates/masking/src/strategy.rs** Remove: - struct: pub::WithType - struct: pub::WithoutType Add: - enum: pub::WithType - enum: pub::WithoutType
{"issue_number": 1973, "pr_number": 2874, "commits_count": 1, "files_changed": 4, "response_length": 1701, "file_count": 6, "needs_breakdown": false}
fix(router): change the retrieve's payload to query ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description Change the deserialisation method from Json to Query in the payments retrieve function <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes --> ## Motivation and Context Based on the requirements for the payments retrieve API to accept parameters instead of fields in the body <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Tested the endpoint by sending proper query parameters & by sending no query params <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: fix(core): fix merchant connector account create for v2 - Merged: 2024-08-28T07:56:03Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description fix merchant connector account create for v2 , by handling the case where defaull fallback is null ,while updating the it ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configurati </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(core): fix merchant connector account create for v2 (#5716) Files to modify: **crates/router/src/core/admin.rs** Modify existing code
{"issue_number": 2, "pr_number": 5716, "commits_count": 1, "files_changed": 1, "response_length": 931, "file_count": 3, "needs_breakdown": false}
doc: add `React demo` app link ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description Add new quick start option for trying out hyperswitch, with `React Demo App` <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: docs: fix quick start guide and update dashboard link - Merged: 2023-01-22T18:46:24Z - Files changed: 5 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Refactoring ## Description <!-- Describe your changes in detail --> - Make the option to three ( it was not updated in this PR #452 ) - Replace the dashboard link from https://dashboard-hyperswitch.netlify.app/ to https://app.hyperswitch.io/ ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** docs: fix quick start guide and update dashboard link (#454) Files to modify: **crates/router/src/openapi.rs** Modify existing code
{"issue_number": 452, "pr_number": 454, "commits_count": 1, "files_changed": 5, "response_length": 921, "file_count": 3, "needs_breakdown": false}
feat: get new filters for payments Currently, /filter api for payments takes times to get list of all available filters, moreover it is dependent on time range. Need to extract all the available filters in less time, and these filters should not be dependent on time range.
<think> PR Context: - Title: feat(payments): get new filters for payments list - Merged: 2024-04-16T10:15:37Z - Files changed: 10 files - Commits: 14 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description The api is used to get all the available filters that can be applied on payments list. This is filter_v2 api that performs better than the previous payments api and it is not dependent on any time range value. Filters will remain static and won't change as per time range. Though this </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payments): get new filters for payments list (#4174) Co-authored-by: hyperswitch-bot[bot] <1485 Files to modify: **crates/api_models/src/admin.rs** Add: - struct: pub::MerchantConnectorInfo **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for PaymentListFiltersV2 **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentListFiltersV2 **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: pub::get_payment_filters **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::get_payment_filters **crates/router/src/types/api/payments.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 4173, "pr_number": 4174, "commits_count": 1, "files_changed": 10, "response_length": 1725, "file_count": 12, "needs_breakdown": false}
feat(users): Send welcome to community email in magic link signup Send [this](https://www.figma.com/design/lhmTvW2vuc2p5B4ZvsEOTw/Email-Tempalte-Design?node-id=0-1&t=OKWmXqVOsidKUk7y-1) email when user signs up with magic link.
<think> PR Context: - Title: feat(users): Send welcome to community email in magic link signup - Merged: 2024-11-26T09:10:41Z - Files changed: 4 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Magic link will send one more email along with magic link email if user is signing up. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configu </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): Send welcome to community email in magic link signup (#6639) Co-authored-by: hyperswitc Files to modify: **crates/router/src/consts/user.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/services/email/types.rs** Add: - function: private::get_email_data - struct: private::WelcomeToCommunity - impl: impl EmailData for WelcomeToCommunity
{"issue_number": 6638, "pr_number": 6639, "commits_count": 1, "files_changed": 4, "response_length": 1222, "file_count": 5, "needs_breakdown": false}
Removing mailhog container from the docker setup Removing mailhog container from the docker setup
<think> PR Context: - Title: fix: fixes the docker setup to clean up the scarf data - Merged: 2025-05-12T16:21:53Z - Files changed: 6 files - Commits: 12 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [X] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Corrected the docker setup, for demo app, control-center, and removed mailhog. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/e </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7962, "pr_number": 7963, "commits_count": 0, "files_changed": 6, "response_length": 785, "file_count": 0, "needs_breakdown": false}
[FEATURE] add tests for stripe connector ### Feature Description As part of adding unit tests to existing connectors we are adding test for stripe ### Possible Implementation add a test file for stripe connector in the crates/router/tests folder ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: test(stripe): add unit tests for stripe connector - Merged: 2023-01-30T09:59:28Z - Files changed: 4 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR adds tests for stripe connector. ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** test(stripe): add unit tests for stripe connector (#473) Files to modify: **crates/router/tests/connectors/connector_auth.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::stripe **crates/router/tests/connectors/stripe.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_payment_authorize_data - function: private::should_only_authorize_payment - function: private::should_authorize_and_capture_payment - function: private::should_capture_already_authorized_payment - function: private::should_partially_capture_already_authorized_payment - function: private::should_sync_payment - function: private::should_void_already_authorized_payment - function: private::should_fail_payment_for_incorrect_card_number - function: private::should_fail_payment_for_no_card_number - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_invalid_exp_year - function: private::should_fail_payment_for_invalid_card_cvc - function: private::should_fail_capture_for_invalid_payment - function: private::should_refund_succeeded_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_fail_refund_for_invalid_amount - function: private::should_sync_refund - struct: private::Stripe - impl: impl ConnectorActions for Stripe - impl: impl utils::Connector for Stripe **crates/router/tests/connectors/utils.rs** Add: - function: private::get_request_interval - function: private::authorize_and_capture_payment - function: private::authorize_and_void_payment - function: private::make_payment_and_refund - function: private::make_payment_and_multiple_refund - function: private::rsync_retry_till_status_matches - function: private::default - function: private::default - struct: pub::PaymentCaptureType - struct: pub::PaymentCancelType - impl: impl Default for PaymentCaptureType - impl: impl Default for PaymentCancelType
{"issue_number": 468, "pr_number": 473, "commits_count": 1, "files_changed": 4, "response_length": 3021, "file_count": 6, "needs_breakdown": false}
feat(users): add schema and apis for org authentication methods Setup table and end points for org authentication methods - This will be used to support SSO login - Orgs can also setup multiple other authentication methods
<think> PR Context: - Title: feat(users): setup user authentication methods schema and apis - Merged: 2024-06-21T11:14:39Z - Files changed: 29 files - Commits: 25 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description The PR: - Sets up schema for user authentication methods - adds queries to interact with schema - adds endpoints to create, update and list authentication methods ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [x] </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): setup user authentication methods schema and apis (#4999) Co-authored-by: hyperswitch-b Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::OpenIdConnectPrivateConfig - struct: pub::OpenIdConnectPublicConfig - struct: pub::OpenIdConnect - struct: pub::CreateUserAuthenticationMethodRequest - struct: pub::UpdateUserAuthenticationMethodRequest - struct: pub::GetUserAuthenticationMethodsRequest - struct: pub::UserAuthenticationMethodResponse - struct: pub::AuthMethodDetails - enum: pub::AuthConfig - enum: pub::OpenIdProvider **crates/common_enums/src/enums.rs** Add: - enum: pub::UserAuthType - enum: pub::Owner **crates/diesel_models/src/lib.rs** Add: - mod: pub::user_authentication_method **crates/diesel_models/src/query.rs** Add: - mod: pub::user_authentication_method **crates/diesel_models/src/query/user_authentication_method.rs** Add: - function: pub::insert - function: pub::list_user_authentication_methods_for_auth_id - function: pub::list_user_authentication_methods_for_owner_id - function: pub::update_user_authentication_method - impl: impl UserAuthenticationMethodNew - impl: impl UserAuthenticationMethod **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/user_authentication_method.rs** Add: - function: private::from - struct: pub::UserAuthenticationMethod - struct: pub::UserAuthenticationMethodNew - struct: pub::OrgAuthenticationMethodUpdateInternal - enum: pub::UserAuthenticationMethodUpdate - impl: impl From<UserAuthenticationMethodUpdate> for OrgAuthenticationMethodUpdateInternal **crates/router/src/configs/secrets_transformers.rs** Add: - function: private::convert_to_raw_secret - impl: impl SecretsHandler for settings::UserAuthMethodSettings **crates/router/src/configs/settings.rs** Add: - struct: pub::UserAuthMethodSettings **crates/router/src/core/errors/user.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::create_user_authentication_method - function: pub::update_user_authentication_method - function: pub::list_user_authentication_methods **crates/router/src/db.rs** Add: - mod: pub::user_authentication_method **crates/router/src/db/kafka_store.rs** Add: - function: private::insert_user_authentication_method - function: private::list_user_authentication_methods_for_auth_id - function: private::list_user_authentication_methods_for_owner_id - function: private::update_user_authentication_method - impl: impl UserAuthenticationMethodInterface for KafkaStore **crates/router/src/db/user_authentication_method.rs** Add: - function: private::insert_user_authentication_method - function: private::list_user_authentication_methods_for_auth_id - function: private::list_user_authentication_methods_for_owner_id - function: private::update_user_authentication_method - function: private::insert_user_authentication_method - function: private::list_user_authentication_methods_for_auth_id - function: private::list_user_authentication_methods_for_owner_id - function: private::update_user_authentication_method - trait: pub::UserAuthenticationMethodInterface - impl: impl UserAuthenticationMethodInterface for Store - impl: impl UserAuthenticationMethodInterface for MockDb **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::create_user_authentication_method - function: pub::update_user_authentication_method - function: pub::list_user_authentication_methods **crates/router/src/types/storage.rs** Add: - mod: pub::user_authentication_method **crates/router/src/types/storage/user_authentication_method.rs** Modify existing code **crates/router/src/utils/user.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<user_api::AuthConfig> for common_enums::UserAuthType **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/mock_db.rs** Modify existing code
{"issue_number": 4998, "pr_number": 4999, "commits_count": 1, "files_changed": 29, "response_length": 5126, "file_count": 25, "needs_breakdown": true}
[REFACTOR]: [CYBERSOURCE] Add amount conversion framework to Cybersource ### :memo: Feature Description Currently, amounts are represented as `i64` values throughout the application. We want to introduce a `Unit` struct that explicitly states the denomination. A new type, `MinorUnit`, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows. Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application. ### :hammer: Possible Implementation - For each connector, we need to create an amount conversion function. Connectors will specify the format they require, and the core framework will handle the conversion accordingly. - Connectors should invoke the `convert` function to receive the amount in their required format. - Refer to the [connector documentation](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/original-transaction-amount.html) to determine the required amount format for each connector. - You can refer [this PR](https://github.com/juspay/hyperswitch/pull/4825) for more context. 🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` , `crates/router/src/types/api.rs` , `crates/router/tests/connectors/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :package: Submission Process: - Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself. - Once assigned, submit a pull request (PR). - Maintainers will review and provide feedback, if any. - Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules). Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest. ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): add amount conversion framework to cybersource - Merged: 2024-12-04T11:00:45Z - Files changed: 5 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> added StringMajorUnit for amount conversion ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): add amount conversion framework to cybersource (#6335) Co-authored-by: DEEPANSH Files to modify: **crates/common_utils/src/types.rs** Modify existing code **crates/router/src/connector/cybersource.rs** Remove: - struct: pub::Cybersource Add: - function: pub::new - struct: pub::Cybersource - impl: impl Cybersource **crates/router/src/connector/cybersource/transformers.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/cybersource.rs** Modify existing code
{"issue_number": 5942, "pr_number": 6335, "commits_count": 1, "files_changed": 5, "response_length": 1377, "file_count": 7, "needs_breakdown": false}
[CHORE] update Cypress creds update cypress creds. wise failing
<think> PR Context: - Title: chore: update creds - Merged: 2025-01-17T10:37:04Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> updates wise creds ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files w </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7053, "pr_number": 7054, "commits_count": 0, "files_changed": 1, "response_length": 749, "file_count": 0, "needs_breakdown": false}
fix(api_locking): fix the unit interpretation for `LockSettings` expiry ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Currently, due to variable shadowing we are accidentally multiplying the timeout by 1000 resulting in a very high expiry for the API lock. <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Issue faced during the debugging, payments being locked for a long time <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: fix(api_locking): fix the seconds and millis mismatch while fetching configuration - Merged: 2023-12-13T06:13:44Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Clones #3121 <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(api_locking): fix the seconds and millis mismatch while fetching configuration (#3122) Files to modify: **crates/router/src/configs/settings.rs** Modify existing code
{"issue_number": 3121, "pr_number": 3122, "commits_count": 1, "files_changed": 1, "response_length": 989, "file_count": 3, "needs_breakdown": false}
feat(verify): add new types for validate API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This part of series of PR's which are aimed at adding ValidateAPI in the core. This PR specifically deals with introducing new types for the Flows and Operations which are to be added going further. <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to. 1. Create new types for the change 2. Introduce the Flow and Connector Integration 3. Add Stripe POC 4. Move the mandate related behaviour to domain 5. Introduce the new operation and all the related components in the payments core <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(stripe): add setup intent in connector integration (stripe) - Merged: 2022-12-07T06:29:41Z - Files changed: 15 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This PR adds a stripe POC for the verify API <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(stripe): add setup intent in connector integration (stripe) (#50) Co-authored-by: Arun Raj M <j Files to modify: **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/connector/aci.rs** Add: - impl: impl api::PreVerify for Aci - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Aci **crates/router/src/connector/adyen.rs** Add: - impl: impl api::PreVerify for Adyen - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Adyen **crates/router/src/connector/authorizedotnet.rs** Add: - impl: impl api::PreVerify for Authorizedotnet - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Authorizedotnet **crates/router/src/connector/braintree.rs** Add: - impl: impl api::PreVerify for Braintree - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Braintree **crates/router/src/connector/checkout.rs** Add: - impl: impl api::PreVerify for Checkout - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Checkout **crates/router/src/connector/stripe.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::PreVerify for Stripe - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Stripe **crates/router/src/connector/stripe/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::from - struct: pub::SetupIntentRequest - struct: pub::SetupIntentResponse - impl: impl TryFrom<&types::VerifyRouterData> for SetupIntentRequest - impl: impl TryFrom<types::ResponseRouterData<F, SetupIntentResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData> - impl: impl From<(api::PaymentMethod, enums::AuthenticationType)> for StripePaymentMethodData **crates/router/src/core/errors/api_error_response.rs** Modify existing code **crates/router/src/core/errors/utils.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Add: - mod: private::verfiy_flow **crates/router/src/core/payments/flows/verfiy_flow.rs** Add: - function: private::construct_r_d - function: private::decide_flows - function: pub::decide_flow - function: private::generate_mandate - impl: impl ConstructFlowSpecificData<api::Verify, types::VerifyRequestData, types::PaymentsResponseData> for PaymentData<api::Verify> - impl: impl Feature<api::Verify, types::VerifyRequestData> for types::VerifyRouterData - impl: impl types::VerifyRouterData **crates/router/src/core/payments/transformers.rs** Add: - function: private::try_from - impl: impl TryFrom<PaymentData<F>> for types::VerifyRequestData **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/payments.rs** Add: - struct: pub::Verify - trait: pub::PreVerify
{"issue_number": 45, "pr_number": 50, "commits_count": 1, "files_changed": 15, "response_length": 4431, "file_count": 17, "needs_breakdown": true}
bug(events): update the ApiEventsType for `PaymentsSessionResponse` to use payments flow update the `ApiEventMetric` trait for this response to return `ApiEventsType::Payment { payment_id : String}` variant. based on the payment id stored in its body This would help for better structuring and help list this api call in the dashboard events as well
<think> PR Context: - Title: fix(event): Updated the ApiEventMetric - Merged: 2024-07-02T15:18:04Z - Files changed: 2 files - Commits: 13 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> Updated the `ApiEventMetric` trait to return `ApiEventsType::Payment { payment_id : String}` variant. Fixes #5059 <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Checklist <!-- Put an `x` in </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(event): Updated the ApiEventMetric (#5126) Co-authored-by: Sampras Lopes <[email protected] Files to modify: **crates/api_models/src/events.rs** Modify existing code **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for PaymentsSessionResponse
{"issue_number": 5059, "pr_number": 5126, "commits_count": 1, "files_changed": 2, "response_length": 1106, "file_count": 4, "needs_breakdown": false}
Docs: Adding More descriptive details in the Payouts module We have received feedback about the Payout Module in API ref lacking in description of the various fields.
<think> PR Context: - Title: Docs: API-Ref changes for Payouts - Merged: 2024-07-31T07:33:43Z - Files changed: 5 files - Commits: 15 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [X] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** Docs: API-Ref changes for Payouts (#5236) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitc Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_utils/src/types.rs** Modify existing code
{"issue_number": 5235, "pr_number": 5236, "commits_count": 1, "files_changed": 5, "response_length": 1130, "file_count": 6, "needs_breakdown": false}
feat(connector): add template code for stripebilling add a template code for stripe billing connector
<think> PR Context: - Title: feat(connector): add template code for stripebilling - Merged: 2025-03-03T10:35:30Z - Files changed: 24 files - Commits: 12 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description connector integration template code for stripe billing. Issue: This PR closes the issue #7212 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): add template code for stripebilling (#7228) Co-authored-by: Nishanth Challa <nishan Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::stripebilling **crates/hyperswitch_connectors/src/connectors/stripebilling.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Stripebilling - impl: impl Stripebilling - impl: impl api::Payment for Stripebilling - impl: impl api::PaymentSession for Stripebilling - impl: impl api::ConnectorAccessToken for Stripebilling - impl: impl api::MandateSetup for Stripebilling - impl: impl api::PaymentAuthorize for Stripebilling - impl: impl api::PaymentSync for Stripebilling - impl: impl api::PaymentCapture for Stripebilling - impl: impl api::PaymentVoid for Stripebilling - impl: impl api::Refund for Stripebilling - impl: impl api::RefundExecute for Stripebilling - impl: impl api::RefundSync for Stripebilling - impl: impl api::PaymentToken for Stripebilling - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorCommonExt<Flow, Request, Response> for Stripebilling - impl: impl ConnectorCommon for Stripebilling - impl: impl ConnectorValidation for Stripebilling - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Stripebilling - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Stripebilling - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Stripebilling - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Stripebilling - impl: impl webhooks::IncomingWebhook for Stripebilling - impl: impl ConnectorSpecifications for Stripebilling - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::StripebillingRouterData - struct: pub::StripebillingPaymentsRequest - struct: pub::StripebillingCard - struct: pub::StripebillingAuthType - struct: pub::StripebillingPaymentsResponse - struct: pub::StripebillingRefundRequest - struct: pub::RefundResponse - struct: pub::StripebillingErrorResponse - enum: pub::StripebillingPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for StripebillingRouterData<T> - impl: impl TryFrom<&StripebillingRouterData<&PaymentsAuthorizeRouterData>> for StripebillingPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for StripebillingAuthType - impl: impl From<StripebillingPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, StripebillingPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&StripebillingRouterData<&RefundsRouterData<F>>> for StripebillingRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::stripebilling **crates/router/tests/connectors/stripebilling.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::StripebillingTest - impl: impl ConnectorActions for StripebillingTest - impl: impl utils::Connector for StripebillingTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 7212, "pr_number": 7228, "commits_count": 1, "files_changed": 24, "response_length": 9132, "file_count": 17, "needs_breakdown": true}
feat: new apis for accept invite and list merchant - new JWT auth based api for accept invite api - new SPT auth based api for list merchants - send accept invite from email instead of reset password for newly invited users
<think> PR Context: - Title: feat(users): new routes to accept invite and list merchants - Merged: 2024-05-09T13:24:15Z - Files changed: 10 files - Commits: 11 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR: - adds new route to accept invite from dashboard with JWT Auth - adds new routes to get list of merchants to select for user, SPT Auth - modifies to send accept invite from email instead of set password for new user in token only flow ### Additional Changes - [x] T </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): new routes to accept invite and list merchants (#4591) Files to modify: **crates/api_models/src/events/user_role.rs** Modify existing code **crates/api_models/src/user_role.rs** Remove: - struct: pub::AcceptInvitationRequest Add: - struct: pub::MerchantSelectRequest **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::list_merchants_for_user_with_spt **crates/router/src/routes/user_role.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::get_user_id - function: private::get_user_id - function: private::authenticate_and_fetch - function: private::authenticate_and_fetch - trait: pub::GetUserIdFromAuth - impl: impl GetUserIdFromAuth for UserFromToken - impl: impl GetUserIdFromAuth for UserFromSinglePurposeToken - impl: impl AuthenticateAndFetch<Box<dyn GetUserIdFromAuth>, A> for SinglePurposeJWTAuth - impl: impl AuthenticateAndFetch<Box<dyn GetUserIdFromAuth>, A> for DashboardNoPermissionAuth **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 4590, "pr_number": 4591, "commits_count": 1, "files_changed": 10, "response_length": 2146, "file_count": 12, "needs_breakdown": false}
[BUG] incorrect mapping of connector customer ### Bug Description It bugs out when the merchant connector account credentials are changed, or when multiple connector accounts with the same name ( stripe, adyen ) are created in different countries or with different labels. When creating payment it will be using the older customer that is already created with older stipe account. This is because in the database, the mapping is `connector` -> `connector_customer_id`. ![Screenshot 2023-05-22 at 1 08 08 PM](https://github.com/juspay/hyperswitch/assets/48803246/39bed2c0-f31a-4ba4-85b0-ba2f8750cf41) ### Expected Behavior If a new connector account is used in a different country, then new customer id should be created. ### Actual Behavior same customer id is being used for connector account in different countries. ### Steps To Reproduce Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant. 1. Create a stripe account in US region. 2. Make a payment using US as the business region. 3. Create a stripe account in AU region. 4. Make a payment using AU as the business region. 5. The payment will fail with error `No such customer` ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? No If yes, please provide the value of the `x-request-id` response header for helping us debug your issue. If not (or if building/running locally), please provide the following details: 1. Operating System or Linux distribution: 2. Rust version (output of `rustc --version`): `` 3. App version (output of `cargo r -- --version`): `` ### Have you spent some time to check if this bug has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: refactor(connector_customer): incorrect mapping of connector customer - Merged: 2023-05-31T15:18:14Z - Files changed: 5 files - Commits: 12 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Refactoring ## Description <!-- Describe your changes in detail --> This PR adds support for multiple country and business label support in the connector customer. Previously the mapping to connector customer was of the form `connector_name -> connector_customer_id`, This has been changed to `connector_label -> connector_customer_id` This Pr also includes some changes to the connector customer code to use idiomatic r </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector_customer): incorrect mapping of connector customer (#1275) Files to modify: **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/customers.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/verfiy_flow.rs** Modify existing code
{"issue_number": 1229, "pr_number": 1275, "commits_count": 1, "files_changed": 5, "response_length": 1268, "file_count": 7, "needs_breakdown": false}
fix(api_models): `wasm` build problems caused by `actix-multipart` `wasm` build is failing because of adding `actix-multipart` dependency in `api-models`. As we cannot change any dependencies in `wasm`, we will have to make changes to `api_models` to fix this.
<think> PR Context: - Title: fix(api_models): Fix `wasm` build problems caused by `actix-multipart` - Merged: 2024-12-05T11:09:38Z - Files changed: 4 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Wasm build is failing because of adding `actix-multipart` dependency in `api-models`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configur </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(api_models): Fix `wasm` build problems caused by `actix-multipart` (#6747) Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Modify existing code
{"issue_number": 6748, "pr_number": 6747, "commits_count": 1, "files_changed": 4, "response_length": 1022, "file_count": 4, "needs_breakdown": false}
fix: cover sso nitpicks and todo changes Nitpicks - change parsing login for configs - refactor terminate auth select - clear cookie in rotate and reset password
<think> PR Context: - Title: fix(users): clear cookie and alter parsing for sso - Merged: 2024-06-28T08:03:16Z - Files changed: 2 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description The PR - removes cookie after rotate password and reset password - refactor parsing for sso config, now it uses `serde json from value` instead of `parse value` - refactors terminate auth select - send bad request instead of internal server error if invalid id is passed to auth/se </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(users): clear cookie and alter parsing for sso (#5147) Co-authored-by: Mani Chandra <84711804+Th Files to modify: **crates/router/src/core/user.rs** Modify existing code **crates/router/src/utils/user.rs** Add: - function: pub::is_sso_auth_type - impl: impl ForeignFrom<user_api::AuthConfig> for UserAuthType
{"issue_number": 5146, "pr_number": 5147, "commits_count": 1, "files_changed": 2, "response_length": 1110, "file_count": 4, "needs_breakdown": false}
fix(address): use first_name if last_name is not passed ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> This PR fixes the issue which arises when creating a payement with cybersource and bank of america connectors where billing first name and last name are mandatory. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - Create a payment by passing billing address in payment create request, with confirm set to false. ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_uHrHd27n2djqmWLoWqhpHPf1NmU2dsIbEguhDIB9ji7bQmzf9rLqw9TqrsRybqwm' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": false, "customer": { "id": "cus_abc", "email": "[email protected]" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "Narayan", "last_name": "Bhat" } } }' ``` - Confirm the payment with `card_holder_name`, by not passing last name ```bash curl --location 'http://localhost:8080/payments/pay_QHybdDJQVMZVgS4BX4IQ/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_uHrHd27n2djqmWLoWqhpHPf1NmU2dsIbEguhDIB9ji7bQmzf9rLqw9TqrsRybqwm' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Narayan", "card_cvc": "123" } }, "payment_method": "card" }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code
<think> PR Context: - Title: fix(address): use first_name if last_name is not passed - Merged: 2024-04-16T08:31:44Z - Files changed: 9 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> More details can be found in #4360 ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that w </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(address): use first_name if last_name is not passed (#4367) Files to modify: **crates/router/src/connector/bankofamerica/transformers.rs** Modify existing code **crates/router/src/connector/bluesnap/transformers.rs** Modify existing code **crates/router/src/connector/cybersource/transformers.rs** Modify existing code **crates/router/src/connector/forte/transformers.rs** Modify existing code **crates/router/src/connector/multisafepay/transformers.rs** Modify existing code **crates/router/src/connector/nmi/transformers.rs** Modify existing code **crates/router/src/connector/nuvei/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/connector/volt/transformers.rs** Modify existing code
{"issue_number": 4360, "pr_number": 4367, "commits_count": 1, "files_changed": 9, "response_length": 1579, "file_count": 11, "needs_breakdown": false}