prompt
stringlengths
24
63.1k
response
stringlengths
180
101k
metadata
stringlengths
143
152
[FEATURE]: [NMI] Use `connector_request_reference_id` as reference to the connector ### :memo: Feature Description - We transmit our reference id from Hyperswitch to the connector, enabling merchants to subsequently locate the payment within the connector dashboard. - Presently, there is a lack of uniformity in this process, as some implementations employ `payment_id` while others utilize `attempt_id`. - This inconsistency arises from the fact that `payment_id` and `attempt_id` correspond to two distinct entities within our system. ### :hammer: Possible Implementation - To mitigate this confusion, we've introduced a new field called `connector_request_reference_id` in our RouterData. - This id should replace them as a reference id to the connector for payment request. - One might need to have exposure to api docs of the connector for which it is being implemented. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2052 :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): [NMI] add orderid to PaymentRequest - Merged: 2023-10-31T10:46:10Z - Files changed: 1 files - Commits: 1 commits Implementation approach: Add orderid with value of connector_request_reference_id in NMI transformers. Fixes #2306 ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies applicati </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [NMI] add orderid to PaymentRequest (#2727) Files to modify: **crates/router/src/connector/nmi/transformers.rs** Modify existing code **Commit 2:** feat(connector): [NMI] add orderid to PaymentRequest (#2727) Files to modify: **crates/router/src/connector/nmi/transformers.rs** Modify existing code
{"issue_number": 2306, "pr_number": 2727, "commits_count": 2, "files_changed": 1, "response_length": 1109, "file_count": 5, "needs_breakdown": false}
[FEATURE] Generate Random Disputes for sample data ### Feature Description The issue is sub part of issue: #5991 (Please refer to this First) The current implementation of the generate_sample_data_for_user function generates sample data for payments and refunds. However, there is no functionality to generate sample disputes. This issue is about extending the generate_sample_data_for_user function to generate random disputes based on the sample payments created. Current Behavior - The /sample_data API generates sample payments and refunds. - No disputes are generated as part of the sample data generation process. Expected Behavior - The generate_sample_data_for_user function should also generate random disputes along with payments and refunds. - The number of disputes generated should be based on the number of payments created: 2 disputes if the number of payments is between 50 and 100. 1 dispute if the number of payments is less than 50. ### Possible Implementation Modify generate_sample_data_for_user Function: Update the function in `utils::user::sample_data::generate_sample_data` to create sample disputes based on the number of generated payments. The Data should be random and fields should be related to sample payments/refunds for which we are creating dispute. Call the Db function inside `generate_sample_data_for_user` to Batch insert sample disputes Call the Db function inside `delete_sample_data_for_user` to Delete sample disputes Test To generate Sample Data: ``` curl --location 'http://localhost:8080/user/sample_data' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ }' ``` To Delete Sample Data: ``` curl --location --request DELETE 'http://localhost:8080/user/sample_data' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ }' ``` ### 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(sample_data): generate random disputes for sample data - Merged: 2024-10-25T08:45:37Z - Files changed: 2 files - Commits: 22 commits Implementation approach: ## Description <!-- Describe your changes in detail --> I added dispute generation to function `generate_sample_data` in `utils/user/sample_data.rs`. The number of disputes generated is based on the number of payments created: 2 disputes if the number of payments is between 50 and 100. 1 disput </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(sample_data): generate random disputes for sample data (#6341) Files to modify: **crates/router/src/core/user/sample_data.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code
{"issue_number": 6117, "pr_number": 6341, "commits_count": 1, "files_changed": 2, "response_length": 1021, "file_count": 4, "needs_breakdown": false}
[FEATURE] Create a dummy connector for internal and external testing of payments and refunds flows ### Feature Description A dummy test connector needs to be created with the ability to process all the payment methods available on Hyperswitch. This dummy connector will be useful for internal and external testing and it will be used extensively by those trying to test or integrate Hyperswitch without setting up any active accounts with any of the processors. The dummy test connector will be able to simulate most basic scenarios (success/failure/pending) for all the available payment methods by having separate test payment method data for each of these flows. Payment failure can include further breakdown in scenarios according to the payment methods. For example, there should be separate test card numbers for simulating success, failure, pending statuses of 3DS and Non 3DS flows. Under failure, different test card numbers should enable simulating errors like invalid card info, insufficient funds, declined by gateway, declined by issuing bank, declines due to bad fraud score, etc. ### Possible Implementation We would need to create a dummy connector to test all the payment flows, refund flows, webhooks, etc. The two major tasks are: 1. Server implementation for dummy connector for the following endpoints a. payments #980 b. refunds #1071 c. webhooks 2. Integrating Hyperswitch with the dummy connector for the following endpoints a. payments #1084 b. refunds #1084 c. webhooks 3. Enable Dummy Connector and make it default **Cards:** Non- 3DS payments flow https://github.com/juspay/hyperswitch/issues/727 ### 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: feat(router): add payment, refund routes for dummy connector - Merged: 2023-05-11T19:26:15Z - Files changed: 10 files - Commits: 18 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Add payment, payment sync, refund, refund sync routes for the dummy connector ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): add payment, refund routes for dummy connector (#1071) Files to modify: **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/dummy_connector.rs** Add: - function: pub::dummy_connector_payment_data - function: pub::dummy_connector_refund - function: pub::dummy_connector_refund_data **crates/router/src/routes/dummy_connector/errors.rs** Modify existing code **crates/router/src/routes/dummy_connector/types.rs** Remove: - enum: pub::DummyConnectorTransactionStatus Add: - struct: pub::DummyConnectorPaymentResponse - struct: pub::DummyConnectorRefundRetrieveRequest - enum: pub::DummyConnectorStatus - enum: pub::PaymentMethodType **crates/router/src/routes/dummy_connector/utils.rs** Modify existing code
{"issue_number": 726, "pr_number": 1071, "commits_count": 1, "files_changed": 10, "response_length": 1661, "file_count": 8, "needs_breakdown": false}
fix(mandate): add mandate_id column in payment_attempt table ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This change includes - Adding a new column `mandate_id` in the table `payment_attempt` - Similarly, adding `mandate_id` field in `PaymentAttempt` structs (which include `New`, `Update` variants) - Storing `mandate_id`, if generated during payment creation, to the `PaymentAttempt` table (in `PostUpdateTracker`) <!-- Describe your changes in detail --> ### Additional Changes - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes --> ## Motivation and Context Originally, we didn't have any way to link a payment that is made to a specific mandate. Which makes it impossible to get the related mandate_id while performing a payment sync operation. This change will allow, the payments core to have access to the mandate that is related to the specific payment attempt while performing payment sync and further mandate related functionalities. <!-- 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(core): add is_click_to_pay_enabled in business profile - Merged: 2024-12-05T13:04:29Z - Files changed: 11 files - Commits: 9 commits Implementation approach: ## Description <!-- Describe your changes in detail --> add is_click_to_pay_enabled in business profile ## 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 Business Profile Request: ```shell curl --location 'http://localhost:8080/account/merchant_1733299712/business </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): add is_click_to_pay_enabled in business profile (#6736) Co-authored-by: hyperswitch-bot[ Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"issue_number": 3, "pr_number": 6736, "commits_count": 1, "files_changed": 11, "response_length": 1382, "file_count": 9, "needs_breakdown": false}
Deep health check for outgoing request in scheduler
<think> PR Context: - Title: fix: add outgoing checks for scheduler - Merged: 2024-02-02T10:03:33Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Closes #3524 . Add an outgoing request check for scheduler. ## 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 docum </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: add outgoing checks for scheduler (#3526) Files to modify: **crates/api_models/src/health_check.rs** Modify existing code **crates/router/src/bin/scheduler.rs** Modify existing code
{"issue_number": 3524, "pr_number": 3526, "commits_count": 1, "files_changed": 2, "response_length": 964, "file_count": 4, "needs_breakdown": false}
chore: address Rust 1.66 clippy lints ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR addresses new `clippy` lints stabilized in Rust 1.66. ## 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). --> N/A ## 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)? --> N/A ## 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: set thread stack size to 4 MiB for debug builds - Merged: 2022-12-16T10:05:50Z - Files changed: 2 files - Commits: 3 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR sets the thread stack size to 4 MiB for debug builds. ## 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 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: set thread stack size to 4 MiB for debug builds (#163) Co-authored-by: Arun Raj M <jarnura47@gm Files to modify: **crates/router/src/build.rs** Modify existing code
{"issue_number": 162, "pr_number": 163, "commits_count": 1, "files_changed": 2, "response_length": 958, "file_count": 3, "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: fix: consume profile_id throughout payouts flow - Merged: 2023-10-12T07:51:49Z - Files changed: 6 files - Commits: 1 commits Implementation approach: ## Description This PR modifies logic used for fetching connector and storing customer's details using a profile_id. This had already been done for the core functionalities, including payments, refunds, etc. Core PR - https://github.com/juspay/hyperswitch/pull/2020 ### Additional Changes - </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: consume profile_id throughout payouts flow (#2501) Co-authored-by: Kashif <mohammed.kashif@jusp Files to modify: **crates/api_models/src/payouts.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"issue_number": 1, "pr_number": 2501, "commits_count": 1, "files_changed": 6, "response_length": 1204, "file_count": 7, "needs_breakdown": false}
fix(admin): jwt added for organization update and retrieve Previously, updating and retrieving organization details required authentication using the admin API key. With the recent change, the dashboard JWT can now be used to update the org_name directly through the dashboard.
<think> PR Context: - Title: fix(admin): Add JWT Auth for Org Read and Update APIs - Merged: 2024-09-29T13:06:45Z - Files changed: 2 files - Commits: 3 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Previously, updating and retrieving organization details required authentication using the admin API key. With the recent change, the dashboard JWT can now be used to update the org_name directly through the dashboard. ### Additional Change </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(admin): Add JWT Auth for Org Read and Update APIs (#6140) Files to modify: **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code
{"issue_number": 6141, "pr_number": 6140, "commits_count": 1, "files_changed": 2, "response_length": 1000, "file_count": 4, "needs_breakdown": false}
[FIX]: Make v2 endpoints follow standard API conventions There are a lot of minor inconsistencies in v2 endpoints. Fix them in accordance with https://google.aip.dev/general
<think> PR Context: - Title: fix(router): Make v2 endpoints follow standard naming conventions - Merged: 2025-07-21T15:41:20Z - Files changed: 24 files - Commits: 6 commits Implementation approach: ## Description <!-- Describe your changes in detail --> - Consistently use kebab case in endpoint URLs - Use plural form of resources in URLs, i.e. instead of `/v2/organization`, use `/v2/organizations` Renamed (current version removed) endpoints: `/v2/organization` -> `/v2/organizations` `/v </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(router): Make v2 endpoints follow standard naming conventions (#8630) Co-authored-by: hyperswitc Files to modify: **crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs** Modify existing code **crates/openapi/src/routes/organization.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Modify existing code **crates/openapi/src/routes/refunds.rs** Modify existing code **crates/openapi/src/routes/revenue_recovery.rs** Modify existing code **crates/openapi/src/routes/routing.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Modify existing code **crates/router/src/routes/app.rs** Remove: - struct: pub::User Add: - function: pub::server - function: pub::server - struct: pub::User - struct: pub::ProcessTrackerDeprecated - impl: impl User - impl: impl ProcessTrackerDeprecated
{"issue_number": 8629, "pr_number": 8630, "commits_count": 1, "files_changed": 24, "response_length": 1732, "file_count": 11, "needs_breakdown": false}
[FEATURE] Refactor Stripe compatibility routes ### Feature Description Use `web::resource` to specify the paths in [`/crates/router/src/compatibility/stripe/app.rs`](https://github.com/juspay/hyperswitch/blob/main/crates/router/src/compatibility/stripe/app.rs) ### Possible Implementation Refer this file https://github.com/juspay/hyperswitch/blob/main/crates/router/src/routes/app.rs ### 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(compatibility): refactor stripe compatibility routes using `web::resource` - Merged: 2023-05-04T14:24:44Z - Files changed: 5 files - Commits: 9 commits Implementation approach: ## Description <!-- Describe your changes in detail --> - fixes #961 ### 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 co </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(compatibility): refactor stripe compatibility routes using `web::resource` (#1022) Files to modify: **crates/router/src/compatibility/stripe/app.rs** Modify existing code **crates/router/src/compatibility/stripe/customers.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents.rs** Modify existing code **crates/router/src/compatibility/stripe/refunds.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents.rs** Modify existing code
{"issue_number": 961, "pr_number": 1022, "commits_count": 1, "files_changed": 5, "response_length": 1327, "file_count": 7, "needs_breakdown": false}
refactor: remove permissions from files and forex apis
<think> PR Context: - Title: refactor(permissions): Remove permissions for utility APIs - Merged: 2024-02-21T07:34:49Z - Files changed: 18 files - Commits: 6 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR will remove permissions for Files and Forex apis. It also adds `find_role_by_role_id_in_merchant_scope` db function. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(permissions): Remove permissions for utility APIs (#3730) Co-authored-by: hyperswitch-bot[b Files to modify: **crates/api_models/src/user_role.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::RoleScope - enum: pub::PermissionGroup **crates/diesel_models/src/enums.rs** Remove: - enum: pub::RoleScope - enum: pub::PermissionGroup **crates/diesel_models/src/query/role.rs** Add: - function: pub::find_by_role_id_in_merchant_scope **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user/dashboard_metadata.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::find_role_by_role_id_in_merchant_scope **crates/router/src/db/role.rs** Add: - function: private::find_role_by_role_id_in_merchant_scope - function: private::find_role_by_role_id_in_merchant_scope **crates/router/src/routes/currency.rs** Modify existing code **crates/router/src/routes/files.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::authenticate_and_fetch - impl: impl AuthenticateAndFetch<AuthenticationData, A> for DashboardNoPermissionAuth **crates/router/src/services/authorization/info.rs** Modify existing code **crates/router/src/services/authorization/permissions.rs** Modify existing code **crates/router/src/services/authorization/predefined_permissions.rs** Modify existing code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/utils/user.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"issue_number": 3729, "pr_number": 3730, "commits_count": 1, "files_changed": 18, "response_length": 2546, "file_count": 20, "needs_breakdown": true}
Add audit events for PaymentApprove update Created from #4525 This covers adding events for PaymentApprove 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 ### 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.
<think> PR Context: - Title: feat(payments): Add audit events for PaymentApprove update - Merged: 2024-11-08T10:20:37Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## Description This PR adds an Audit event for the PaymentApprove operation. ### Additional Changes - [x] This PR modifies the files below - `crates/router/src/core/payments/operations/payment_approve.rs` - `crates/router/src/events/audit_events.rs` ## Motivation and Context This PR fixes #4680 ## How did you test it </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payments): Add audit events for PaymentApprove update (#6432) Files to modify: **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/events/audit_events.rs** Modify existing code
{"issue_number": 4680, "pr_number": 6432, "commits_count": 1, "files_changed": 2, "response_length": 1034, "file_count": 4, "needs_breakdown": false}
[BUG]: [TSYS] Payments Failing Across All Flows ### Feature Description/Summary TSYS (Total System Services) is a global payment processing platform that provides payment gateway services for merchants, payment facilitators, and acquirers. It enables businesses to accept credit and debit card payments securely across multiple channels (e-commerce, in-store, mobile, etc.). The gateway facilitates authorization, capture, settlement, and reporting while ensuring compliance with industry security standards such as PCI DSS. ### Context While attempting to process payments across all available flows using the TSYS gateway, we are consistently running into the following error response from their API in our current Hyperswitch integration: ``` SaleResponse(ErrorResponse(TsysErrorResponse { status: Fail, response_code: "F9901", response_message: "Invalid content was found starting with element 'orderNumber'. One of '{paymentFacilitatorIdentifier, paymentFacilitatorName, subMerchantIdentifier, subMerchantName, subMerchantCountryCode, subMerchantStateCode, subMerchantCity, subMerchantPostalCode, subMerchantEmailID, subMerchantPhone, isRecurring, isoIdentifier, registeredUserIndicator, laneID, authorizationIndicator, splitTenderPayment, splitTenderID, customerDetails, industryType, merchantCategoryCode, customFieldDetails, IVRMid, IVRVnumber, recipientDetails, acquirerInternalReferenceNumber, acceptorStreetAddress, serviceLocationCity, serviceLocationGeoCoordinates, skipDuplicateCheck}' is expected., " })) ``` ### Starter Tasks - Go ahead to the connector documentation and attempt to hit the connector's direct cURLs and make a happy case. - Identify the current integration issue in Hyperswitch by comparing the connector's request body and make relevant changes in the Hyperswitch codebase. ### Implementation Hints - You can go to `crates/hyperswitch_connectors/src/connectors/tsys.rs` and `crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs` and make relevant changes according to what's gone in the current integration. - Head to this documentation to get some clarity about the request and response schemas : [URL](https://www.google.com/url?q=https://developerportal.transit-pass.com/developerportal/resources/dist/%23/api-specs/.%252Fassets%252Fbuild%252Fapi%252FAPI3.0%252FCreditServices%252FAuth%252Findex.html%2523auth&sa=D&source=editors&ust=1757917256458963&usg=AOvVaw0Yt5vvn4-D6Z0T09ock1aK) ### Acceptance Criteria - [ ] Request and Response body added for each of the flows where integrity check is applied. - [ ] All the required GitHub checks passing - [ ] Formatted the code using `cargo +nightly fmt --all` ### How to Test it - Create a Merchant Account in local - Create an API Key - Add the connector - Tsys - Test out the flows ### Mentor Contact - Tag @bsayak03 [Sayak Bhattacharya] in the comments if you have any doubts/queries ### Resources Here is the connector documentation link : [URL](https://www.google.com/url?q=https://developerportal.transit-pass.com/developerportal/resources/dist/%23/api-specs/.%252Fassets%252Fbuild%252Fapi%252FAPI3.0%252FCreditServices%252FAuth%252Findex.html%2523auth&sa=D&source=editors&ust=1757917256458963&usg=AOvVaw0Yt5vvn4-D6Z0T09ock1aK) ### Pre-Flight #### 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) ### 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.
<think> PR Context: - Title: fix(connectors): [TSYS] change order of order_number in tsys auth request body - Merged: 2025-10-08T15:39:41Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Description This PR fixes the request body order of the TSYS contract for the auth request ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide li </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connectors): [TSYS] change order of order_number in tsys auth request body (#9579) Files to modify: **crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs** Modify existing code
{"issue_number": 9375, "pr_number": 9579, "commits_count": 1, "files_changed": 1, "response_length": 1009, "file_count": 3, "needs_breakdown": false}
ci(cypress): Add bank redirects for stripe ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Add Bank redirects payment methods for stripe in cypress automation ### 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 Bank redirects test cases was present in the automation setup ## How did you test it? Cypress - Stripe <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/41a29f25-8c3c-4c9b-9249-7ab4a479e6b0"> - Adyen <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/edcbbf86-ba1c-465a-b37f-83aaf4da4bc3"> - Trustpay <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/a2285a53-f888-477f-af58-f56b58af6cec"> - Nmi <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/0103bbb6-074c-414e-95b3-52c581450536"> - Cybersource <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/1219b795-4603-4598-8465-a867a5e668d8"> - Bankofamerica <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/3dc6f288-a9b5-41a1-a7cf-2a74665fde61"> - Bluesnap <img width="1038" alt="image" src="https://github.com/juspay/hyperswitch/assets/131246334/edcbbf86-ba1c-465a-b37f-83aaf4da4bc3"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] 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(cypress): add trustpay, adyen bank redirects and corresponding refactor - Merged: 2024-05-31T09:52:13Z - Files changed: 12 files - Commits: 19 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR is same as https://github.com/juspay/hyperswitch/pull/4770 Features: - https://github.com/juspay/hyperswitch/pull/4685 - Add `Pix` payment method type to `Cypress` ```txt connector: "adyen" payment_method: "bank_ </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 4772, "pr_number": 4766, "commits_count": 0, "files_changed": 12, "response_length": 808, "file_count": 0, "needs_breakdown": false}
[BUG] : [Adyen] Production URL endpoint ### Bug Description For Adyen production URL endpoint is not correctly configured as compared to how it is used ### Expected Behavior `/` is missing in the end for production endpoint ### Actual Behavior For Adyen production URL endpoint is not correctly configured as compared to how it is used ### Steps To Reproduce Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant. 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? Yes/No If yes, please provide the value of the `x-request-id` response header to help 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 --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: fix(connector): [Adyen] update config and add required fields - Merged: 2024-03-12T13:58:19Z - Files changed: 3 files - Commits: 2 commits Implementation approach: ## Description <!-- Describe your changes in detail --> - Update Prod URL endpoint - Handle refunds webhooks using hyperswitch internal refund id - Add card holder name ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [X] This P </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [Adyen] update config and add required fields (#4046) Files to modify: **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **Commit 2:** fix(connector): [Adyen] update config and add required fields (#4046) Files to modify: **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"issue_number": 4047, "pr_number": 4046, "commits_count": 2, "files_changed": 3, "response_length": 1270, "file_count": 7, "needs_breakdown": false}
enhance(router): release candidate pr for webhooks enhancement (#637) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> #637 ### 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). --> #637 ## 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)? --> #637 ## 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: Release v0.3.0 - Merged: 2023-02-26T09:57:23Z - Files changed: 30 files - Commits: 30 commits Implementation approach: # 0.3.0 (2023-02-25) ## Build System / Dependencies * **docker-compose:** increase docker health check interval for hyperswitch-server (#534) (1ba6b8c9) ## Chores * **release:** port release bug fixes to main branch (#612) (a8d6ce83) ## Continuous Integration * run CI checks on merge queue events (#530) (c7b9e9c1) ## Documentation Changes * **add_connector:** fix typo (#584) (a4f3abf3) ## New Features * **router:** * include eligible connectors list in list </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 641, "pr_number": 647, "commits_count": 0, "files_changed": 30, "response_length": 746, "file_count": 4, "needs_breakdown": false}
[FEATURE]: [Stax] 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: refactor(connector): [Stax] Currency Unit Conversion - Merged: 2023-11-05T11:59:15Z - Files changed: 2 files - Commits: 30 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR solves the Currency Unit Conversion for STAX Connector and fixes issue #2246 ### 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:** refactor(connector): [Stax] Currency Unit Conversion (#2711) Co-authored-by: Shivansh Bhatnagar <shi Files to modify: **crates/router/src/connector/stax.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/stax/transformers.rs** Add: - function: private::try_from - struct: pub::StaxRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for StaxRouterData<T>
{"issue_number": 2246, "pr_number": 2711, "commits_count": 1, "files_changed": 2, "response_length": 1280, "file_count": 4, "needs_breakdown": false}
FEATURE(connector): [Facilitapay] Add support for Pix Bank transfer Documentation: https://sandbox-portal.facilitapay.com/#/docs
<think> PR Context: - Title: feat(connector): [Facilitapay] Add support for Pix Bank Transfers - Merged: 2025-04-23T08:48:37Z - Files changed: 30 files - Commits: 30 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR does the following: - Adds Facilitapay Connector configs - Enables Facilitapay Connector in Core - Feature Matrix - Pix Bank Transfer (QRCode flow) - Does not support `Manual` capture - AccessToken flow - Requires </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Facilitapay] Add support for Pix Bank Transfers (#7704) Co-authored-by: hyperswitc Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::BrazilStatesAbbreviation **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/facilitapay.rs** Add: - function: private::build_error_response - function: private::get_headers - function: private::get_url - function: private::get_request_body - function: private::build_request - impl: impl api::ConnectorCustomer for Facilitapay - mod: private::requests - mod: private::responses **crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs** Add: - struct: pub::FacilitapayRouterData - struct: pub::FacilitapayAuthRequest - struct: pub::FacilitapayCredentials - struct: pub::FacilitapayCardDetails - struct: pub::CardTransactionRequest - struct: pub::PixTransactionRequest - struct: pub::FacilitapayPaymentsRequest - struct: pub::FacilitapayRefundRequest - struct: pub::FacilitapayCustomerRequest - struct: pub::FacilitapayPerson - enum: pub::FacilitapayTransactionRequest - enum: pub::DocumentType **crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs** Add: - struct: pub::FacilitapayAuthResponse - struct: pub::FacilitapaySubject - struct: pub::FacilitapayCustomerResponse - struct: pub::PixInfo - struct: pub::CreditCardResponseInfo - struct: pub::FacilitapayPaymentsResponse - struct: pub::OwnerCompany - struct: pub::BankInfo - struct: pub::BankAccountDetail - struct: pub::TransactionData - struct: pub::RefundData - struct: pub::FacilitapayRefundResponse - enum: pub::SubjectKycStatus - enum: pub::FacilitapayPaymentStatus **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Remove: - struct: pub::FacilitapayRouterData - struct: pub::FacilitapayPaymentsRequest - struct: pub::FacilitapayCard - impl: impl TryFrom<&FacilitapayRouterData<&PaymentsAuthorizeRouterData>> for PaymentMethodData::Card(req_card) Add: - function: private::from_auth_type - impl: impl TryFrom<&FacilitapayRouterData<&types::PaymentsAuthorizeRouterData>> for bank_transfer_data - impl: impl FacilitapayAuthRequest **crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::foreign_try_from - impl: impl ForeignTryFrom<String> for BrazilStatesAbbreviation **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_connector_customer_id **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"issue_number": 7732, "pr_number": 7704, "commits_count": 1, "files_changed": 30, "response_length": 4360, "file_count": 22, "needs_breakdown": true}
[FEATURE] Implement `ReverseLookupInterface` for `MockDb` Spin out from https://github.com/juspay/hyperswitch/issues/172. Please refer to that issue for more information.
<think> PR Context: - Title: feat(db): Implement `ReverseLookupInterface` for `MockDb` - Merged: 2023-09-12T09:53:45Z - Files changed: 4 files - Commits: 4 commits Implementation approach: Implement the missing implementation of `MockDb` for `ReverseLookup` Closes #1115 ## Description <!-- Describe your changes in detail --> ### 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: **Detailed Implementation:** **Commit 1:** feat(db): Implement `ReverseLookupInterface` for `MockDb` (#2119) Files to modify: **crates/diesel_models/src/reverse_lookup.rs** Add: - function: private::from - impl: impl From<ReverseLookupNew> for ReverseLookup **crates/router/src/db/reverse_lookup.rs** Modify existing code **crates/storage_impl/src/mock_db.rs** Modify existing code
{"issue_number": 1115, "pr_number": 2119, "commits_count": 1, "files_changed": 4, "response_length": 1146, "file_count": 5, "needs_breakdown": false}
feat(config): update vector config # Current Behaviour - Sdk logs pushes `publishable_key` in the `merchant_id` field. - open search logs have some irrelevant fields. # Proposed Changes - transform sdk logs and update the correct corresponding `merchant_id` of the pre-existing `publishable_key` value - add some more except/ignore fields in open search sinks.
<think> PR Context: - Title: feat(config): update vector config - Merged: 2024-11-05T07:38:03Z - Files changed: 1 files - Commits: 3 commits Implementation approach: ## Fixes #6364 ## Description <!-- Describe your changes in detail --> - adding a transform for `sdk` logs that fetches a value from an enrichment table `sdk_map` populated by file `sdk_map.csv` and updates the fields using this value. - adding some fields to ignore/except in `opensearch` lo </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6364, "pr_number": 6365, "commits_count": 0, "files_changed": 1, "response_length": 764, "file_count": 0, "needs_breakdown": false}
feat: Begin TOTP API There should be an API which should tell whether the TOTP for the user is set or not, if not, the API should respond back with TOTP secrets (url, recovery_codes and secret) which FE uses to help user to setup TOTP in their authenticator application. This API should work with the Decision manager and should be authenticated by the TOTP Single purpose token.
<think> PR Context: - Title: feat(users): Create `user_key_store` table and `begin_totp` API - Merged: 2024-05-08T13:10:09Z - Files changed: 30 files - Commits: 12 commits Implementation approach: ## Description <!-- Describe your changes in detail --> - This PR adds a new table `user_key_store`, which stores the encryption keys for the user's secrets. - A new API `begin_totp` has been added, which will check if the user has setup the TOTP or not, and respond with TOTP secret which user has </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): Create `user_key_store` table and `begin_totp` API (#4577) Co-authored-by: hyperswitch- Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::BeginTotpResponse - struct: pub::TotpSecret **crates/diesel_models/src/enums.rs** Add: - enum: pub::TotpStatus **crates/diesel_models/src/lib.rs** Add: - mod: pub::user_key_store **crates/diesel_models/src/query.rs** Add: - mod: pub::user_key_store **crates/diesel_models/src/query/user_key_store.rs** Add: - function: pub::insert - function: pub::find_by_user_id - impl: impl UserKeyStoreNew - impl: impl UserKeyStore **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/user.rs** Modify existing code **crates/diesel_models/src/user_key_store.rs** Add: - struct: pub::UserKeyStore - struct: pub::UserKeyStoreNew **crates/router/src/consts/user.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::begin_totp **crates/router/src/db.rs** Add: - mod: pub::user_key_store **crates/router/src/db/kafka_store.rs** Add: - function: private::insert_user_key_store - function: private::get_user_key_store_by_user_id - impl: impl UserKeyStoreInterface for KafkaStore **crates/router/src/db/user.rs** Modify existing code **crates/router/src/db/user_key_store.rs** Add: - function: private::insert_user_key_store - function: private::get_user_key_store_by_user_id - function: private::insert_user_key_store - function: private::get_user_key_store_by_user_id - trait: pub::UserKeyStoreInterface - impl: impl UserKeyStoreInterface for Store - impl: impl UserKeyStoreInterface 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::totp_begin **crates/router/src/types/domain.rs** Add: - mod: pub::user_key_store **crates/router/src/types/domain/user.rs** Add: - function: pub::get_or_create_key_store - function: pub::get_totp_status - function: pub::generate_new - function: pub::get_hashed - function: pub::into_inner - struct: pub::RecoveryCodes - impl: impl RecoveryCodes **crates/router/src/types/domain/user_key_store.rs** Add: - function: private::convert - function: private::convert_back - function: private::construct_new - struct: pub::UserKeyStore - impl: impl super::behaviour::Conversion for UserKeyStore **crates/router/src/utils/user.rs** Add: - function: pub::generate_default_totp **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/mock_db.rs** Modify existing code
{"issue_number": 4576, "pr_number": 4577, "commits_count": 1, "files_changed": 30, "response_length": 3667, "file_count": 26, "needs_breakdown": true}
[BUG]: connector request is being built twice ### Bug Description When a payment is confirmed, the `connector_request` log is being printed twice ### Expected Behavior It should be printed only once ### Actual Behavior Two instances of the log line can be found ### Steps To Reproduce - Create a payment with `confirm` = `true` - Search for log with `connector_request` tag ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? No ### 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: fix(core): do not construct request if it is already available - Merged: 2024-02-26T14:15:43Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR fixes the duplicate request that was being constructed even if the connector_request already exists. ## 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 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(core): do not construct request if it is already available (#3826) Files to modify: **crates/router/src/services/api.rs** Modify existing code
{"issue_number": 3799, "pr_number": 3826, "commits_count": 1, "files_changed": 1, "response_length": 945, "file_count": 3, "needs_breakdown": false}
[FEATURE] Extend the BatchSampleDataInterface Trait for Disputes ### Feature Description The issue is sub part of issue: #5991 We currently have a feature for generating sample data, which includes batch insertion of payments and refunds. The feature inserts payments and refunds in batches using the BatchSampleDataInterface trait. We need to extend this functionality to support batch insertion and deletion of disputes as well. Steps to Implement Batch Support for Disputes **Extend the BatchSampleDataInterface Trait** We need to extend the existing BatchSampleDataInterface to include methods for batch insertion and deletion of disputes. These methods will be similar to the ones already implemented for PaymentIntent, PaymentAttempt, and Refund. **New Methods for Disputes:** `insert_disputes_batch_for_sample_data`: This method will handle batch insertion of disputes. `delete_disputes_for_sample_data`: This method will handle (batch) deletion of disputes. ### Possible Implementation Add Functions for Dispute Insert and Delete in `BatchSampleDataInterface` - File: `crates/router/src/db/user/sample_data.rs` - Extend the existing BatchSampleDataInterface to include the methods for inserting and deleting disputes. Complete these interface functions for Store, Mock Db and Kafka like we did for other functions. Write Batch Insert and Delete Queries for Disputes - File: `crates/diesel_model/src/query/user/sample_data.rs` - Define the queries (using diesel) to handle batch insertion and deletion of disputes, similar to how they are handled for payments and refunds. To test we can hard code some dummy dispute and try inserting using the function we made in core. We can check Db and see the logs for the query that is getting printed. Steps for Testing Dispute Batch Insertion and Deletion - To verify the batch insertion and deletion of disputes using the functions implemented in the BatchSampleDataInterface, we can perform a simple test by hardcoding some dummy dispute data. - Once we have the dummy dispute data, we can use the `generate_sample_data_for_user` method from the core function to insert the disputes into the database. This should invoke the appropriate batch insertion logic. (Or we can make an api to test the behaviour when the function is invoked) Curl to invoke this core function: ``` curl --location 'http://localhost:8080/user/sample_data' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ }' ``` The JWT token we can get from signup and then skipping the 2FA: ``` curl --location 'http://localhost:8080/user/signup' \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "[email protected]", "password": "Test@321" }' ``` This will give an intermediate token in response, we need to use this token to skip 2FA ``` curl --location 'http://localhost:8080/user/2fa/terminate?skip_two_factor_auth=true' \ --header 'Authorization: Bearer Intermediatetoken' ``` This will give us JWT Token that we can use to hit the sample_data api Curl to delete sample data (The core function for sample dispute delete can be used to our advantage): ``` curl --location --request DELETE 'http://localhost:8080/user/sample_data' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ }' ``` - We can check Database Logs and Printed Queries whether the appropriate queries are getting printed - We can also manually check DB Note: Omit the Code for Testing part in the PR raised, have only Insert and Delete logic related to the DB, include the relevant logs and screenshots after test. The Sample disputes generation part, we will be handling in the separate PR. (#6117 ) ### 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(sample_data): extend the batch sample data interface trait for disputes - Merged: 2024-10-16T07:09:02Z - Files changed: 4 files - Commits: 22 commits Implementation approach: ## Description <!-- Describe your changes in detail --> I've extended the interface for `BatchSampleDataInterface` to with `insert_disputes_batch_for_sample_data` and `delete_disputes_for_sample_data`, and added implementation to all structs implementing this trait. I've also modified `generate_sam </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(sample_data): extend the batch sample data interface trait for disputes (#6293) Files to modify: **crates/diesel_models/src/query/user/sample_data.rs** Add: - function: pub::insert_disputes - function: pub::delete_disputes **crates/router/src/db/kafka_store.rs** Add: - function: private::insert_disputes_batch_for_sample_data - function: private::delete_disputes_for_sample_data **crates/router/src/db/user/sample_data.rs** Add: - function: private::insert_disputes_batch_for_sample_data - function: private::delete_disputes_for_sample_data - function: private::insert_disputes_batch_for_sample_data - function: private::delete_disputes_for_sample_data **crates/router/src/services/kafka.rs** Add: - function: pub::log_dispute_delete
{"issue_number": 6111, "pr_number": 6293, "commits_count": 1, "files_changed": 4, "response_length": 1598, "file_count": 6, "needs_breakdown": false}
[FEATURE] Implement `EventInterface` for `MockDb` Spin out from https://github.com/juspay/hyperswitch/issues/172. Please refer to that issue for more information.
<think> PR Context: - Title: feat(db): implement `EventInterface` for `MockDb` - Merged: 2023-05-31T15:21:48Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## 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 c </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(db): implement `EventInterface` for `MockDb` (#1289) Co-authored-by: Pavlo Kushneryk <pavlo.ku Files to modify: **crates/router/src/db.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code
{"issue_number": 1116, "pr_number": 1289, "commits_count": 1, "files_changed": 2, "response_length": 1013, "file_count": 4, "needs_breakdown": false}
[FEATURE]: [Payeezy] 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): [Payeezy] Currency Unit Conversion - Merged: 2023-11-05T13:36:23Z - Files changed: 2 files - Commits: 30 commits Implementation approach: ## 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): [Payeezy] Currency Unit Conversion (#2710) Co-authored-by: Swangi Kumari <85639103+ Files to modify: **crates/router/src/connector/payeezy.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/payeezy/transformers.rs** Add: - function: private::try_from - struct: pub::PayeezyRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for PayeezyRouterData<T>
{"issue_number": 2241, "pr_number": 2710, "commits_count": 1, "files_changed": 2, "response_length": 1291, "file_count": 4, "needs_breakdown": false}
fix(middleware): include `x-request-id` header in `access-control-expose-headers` header value ## 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 --> This PR fixes a bug where `x-request-id` was not being included in the `access-control-expose-headers` header. The solution is to register the request ID middleware before the CORS middleware. ## 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). --> Bugfix. ## 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)? --> Before: ```shell $ curl -i http://localhost:8080/health [...] access-control-expose-headers: via, strict-transport-security [...] ``` After: ```shell $ curl -i http://localhost:8080/health [...] access-control-expose-headers: x-request-id, via, strict-transport-security [...] ``` ## 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: fix(cors): expose all headers set by application in `access-control-expose-headers` header value - Merged: 2024-12-24T07:04:04Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR exposes all headers set by the application in the `access-control-expose-headers` header value. This should thus allow our headers like `x-request-id` to be accessed by the browser. ## Motivation and Context <!-- Why is this cha </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(cors): expose all headers set by application in `access-control-expose-headers` header value (#6 Files to modify: **crates/router/src/cors.rs** Modify existing code
{"issue_number": 1673, "pr_number": 6877, "commits_count": 1, "files_changed": 1, "response_length": 1001, "file_count": 3, "needs_breakdown": false}
[FEATURE] Payment void endpoint for v2 ### Feature Description Add support for Payment Cancel in V2. ### Possible Implementation Add V2 payments_cancel flow by completing GetTracker, UpdateTracker, and Domain traits for payment cancel endpoint. ### 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(router): Add v2 payment cancellation flow - Merged: 2025-09-22T18:39:33Z - Files changed: 17 files - Commits: 14 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Add V2 payments_cancel flow by endpoint `{{baseUrl}}/v2/payments/:payment_id/cancel`.A payment can be cancelled when the status is RequiresCapture, PartiallyAuthorizedAndRequiresCapture, or PartiallyCapturedAndCapturable. ### Additional Cha </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): Add v2 payment cancellation flow (#9083) Co-authored-by: hyperswitch-bot[bot] <1485255 Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiEventMetric for payments::PaymentsCancelRequest - impl: impl ApiEventMetric for payments::PaymentsCancelResponse **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentsCancelRequest - struct: pub::PaymentsCancelResponse **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Add: - struct: pub::PaymentCancelData **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Add: - function: private::get_payment_intent_update - function: private::get_payment_attempt_update - function: private::get_amount_capturable - function: private::get_captured_amount - function: private::get_attempt_status_for_db_update - impl: impl TrackerPostUpdateObjects< router_flow_types::Void, router_request_types::PaymentsCancelData, payments::PaymentCancelData<router_flow_types::Void>, > for RouterData< router_flow_types::Void, router_request_types::PaymentsCancelData, router_response_types::PaymentsResponseData, > **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::set_cancellation_reason - function: private::get_payment_attempt - function: private::list_payments_attempts - function: private::get_client_secret - function: private::get_payment_intent - function: private::get_merchant_connector_details - function: private::get_payment_method_info - function: private::get_payment_method_token - function: private::get_mandate_id - function: private::get_address - function: private::get_creds_identifier - function: private::get_token - function: private::get_multiple_capture_data - function: private::get_payment_link_data - function: private::get_ephemeral_key - function: private::get_setup_mandate - function: private::get_poll_config - function: private::get_authentication - function: private::get_frm_message - function: private::get_refunds - function: private::get_disputes - function: private::get_authorizations - function: private::get_attempts - function: private::get_recurring_details - function: private::get_payment_intent_profile_id - function: private::get_currency - function: private::get_amount - function: private::get_payment_attempt_connector - function: private::get_merchant_connector_id_in_attempt - function: private::get_connector_customer_id - function: private::get_billing_address - function: private::get_payment_method_data - function: private::get_sessions_token - function: private::get_token_data - function: private::get_mandate_connector - function: private::get_force_sync - function: private::get_capture_method - function: private::get_optional_payment_attempt - function: private::get_pre_routing_result - function: private::get_optional_external_vault_session_details - function: private::set_payment_intent - function: private::set_client_secret - function: private::set_payment_attempt - function: private::set_payment_method_data - function: private::set_payment_method_token - function: private::set_email_if_not_present - function: private::set_payment_method_id_in_attempt - function: private::set_pm_token - function: private::set_connector_customer_id - function: private::push_sessions_token - function: private::set_surcharge_details - function: private::set_merchant_connector_id_in_attempt - function: private::set_card_network - function: private::set_co_badged_card_data - function: private::set_frm_message - function: private::set_payment_intent_status - function: private::set_authentication_type_in_attempt - function: private::set_recurring_mandate_payment_data - function: private::set_mandate_id - function: private::set_setup_future_usage_in_payment_intent - function: private::set_prerouting_algorithm_in_payment_intent - function: private::set_connector_in_payment_attempt - function: private::set_connector_request_reference_id - function: private::set_connector_response_reference_id - function: private::set_vault_session_details - function: private::set_routing_approach_in_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_cancellation_reason - impl: impl OperationSessionGetters<F> for PaymentCancelData<F> - impl: impl OperationSessionSetters<F> for PaymentCancelData<F> **crates/router/src/core/payments/flows/cancel_flow.rs** Remove: - function: private::construct_router_data Add: - function: private::construct_router_data - impl: impl ConstructFlowSpecificData<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for hyperswitch_domain_models::payments::PaymentCancelData<api::Void> **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_cancel_v2 **crates/router/src/core/payments/operations/payment_cancel_v2.rs** Add: - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::validate_request - function: private::get_trackers - function: private::update_trackers - function: private::get_customer_details - function: private::make_pm_data - function: private::perform_routing - function: private::validate_status_for_operation - struct: pub::PaymentsCancel - impl: impl Operation<F, api::PaymentsCancelRequest> for &PaymentsCancel - impl: impl Operation<F, api::PaymentsCancelRequest> for PaymentsCancel - impl: impl ValidateRequest< F, api::PaymentsCancelRequest, hyperswitch_domain_models::payments::PaymentCancelData<F>, > for PaymentsCancel - impl: impl GetTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, api::PaymentsCancelRequest, > for PaymentsCancel - impl: impl UpdateTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, api::PaymentsCancelRequest, > for PaymentsCancel - impl: impl Domain<F, api::PaymentsCancelRequest, hyperswitch_domain_models::payments::PaymentCancelData<F>> for PaymentsCancel - impl: impl ValidateStatusForOperation for PaymentsCancel **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::to_post_update_tracker - function: private::update_tracker - impl: impl Operation<F, types::PaymentsCancelData> for PaymentResponse - impl: impl PostUpdateTracker< F, hyperswitch_domain_models::payments::PaymentCancelData<F>, types::PaymentsCancelData, > for PaymentResponse **crates/router/src/core/payments/transformers.rs** Add: - function: pub::construct_cancel_router_data_v2 - function: pub::construct_router_data_for_cancel - function: private::generate_response - impl: impl GenerateResponse<api_models::payments::PaymentsCancelResponse> for hyperswitch_domain_models::payments::PaymentCancelData<F> **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_cancel
{"issue_number": 9082, "pr_number": 9083, "commits_count": 1, "files_changed": 17, "response_length": 9004, "file_count": 18, "needs_breakdown": true}
Adding Contributors Guide to the Readme of the repository Being an open source project, we look forward to contributors from across the world. For that we have outlined few changes which will make it easier for contributors to navigate through the project with more ease, and quickly develop a better understanding of the working of different components of Hyperswitch.
<think> PR Context: - Title: docs: upload new logos - Merged: 2024-10-18T14:34:22Z - Files changed: 5 files - Commits: 9 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Closes - #5175 ### 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 c </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 5175, "pr_number": 6368, "commits_count": 0, "files_changed": 5, "response_length": 752, "file_count": 0, "needs_breakdown": false}
fix(payments): remove time range filter from payment attempt We don't need time range filters since created at is not indexed in payments attempts, we are already getting filtered payments intents and using its active attempt ids. It is further slowing down 'IN' query performance.
<think> PR Context: - Title: fix(payments_list): remove time range to filter payments attempts - Merged: 2024-09-30T15:02:13Z - Files changed: 6 files - Commits: 1 commits Implementation approach: ## Description Currently `created_at` is not indexed in payment attempt table, when applying filtering with active attempt ids. We are adding extra overhead of checking time_range, though we need not to as we will be already getting filtered attempt ids from intent table. ### Additional Changes </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments_list): remove time range to filter payments attempts (#6159) Files to modify: **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/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"issue_number": 6160, "pr_number": 6159, "commits_count": 1, "files_changed": 6, "response_length": 1346, "file_count": 8, "needs_breakdown": false}
refactor: [Noon] add new field max_amount to mandate request ## 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 #3445 _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 CIT with noon with ``` "connector_metadata": { "noon": { "order_category": "pay" } } ``` <img width="898" alt="Screenshot 2024-01-12 at 2 16 26 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/4b99d41c-7d91-4e5c-b60c-b1d45b5f2e19"> </n> without order_category it should throw an error <img width="637" alt="Screenshot 2024-01-12 at 2 16 44 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/24bffbaf-3699-4173-af78-ef432d82d1fe"> 2. Make a MIT <img width="675" alt="Screenshot 2024-01-12 at 2 02 35 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/8d913c5f-cab0-436b-ad1d-8a0b3625f620"> 3.Test through stripe compatibility layer CIT <img width="1233" alt="Screenshot 2024-02-06 at 7 11 36 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/5015ae7f-36e4-4c71-8bc4-9674907bd9bc"> MIT <img width="746" alt="Screenshot 2024-02-06 at 7 11 30 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/fd77df4f-9515-4979-8b5c-0da66ec3a57f"> MIT with greater amount <img width="875" alt="Screenshot 2024-02-06 at 7 11 19 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/366291ed-0e86-41c8-a247-6be25b7f2b6f"> 4.Test Applepay mandates ## 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: [Noon] add new field max_amount to mandate request - Merged: 2024-02-08T09:24:08Z - Files changed: 2 files - Commits: 2 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Resolves #3445 Original PR: #3481 _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 CIT with noon with ``` "connecto </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: [Noon] add new field max_amount to mandate request (#3591) Files to modify: **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/connector/noon/transformers.rs** Modify existing code
{"issue_number": 3481, "pr_number": 3591, "commits_count": 1, "files_changed": 2, "response_length": 1048, "file_count": 4, "needs_breakdown": false}
[BUG] remove redundant DB calls when FRM feature is not enabled ### Bug Description FRM is a payment feature which is integrated in HyperSwitch behind `frm` feature flag. There are some DB queries (which are generally not behind a feature flag) which are being executed even when `frm` feature is disabled. ### Expected Behavior Underlying DB queries should be executed only when the feature which requires it is enabled. In this case, FRM DB queries should be executed only when `frm` is enabled ### Actual Behavior FRM DB queries are being executed regardless of `frm` feature flag ### Steps To Reproduce --- ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? Yes/No If yes, please provide the value of the `x-request-id` response header to help 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 --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: fix(frm): add feature flag for querying FRM data - Merged: 2024-09-17T11:24:17Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Description Described in #5888 ### 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 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(frm): add feature flag for querying FRM data (#5889) Files to modify: **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code
{"issue_number": 5888, "pr_number": 5889, "commits_count": 1, "files_changed": 3, "response_length": 1123, "file_count": 5, "needs_breakdown": false}
feat(router): Unify Auth in single layer (V2) In-efficiency in design * Currently we have many types of auth and auth is evaluated in multiple places, with multiple ways. * This indeed required multiple approaches and solution needs to be maintained * More cognitive load * We can’t authenticate a request in one infra component/layer Unify Auth in single layer * Make Authentication header like, * authorization: key=value, keyN=valueN * Examples: * authorization: api-key=<api-key> * authorization: publishable-key=<publishable-key>, client-secret=<client-secret> * authorization: publishable-key=<publishable-key>, ephemeral-key=<ephemeral-key> * authorization: jwt=<jwt-token> * Lineage also should be added in headers, when we can’t inferable from authorization * `profile_id` should be added in headers not in body * If `api-key` not passed or the passed `api-key` has different scope, then `merchant-id` also should be passed.
<think> PR Context: - Title: feat(router): [V2] Introduce V2Auth and use it for payment_methods_list_enabled - Merged: 2025-01-31T08:37:18Z - Files changed: 30 files - Commits: 11 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Added an enum `V2Auth` (name subject to change) to encapsulate different authentication scenarios. Currently only works for Client Authentication using `publishable_key` and `ephemeral_key` in `Authorization` header ### Additional Changes </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): [V2] Introduce V2Auth and use it for payment_methods_list_enabled (#7038) Co-authored- Files to modify: **crates/api_models/src/ephemeral_key.rs** Remove: - struct: pub::EphemeralKeyCreateRequest Add: - struct: pub::ClientSecretCreateRequest - enum: pub::ResourceId **crates/api_models/src/events/payment.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/webhooks.rs** Modify existing code **crates/common_utils/src/events.rs** Modify existing code **crates/common_utils/src/id_type.rs** Remove: - mod: private::ephemeral_key Add: - mod: private::client_secret **crates/common_utils/src/id_type/client_secret.rs** Add: - function: private::get_api_event_type - function: pub::generate_redis_key - impl: impl crate::events::ApiEventMetric for ClientSecretId - impl: impl ClientSecretId **crates/common_utils/src/id_type/ephemeral_key.rs** Remove: - function: private::get_api_event_type - function: pub::generate_redis_key - impl: impl crate::events::ApiEventMetric for EphemeralKeyId - impl: impl EphemeralKeyId **crates/common_utils/src/id_type/global_id/payment_methods.rs** Modify existing code **crates/diesel_models/src/ephemeral_key.rs** Remove: - struct: pub::EphemeralKeyTypeNew - enum: pub::ResourceType Add: - function: pub::to_str - struct: pub::ClientSecretTypeNew - enum: pub::ResourceId - impl: impl ResourceId **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Remove: - function: pub::payment_method_intent_confirm **crates/router/src/core/payment_methods/transformers.rs** Add: - impl: impl transformers::ForeignFrom<( hyperswitch_domain_models::payment_methods::PaymentMethodsSession, Secret<String>, )> for (session, client_secret) **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/db.rs** Modify existing code **crates/router/src/db/ephemeral_key.rs** Remove: - function: private::get_ephemeral_key - function: private::delete_ephemeral_key - function: private::create_ephemeral_key - function: private::get_ephemeral_key Add: - function: private::get_ephemeral_key - function: private::delete_ephemeral_key - function: private::delete_client_secret - function: private::create_client_secret - function: private::get_client_secret - trait: pub::ClientSecretInterface **crates/router/src/db/kafka_store.rs** Remove: - function: private::create_ephemeral_key - function: private::get_ephemeral_key Add: - function: private::create_client_secret - function: private::get_client_secret **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/customers.rs** Modify existing code **crates/router/src/routes/ephemeral_key.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Remove: - function: pub::confirm_payment_method_intent_api **crates/router/src/services/authentication.rs** Remove: - function: private::authenticate_and_fetch - function: pub::is_ephemeral_or_publishible_auth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for EphemeralKeyAuth Add: - function: pub::get_auth_string_from_header - function: private::authenticate_and_fetch - function: private::authenticate_and_fetch - enum: pub::V2Auth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for V2Auth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for Vec<V2Auth> **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/storage/ephemeral_key.rs** Modify existing code
{"issue_number": 7037, "pr_number": 7038, "commits_count": 1, "files_changed": 30, "response_length": 4938, "file_count": 31, "needs_breakdown": true}
[CHORE] Bump Cypress Dependencies Current versions are outdated. <img width="469" height="327" alt="Image" src="https://github.com/user-attachments/assets/507dfa9e-754c-4cb5-9f86-41558769f513" />
<think> PR Context: - Title: chore: update devDependencies for cypress - Merged: 2025-07-28T07:44:58Z - Files changed: 3 files - Commits: 6 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR bumps Cypress and its dependencies to its latest versions. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 8736, "pr_number": 8735, "commits_count": 0, "files_changed": 3, "response_length": 771, "file_count": 0, "needs_breakdown": false}
[FEATURE] :(hotfix) 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-01T13:53:46Z - Files changed: 10 files - Commits: 1 commits Implementation approach: ## 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 (#3916) 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": 3917, "pr_number": 3916, "commits_count": 1, "files_changed": 10, "response_length": 1429, "file_count": 9, "needs_breakdown": false}
[chore]: use crates.io version of async-bb8-diesel crate Currently we are using a [forked](https://github.com/jarnura/async-bb8-diesel) version of this dependency. We need to migrate to the crates.io version
<think> PR Context: - Title: chore: Move async-bb8-diesel crate to crates.io version - Merged: 2025-05-15T12:05:55Z - Files changed: 5 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Changed `async-bb8-diesel crate from custom [fork](https://github.com/jarnura/async-bb8-diesel) to crates.io [version](https://github.com/oxidecomputer/async-bb8-diesel) ### Additional Changes - [ ] This PR modifies the API contract - [ </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 8026, "pr_number": 8028, "commits_count": 0, "files_changed": 5, "response_length": 785, "file_count": 0, "needs_breakdown": false}
[FEATURE]: [Noon] 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): [Noon] Use connector_response_reference_id as reference - Merged: 2023-10-04T17:45:59Z - Files changed: 1 files - Commits: 5 commits Implementation approach: ## Description I have added `reference` that's sent to noon payments order to the `TransactionResponse` in `transformer.rs` of noon that's present in the `connector` directory. https://github.com/juspay/hyperswitch/blob/main/crates/router/src/connector/noon/transformers.rs ## Motivation an </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Noon] Use connector_response_reference_id as reference (#2442) Files to modify: **crates/router/src/connector/noon/transformers.rs** Modify existing code
{"issue_number": 2339, "pr_number": 2442, "commits_count": 1, "files_changed": 1, "response_length": 980, "file_count": 3, "needs_breakdown": false}
[FEATURE]: [IataPay] 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): [Iatapay] currency unit conversion - Merged: 2023-10-31T11:53:49Z - Files changed: 2 files - Commits: 10 commits Implementation approach: ## Description - Addresses issue #2229 - Modified the files `hyperswitch/crates/router/src/connector/iatapay/transformers.rs` and `hyperswitch/crates/router/src/connector/iatapay.rs` - Rebased with most recent changes ### Additional Changes - [ ] This PR modifies the API contract - [ ] </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Iatapay] currency unit conversion (#2592) Co-authored-by: SamraatBansal <55536657+ Files to modify: **crates/router/src/connector/iatapay.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/iatapay/transformers.rs** Add: - function: private::try_from - struct: pub::IatapayRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for IatapayRouterData<T> **Commit 2:** feat(connector): [Iatapay] currency unit conversion (#2592) Co-authored-by: SamraatBansal <55536657+ Files to modify: **crates/router/src/connector/iatapay.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/iatapay/transformers.rs** Add: - function: private::try_from - struct: pub::IatapayRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for IatapayRouterData<T>
{"issue_number": 2229, "pr_number": 2592, "commits_count": 2, "files_changed": 2, "response_length": 1813, "file_count": 7, "needs_breakdown": false}
[FEATURE] add payment method filter in v2 ### Feature Description List all the available currencies and countries for the given connector and payment method type. ### Possible Implementation Add the filter route to the V2 PaymentMethods implementation. ### 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(payment_methods): add payment-methods/filter endpoint to list countries and currencies for connector payment method in v2 - Merged: 2025-08-22T13:26:14Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Add the payment method filter route to the V2 PaymentMethods implementation which list all available countries and currencies based on connector and payment method type. ### Additional Changes - [X] This PR modifies the API contract - </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payment_methods): add payment-methods/filter endpoint to list countries and currencies for conn Files to modify: **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::list_countries_currencies_for_connector_payment_method
{"issue_number": 8977, "pr_number": 8978, "commits_count": 1, "files_changed": 2, "response_length": 1169, "file_count": 4, "needs_breakdown": false}
fix(connector): [Trustpay] add merchant_id in gpay session response for trustpay ## 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 --> add merchant_id in gpay session response for trustpay ### 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)? --> test cases - make a gpay payment for trustpay (in gpay session response, merchant_id should be present). testing of this pr can only be done in prod since this issue was only in prod. Couldn't test in local. ## 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] add merchant_id in gpay session response for trustpay - Merged: 2024-02-02T09:40:03Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> add merchant_id in gpay session response for trustpay PR merged in main - #3471 ### 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(connector): [Trustpay] add merchant_id in gpay session response for trustpay (#3532) Files to modify: **crates/router/src/connector/trustpay/transformers.rs** Modify existing code
{"issue_number": 3471, "pr_number": 3532, "commits_count": 1, "files_changed": 1, "response_length": 1000, "file_count": 3, "needs_breakdown": false}
feat(disputes): support filters in disputes list Support filters in disputes list - Get list of filters to be applied on disputes list - It can be multi-select for options like status and connector - `get` api to be used to pass filters which to be applied on list API - Implement parsing logic for get api, (to be used by other get filter APIs as well) Filters: - Date (Timerange) - Status - Payment id or Dispute id search - Amount - Currency - Connector
<think> PR Context: - Title: feat(disputes): add filters for disputes list - Merged: 2024-09-22T18:35:30Z - Files changed: 14 files - Commits: 25 commits Implementation approach: ## Description Add filters for disputes list ### 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. Fol </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(disputes): add filters for disputes list (#5637) Co-authored-by: hyperswitch-bot[bot] <14852550 Files to modify: **crates/api_models/src/disputes.rs** Remove: - struct: pub::DisputeListConstraints Add: - struct: pub::DisputeListGetConstraints - struct: pub::DisputeListFilters **crates/api_models/src/events.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for DisputeListFilters **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_domain_models/src/disputes.rs** Add: - function: private::try_from - struct: pub::DisputeListConstraints - impl: impl TryFrom<( api_models::disputes::DisputeListGetConstraints, Option<Vec<common_utils::id_type::ProfileId>>, )> for DisputeListConstraints **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::disputes **crates/router/src/core/disputes.rs** Remove: - mod: pub::transformers Add: - function: pub::get_filters_for_disputes - mod: pub::transformers **crates/router/src/db/dispute.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/disputes.rs** Add: - function: pub::get_disputes_filters - function: pub::get_disputes_filters_profile **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/refunds.rs** Modify existing code **crates/router/src/types/storage/dispute.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 5626, "pr_number": 5637, "commits_count": 1, "files_changed": 14, "response_length": 2428, "file_count": 16, "needs_breakdown": true}
fix(invite): set user status to invitation sent if a registered user is invited
<think> PR Context: - Title: feat(invite_multiple): Set status of user as `InvitationSent` if `email` feature flag is enabled - Merged: 2024-02-21T14:52:33Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR will set the status of the user who has been invited but already registered with Hyperswitch as InvitationSent ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] Th </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(invite_multiple): Set status of user as `InvitationSent` if `email` feature flag is enabled (#3 Files to modify: **crates/router/src/core/user.rs** Modify existing code
{"issue_number": 3756, "pr_number": 3757, "commits_count": 1, "files_changed": 1, "response_length": 1006, "file_count": 3, "needs_breakdown": false}
[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(cypress-test): include worldpay's request / response structure for test suite - Merged: 2024-10-30T10:11:29Z - Files changed: 9 files - Commits: 6 commits Implementation approach: ## Description Described in #6316 point # 4 (read comments) ### 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 correspondin </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6316, "pr_number": 6420, "commits_count": 0, "files_changed": 9, "response_length": 812, "file_count": 0, "needs_breakdown": false}
[FEATURE]: [Shift4] Use `connector_request_reference_id` as reference to the connector ### :memo: Feature Description - We transmit our reference id from Hyperswitch to the connector, enabling merchants to subsequently locate the payment within the connector dashboard. - Presently, there is a lack of uniformity in this process, as some implementations employ `payment_id` while others utilize `attempt_id`. - This inconsistency arises from the fact that `payment_id` and `attempt_id` correspond to two distinct entities within our system. ### :hammer: Possible Implementation - To mitigate this confusion, we've introduced a new field called `connector_request_reference_id` in our RouterData. - This id should replace them as a reference id to the connector for payment request. - One might need to have exposure to api docs of the connector for which it is being implemented. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2052 :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): Use connector_response_reference_id for Shift4 - Merged: 2023-10-21T12:33:01Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> fixes #2316 ### 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 co </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): Use connector_response_reference_id for Shift4 (#2492) Co-authored-by: Dmytro Files to modify: **crates/router/src/connector/shift4/transformers.rs** Modify existing code
{"issue_number": 2316, "pr_number": 2492, "commits_count": 1, "files_changed": 1, "response_length": 998, "file_count": 3, "needs_breakdown": false}
fix : update payment with PM and PMD giving requires_payment_method instead of requires_confirmation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> Creating a payment with confirm false and no payment method and payment method data, it gives requires_payment_method. After updating the payment with payment method and payment method data, the status was requires_payment_method now it is fixed to requires_confirmation as confirm was false. ## 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). --> Fixed the payment status ## 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)? --> Manual <img width="1232" alt="Screenshot 2023-01-22 at 2 07 07 PM" src="https://user-images.githubusercontent.com/59434228/213907279-72a663e5-ba39-4b35-a79a-d792a359f9aa.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
<think> PR Context: - Title: Release v0.2.1 - Merged: 2023-02-20T08:26:27Z - Files changed: 22 files - Commits: 19 commits Implementation approach: ### Release v0.2.1 #### Addresses some of the bug fixes we found in testing - fix payment_status not updated when adding payment method ([#446]) - Decide connector only when the payment method is confirm ([10ea4919ba07d3198a6bbe3f3d4d817a23605924](https://github.com/juspay/hyperswitch/commit/10ea4919ba07d3198a6bbe3f3d4d817a23605924)) - Fix panics caused with empty diesel updates ([448595498114cd15158b4a78fc32d8e6dc1b67ee](https://github.com/juspay/hyperswitch/commit/448595498114cd15158b4a7 </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 446, "pr_number": 611, "commits_count": 0, "files_changed": 22, "response_length": 746, "file_count": 0, "needs_breakdown": false}
fix(users): Accepting invite for org_admins Currently, when email feature flag is enabled and invite a org_admin, it throws error saying `InvalidRoleId`. When we try to accept invite for `org_admin`s, it again throws `InvalidRoleId`. This should not be the case, error should not be throws and invite should be accepted.
<think> PR Context: - Title: fix(users): Allow accepting invites for `org_admin`s - Merged: 2024-10-08T11:43:23Z - Files changed: 6 files - Commits: 4 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Currently accepting invites for org_admin will not work. This PR fixes it. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/envir </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(users): Allow accepting invites for `org_admin`s (#6253) Files to modify: **crates/diesel_models/src/query/user_role.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/utils/user_role.rs** Modify existing code
{"issue_number": 6254, "pr_number": 6253, "commits_count": 1, "files_changed": 6, "response_length": 1249, "file_count": 8, "needs_breakdown": false}
[FEATURE]: Add support for updating elimination config ### Feature Description Add a new route for updating elimination config in the database when it is toggled. ### Possible Implementation Add a new route for updating elimination config in the database when it is toggled. ### 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(routing): Add support to update config for elimination routing - Merged: 2025-05-12T16:26:29Z - Files changed: 5 files - Commits: 8 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Add a new route for updating the elimination routing config when it is toggled ### Additional Changes - [x] 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: **Detailed Implementation:** **Commit 1:** feat(routing): Add support to update config for elimination routing (#7938) Co-authored-by: Spriti A Files to modify: **crates/api_models/src/events/routing.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for EliminationRoutingPayloadWrapper **crates/api_models/src/routing.rs** Add: - function: pub::update - function: pub::update - struct: pub::EliminationRoutingPayloadWrapper - impl: impl EliminationAnalyserConfig - impl: impl EliminationRoutingConfig **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/routing.rs** Add: - function: pub::elimination_routing_update_configs
{"issue_number": 7939, "pr_number": 7938, "commits_count": 1, "files_changed": 5, "response_length": 1547, "file_count": 7, "needs_breakdown": false}
[FEATURE] add domain type for client secret ### Feature Description Create domain type for client secret ### Possible Implementation Make type `ClietSecret(String)` and use it wherever applicable ### 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: fix(payments): fix client secret parsing - Merged: 2023-06-21T07:20:53Z - Files changed: 1 files - Commits: 6 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Client secret parsing logic could create bugs changed it to avoid them. Ideally , it will be good to pass payment_id everywhere and ask for payment_id in the request wherever applicable and never extract payment_id from client_secret. To </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments): fix client secret parsing (#1358) Files to modify: **crates/router/src/core/payments/helpers.rs** Add: - function: private::test_client_secret_parse - mod: private::test
{"issue_number": 1357, "pr_number": 1358, "commits_count": 1, "files_changed": 1, "response_length": 969, "file_count": 3, "needs_breakdown": false}
feat: add support to verify using recovery code Create a new endpoint that adds, - support to verify 2FA with recovery code - the provided recovery code can be used only once - then verification can be done with the remaining recovery codes only next time ( there are total 8 set of recovery codes that are being generated when configuring 2FA)
<think> PR Context: - Title: feat(users): add support to verify 2FA using recovery code - Merged: 2024-05-23T13:56:26Z - Files changed: 20 files - Commits: 12 commits Implementation approach: ## Description The PR adds support to verify 2FA using recovery code, in case TOTP is lost ### Additional Changes - [x] 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(users): add support to verify 2FA using recovery code (#4737) Co-authored-by: hyperswitch-bot[b Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::VerifyRecoveryCodeRequest **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/consts/user.rs** Modify existing code **crates/router/src/core/errors/user.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::verify_recovery_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::verify_recovery_code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/utils/user/password.rs** Add: - function: pub::get_index_for_correct_recovery_code **crates/router/src/utils/user/two_factor_auth.rs** Add: - function: pub::insert_recovery_code_in_redis **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 4736, "pr_number": 4737, "commits_count": 1, "files_changed": 20, "response_length": 1909, "file_count": 15, "needs_breakdown": false}
feat(events): add APIs to list webhook events and webhook delivery attempts ## 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 introduces two API endpoints, one to list (and filter) webhook events and one to list webhook delivery attempts: 1. Events List: - URL: `/events/{merchant_id}` - Authentication: Admin API authentication + JWT - The endpoint returns the list of events without the request and response information. - Optionally, filtering can be performed by the query parameters: - `object_id`: Primary object ID (such as payment ID, refund ID, mandate ID, dispute ID) used to filter events related to that object. - `limit` - `offset` - `created_after`, `created_before`: Specify date and time range to include events from. 2. Webhook Delivery Attempts List - URL: `/events/{merchant_id}/{initial_event_id}/attempts` - Authentication: Admin API authentication + JWT - The endpoint returns the delivery attempts for the specified initial event, and includes the request and response information (request and response bodies are strings). This PR includes the following changes: 1. Queries on the `events` table now include the `merchant_id` field everywhere. 2. Introduces APIs to list and filter initial events, and to list delivery webhook delivery attempts for a specified event. 3. OpenAPI specification additions for the newly introduced endpoints. 4. Database migrations to add indexes on the columns on the `events` table that would be queried by the newly introduced endpoints. 5. Adds a `delivery_attempt` column to the `events` table to indicate the type of delivery attempt for the webhook. In addition this PR has a few changes not directly related to the PR: - Fixes a typo: rename `EncryptionStratergy` to `EncryptionStrategy`. - Removes some unused and commented code in the `ext_traits` module. - Replaces unnecessary `attach_printable_lazy()` calls in the `generics` module with `attach_printable()`. - Bumps the `utoipa` dependency from version `3.3.0` to `3.5.0` and enables the `preserve_path_order` feature flag. - Moves around a couple of routes in the OpenAPI specification, and updates their tags to group them better. The PR can easily be reviewed one commit at a time. ### Known Issues The above endpoints can be used to retrieve information on events created by the application versions newer than `2024.03.15.0`, since events are now queried with the merchant ID, and the merchant ID field is populated in the database table starting version `2024.03.15.0`. The application will throw an internal server error when older events are being retrieved. ### 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. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> The database migrations for this PR can be found in the [`up.sql`](https://github.com/juspay/hyperswitch/blob/b9ecde6be9dc047aa6dc30d67a3870d5a88d3060/migrations/2024-03-16-170320_add_events_indexes/up.sql) and [`down.sql`](https://github.com/juspay/hyperswitch/blob/b9ecde6be9dc047aa6dc30d67a3870d5a88d3060/migrations/2024-03-16-170320_add_events_indexes/down.sql) files. ## 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). --> These endpoints would better allow users to view the recently delivered webhooks and debug issues with webhook deliveries to their application servers. ## 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)? --> 1. Ensuring that the `delivery_attempt` field is being populated correctly in the `events` table for initial attempt and automatic retries via the scheduler: This can be verified using a SQL query like so: ```sql SELECT event_id, is_webhook_notified, primary_object_id, created_at, idempotent_event_id, initial_attempt_id, delivery_attempt FROM events WHERE initial_attempt_id = 'evt_018e562fcd4571b0b831098bb9ebe230' ORDER BY created_at DESC; ``` ![Screenshot of delivery_attempt field being populated in the events table](https://github.com/juspay/hyperswitch/assets/22217505/60e176cd-7818-4b7b-b0ce-5bea2de2c747) 2. Listing events related to a specific object (say payment intent, refund, dispute): ```shell curl -H 'api-key: {{admin_api_key}}' '{{baseUrl}}/events/{{merchant_id}}?object_id={{payment_id}}' ``` You should see a response like so, with events sorted in descending order of creation: ```shell $ curl -H 'api-key: test_admin' 'http://localhost:8080/events/merchant_1710609960?object_id=pay_9uclJXQboJ0FZPm9Nq2K' 2>/dev/null | jq '.' [ { "event_id": "evt_018e484cb6207265a1c715568f889590", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_9uclJXQboJ0FZPm9Nq2K", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_018e484cb6207265a1c715568f889590", "created": "2024-03-16T17:26:10.720Z" } ] ``` 3. Listing and filtering events based on time range: ```shell curl -H 'api-key: {{admin_api_key}}' '{{baseUrl}}/events/{{merchant_id}}?created_after={{fromTimestamp}}&created_before={{toTimestamp}}&limit={{limit}}&offset={{offset}}' ``` - All query parameters `created_after`, `created_before`, `limit` and `offset` are optional, and one or more of them may be specified together. - `created_after`, `created_before`, `limit` and `offset` cannot be specified if `object_id` is specified, the application throws a bad request error in this case. 1. Specifying all query params: ```shell $ curl -H 'api-key: test_admin' 'http://localhost:8080/events/merchant_1710609960?created_after=2024-03-18T09:00Z&created_before=2024-03-18T11:00Z&limit=2&offset=2' 2>/dev/null | jq '.' [ { "event_id": "evt_018e50da61a674d6bdbd7150775087f2", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_WkrmqLjtHqyjWdCYA1Ze", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_018e50da61a674d6bdbd7150775087f2", "created": "2024-03-18T09:17:52.934Z" }, { "event_id": "evt_018e50da59e577c6a5e843fe08537a01", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_ECPc1GBlY8uC4HushNUU", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_018e50da59e577c6a5e843fe08537a01", "created": "2024-03-18T09:17:50.950Z" } ] ``` 2. Specifying a subset of the query params (only `created_after`): ```shell $ curl -H 'api-key: test_admin' 'http://localhost:8080/events/merchant_1710609960?created_after=2024-03-19T0910:00Z' 2>/dev/null | jq '.' [ { "event_id": "evt_018e562fcd4571b0b831098bb9ebe230", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_w1nwB6UxMcIgEc3UDPvx", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_018e562fcd4571b0b831098bb9ebe230", "created": "2024-03-19T10:09:17.125Z" } ] ``` 3. Error when `object_id` is specified with any of the other query params: ```shell $ curl -H 'api-key: test_admin' 'http://localhost:8080/events/merchant_1710609960?created_after=2024-03-19T0910:00Z&object_id=123' 2>/dev/null | jq '.' { "error": { "type": "invalid_request", "message": "Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified", "code": "IR_16" } } ``` 4. Listing delivery attempts for a specific initial event ID: ```shell curl -H 'api-key: {{admin_api_key}}' '{{baseUrl}}/events/{{merchant_id}}/{{event_id}}/attempts' ``` ```shell $ curl -H 'api-key: test_admin' 'http://localhost:8080/events/merchant_1710609960/evt_018e562fcd4571b0b831098bb9ebe230/attempts' 2>/dev/null | jq '.' [ { "event_id": "evt_018e563030bc75a7a682fc3281f1d13d", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_w1nwB6UxMcIgEc3UDPvx", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_018e562fcd4571b0b831098bb9ebe230", "created": "2024-03-19T10:09:42.592Z", "request": { "body": "{\"merchant_id\":\"merchant_1710609960\",\"event_id\":\"evt_018e562fcd4571b0b831098bb9ebe230\",\"event_type\":\"payment_succeeded\",\"content\":{\"type\":\"payment_details\",\"object\":{\"payment_id\":\"pay_w1nwB6UxMcIgEc3UDPvx\",\"merchant_id\":\"merchant_1710609960\",\"status\":\"succeeded\",\"amount\":6540,\"net_amount\":6540,\"amount_capturable\":0,\"amount_received\":6540,\"connector\":\"stripe\",\"client_secret\":\"pay_w1nwB6UxMcIgEc3UDPvx_secret_ys9LDfhjJE7wiTQkMQru\",\"created\":\"2024-03-19T10:09:15.060Z\",\"currency\":\"USD\",\"customer_id\":\"StripeCustomer\",\"description\":\"Its my first payment request\",\"refunds\":null,\"disputes\":null,\"mandate_id\":null,\"mandate_data\":null,\"setup_future_usage\":null,\"off_session\":null,\"capture_on\":null,\"capture_method\":\"automatic\",\"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\":\"42424242\",\"card_exp_month\":\"10\",\"card_exp_year\":\"25\",\"card_holder_name\":\"joseph Doe\"},\"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\":\"joseph\",\"last_name\":\"Doe\"},\"phone\":{\"number\":\"8056594427\",\"country_code\":\"+91\"},\"email\":null},\"billing\":{\"address\":{\"city\":\"San Fransico\",\"country\":\"US\",\"line1\":\"1467\",\"line2\":\"Harrison Street\",\"line3\":\"Harrison Street\",\"zip\":\"94122\",\"state\":\"California\",\"first_name\":\"joseph\",\"last_name\":\"Doe\"},\"phone\":{\"number\":\"8056594427\",\"country_code\":\"+91\"},\"email\":null},\"order_details\":null,\"email\":\"[email protected]\",\"name\":\"John Doe\",\"phone\":\"999999999\",\"return_url\":\"https://google.com/\",\"authentication_type\":\"no_three_ds\",\"statement_descriptor_name\":\"joseph\",\"statement_descriptor_suffix\":\"JS\",\"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\":\"StripeCustomer\",\"created_at\":1710842955,\"expires\":1710846555,\"secret\":\"epk_ea8a42533ae3472fb32da95c3f616886\"},\"manual_retry_allowed\":false,\"connector_transaction_id\":\"pi_3OvzbcD5R7gDAGff0njPHLCh\",\"frm_message\":null,\"metadata\":{\"udf1\":\"value1\",\"login_date\":\"2019-09-10T10:11:12Z\",\"new_customer\":\"true\"},\"connector_metadata\":null,\"feature_metadata\":null,\"reference_id\":\"pi_3OvzbcD5R7gDAGff0njPHLCh\",\"payment_link\":null,\"profile_id\":\"pro_H7FbvX2pBuJLjlPhkpRa\",\"surcharge_details\":null,\"attempt_count\":1,\"merchant_decision\":null,\"merchant_connector_id\":\"mca_qeS5H2fLkr8GLzN9SNWd\",\"incremental_authorization_allowed\":null,\"authorization_count\":null,\"incremental_authorizations\":null,\"external_authentication_details\":null,\"external_3ds_authentication_attempted\":false,\"expires_on\":\"2024-03-19T10:24:15.060Z\",\"fingerprint\":null,\"payment_method_id\":null,\"payment_method_status\":null}},\"timestamp\":\"2024-03-19T10:09:17.125Z\"}", "headers": [ [ "content-type", "application/json" ], [ "X-Webhook-Signature-512", "af25f54b7018cc35286451645a3ad0167e28a7fa32417c7411cd655c5db06a4bf1f9f7bd4330f2bed1ef54fedcd5b1fc35b09eb6e50f56b035c90cdf8818df30" ] ] }, "response": { "body": "", "headers": [ [ "server", "mitmproxy 10.2.4" ], [ "content-length", "0" ] ], "status_code": 404 }, "delivery_attempt": "automatic_retry" }, { "event_id": "evt_018e562fcd4571b0b831098bb9ebe230", "merchant_id": "merchant_1710609960", "profile_id": "pro_H7FbvX2pBuJLjlPhkpRa", "object_id": "pay_w1nwB6UxMcIgEc3UDPvx", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_018e562fcd4571b0b831098bb9ebe230", "created": "2024-03-19T10:09:17.125Z", "request": { "body": "{\"merchant_id\":\"merchant_1710609960\",\"event_id\":\"evt_018e562fcd4571b0b831098bb9ebe230\",\"event_type\":\"payment_succeeded\",\"content\":{\"type\":\"payment_details\",\"object\":{\"payment_id\":\"pay_w1nwB6UxMcIgEc3UDPvx\",\"merchant_id\":\"merchant_1710609960\",\"status\":\"succeeded\",\"amount\":6540,\"net_amount\":6540,\"amount_capturable\":0,\"amount_received\":6540,\"connector\":\"stripe\",\"client_secret\":\"pay_w1nwB6UxMcIgEc3UDPvx_secret_ys9LDfhjJE7wiTQkMQru\",\"created\":\"2024-03-19T10:09:15.060Z\",\"currency\":\"USD\",\"customer_id\":\"StripeCustomer\",\"description\":\"Its my first payment request\",\"refunds\":null,\"disputes\":null,\"mandate_id\":null,\"mandate_data\":null,\"setup_future_usage\":null,\"off_session\":null,\"capture_on\":null,\"capture_method\":\"automatic\",\"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\":\"42424242\",\"card_exp_month\":\"10\",\"card_exp_year\":\"25\",\"card_holder_name\":\"joseph Doe\"},\"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\":\"joseph\",\"last_name\":\"Doe\"},\"phone\":{\"number\":\"8056594427\",\"country_code\":\"+91\"},\"email\":null},\"billing\":{\"address\":{\"city\":\"San Fransico\",\"country\":\"US\",\"line1\":\"1467\",\"line2\":\"Harrison Street\",\"line3\":\"Harrison Street\",\"zip\":\"94122\",\"state\":\"California\",\"first_name\":\"joseph\",\"last_name\":\"Doe\"},\"phone\":{\"number\":\"8056594427\",\"country_code\":\"+91\"},\"email\":null},\"order_details\":null,\"email\":\"[email protected]\",\"name\":\"John Doe\",\"phone\":\"999999999\",\"return_url\":\"https://google.com/\",\"authentication_type\":\"no_three_ds\",\"statement_descriptor_name\":\"joseph\",\"statement_descriptor_suffix\":\"JS\",\"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\":\"StripeCustomer\",\"created_at\":1710842955,\"expires\":1710846555,\"secret\":\"epk_ea8a42533ae3472fb32da95c3f616886\"},\"manual_retry_allowed\":false,\"connector_transaction_id\":\"pi_3OvzbcD5R7gDAGff0njPHLCh\",\"frm_message\":null,\"metadata\":{\"udf1\":\"value1\",\"login_date\":\"2019-09-10T10:11:12Z\",\"new_customer\":\"true\"},\"connector_metadata\":null,\"feature_metadata\":null,\"reference_id\":\"pi_3OvzbcD5R7gDAGff0njPHLCh\",\"payment_link\":null,\"profile_id\":\"pro_H7FbvX2pBuJLjlPhkpRa\",\"surcharge_details\":null,\"attempt_count\":1,\"merchant_decision\":null,\"merchant_connector_id\":\"mca_qeS5H2fLkr8GLzN9SNWd\",\"incremental_authorization_allowed\":null,\"authorization_count\":null,\"incremental_authorizations\":null,\"external_authentication_details\":null,\"external_3ds_authentication_attempted\":false,\"expires_on\":\"2024-03-19T10:24:15.060Z\",\"fingerprint\":null,\"payment_method_id\":null,\"payment_method_status\":null}},\"timestamp\":\"2024-03-19T10:09:17.125Z\"}", "headers": [ [ "content-type", "application/json" ], [ "X-Webhook-Signature-512", "af25f54b7018cc35286451645a3ad0167e28a7fa32417c7411cd655c5db06a4bf1f9f7bd4330f2bed1ef54fedcd5b1fc35b09eb6e50f56b035c90cdf8818df30" ] ] }, "response": { "body": "", "headers": [ [ "server", "mitmproxy 10.2.4" ], [ "content-length", "0" ] ], "status_code": 404 }, "delivery_attempt": "initial_attempt" } ] ``` ## 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(events): allow listing webhook events and webhook delivery attempts by business profile - Merged: 2024-03-22T11:46:44Z - Files changed: 9 files - Commits: 3 commits Implementation approach: ## Description <!-- Describe your changes in detail --> This PR extends the events list APIs added in #4131 to allow specifying either merchant ID or the business profile ID in the URLs. This PR also includes the corresponding OpenAPI specification changes. The URLs remain the same as desc </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(events): allow listing webhook events and webhook delivery attempts by business profile (#4159) Files to modify: **crates/api_models/src/webhook_events.rs** Add: - struct: pub::WebhookDeliveryAttemptListRequestInternal **crates/common_utils/src/events.rs** Modify existing code **crates/openapi/src/routes/webhook_events.rs** Modify existing code **crates/router/src/core/webhooks/webhook_events.rs** Add: - function: private::determine_identifier_and_get_key_store - enum: private::MerchantIdOrProfileId **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/webhook_events.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::authenticate_and_fetch - struct: pub::JWTAuthMerchantOrProfileFromRoute - impl: impl AuthenticateAndFetch<(), A> for JWTAuthMerchantOrProfileFromRoute **crates/router/src/types/api/webhook_events.rs** Modify existing code
{"issue_number": 4131, "pr_number": 4159, "commits_count": 1, "files_changed": 9, "response_length": 1805, "file_count": 10, "needs_breakdown": false}
chore: address Rust 1.77 clippy lints ## 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 addresses the clippy lints occurring due to new rust version 1.77 ### 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: refactor(router): add parent caller function for DB - Merged: 2024-02-29T08:12:23Z - Files changed: 30 files - Commits: 26 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Currently Event tag for Db level logs are generic stating function names like `find_one_core`, with this change we will be able to get proper Event Tag for the DB level queries. ### Additional Changes - [ ] This PR modifies the API contr </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(router): add parent caller function for DB (#3838) Co-authored-by: hyperswitch-bot[bot] <14 Files to modify: **crates/diesel_models/src/query/address.rs** Modify existing code **crates/diesel_models/src/query/api_keys.rs** Modify existing code **crates/diesel_models/src/query/authorization.rs** Modify existing code **crates/diesel_models/src/query/blocklist.rs** Modify existing code **crates/diesel_models/src/query/blocklist_fingerprint.rs** Modify existing code **crates/diesel_models/src/query/blocklist_lookup.rs** Modify existing code **crates/diesel_models/src/query/business_profile.rs** Modify existing code **crates/diesel_models/src/query/capture.rs** Modify existing code **crates/diesel_models/src/query/configs.rs** Modify existing code **crates/diesel_models/src/query/customers.rs** Modify existing code **crates/diesel_models/src/query/dashboard_metadata.rs** Modify existing code **crates/diesel_models/src/query/dispute.rs** Modify existing code **crates/diesel_models/src/query/events.rs** Modify existing code **crates/diesel_models/src/query/file.rs** Modify existing code **crates/diesel_models/src/query/fraud_check.rs** Modify existing code **crates/diesel_models/src/query/generics.rs** Modify existing code **crates/diesel_models/src/query/locker_mock_up.rs** Modify existing code **crates/diesel_models/src/query/mandate.rs** Modify existing code **crates/diesel_models/src/query/merchant_account.rs** Modify existing code **crates/diesel_models/src/query/merchant_connector_account.rs** Modify existing code **crates/diesel_models/src/query/merchant_key_store.rs** Modify existing code **crates/diesel_models/src/query/organization.rs** Modify existing code **crates/diesel_models/src/query/payment_attempt.rs** Modify existing code **crates/diesel_models/src/query/payment_intent.rs** Modify existing code **crates/diesel_models/src/query/payment_link.rs** Modify existing code **crates/diesel_models/src/query/payment_method.rs** Modify existing code **crates/diesel_models/src/query/payout_attempt.rs** Modify existing code **crates/diesel_models/src/query/refund.rs** Modify existing code **crates/diesel_models/src/query/reverse_lookup.rs** Modify existing code **crates/diesel_models/src/query/role.rs** Modify existing code **crates/diesel_models/src/query/routing_algorithm.rs** Modify existing code **crates/diesel_models/src/query/user.rs** Modify existing code **crates/diesel_models/src/query/user_role.rs** Modify existing code **crates/diesel_models/src/user/dashboard_metadata.rs** Modify existing code **crates/router/src/db/address.rs** Modify existing code **crates/router/src/db/api_keys.rs** Modify existing code **crates/router/src/db/authorization.rs** Modify existing code **crates/router/src/db/blocklist.rs** Modify existing code **crates/router/src/db/blocklist_fingerprint.rs** Modify existing code **crates/router/src/db/blocklist_lookup.rs** Modify existing code **crates/router/src/db/business_profile.rs** Modify existing code **crates/router/src/db/cache.rs** Modify existing code **crates/router/src/db/capture.rs** Modify existing code **crates/router/src/db/configs.rs** Modify existing code **crates/router/src/db/customers.rs** Modify existing code **crates/router/src/db/dashboard_metadata.rs** Modify existing code **crates/router/src/db/dispute.rs** Modify existing code **crates/router/src/db/ephemeral_key.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/db/file.rs** Modify existing code **crates/router/src/db/fraud_check.rs** Modify existing code **crates/router/src/db/gsm.rs** Modify existing code **crates/router/src/db/health_check.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/merchant_key_store.rs** Modify existing code **crates/router/src/db/organization.rs** Modify existing code **crates/router/src/db/payment_link.rs** Modify existing code **crates/router/src/db/payment_method.rs** Modify existing code **crates/router/src/db/payout_attempt.rs** Modify existing code **crates/router/src/db/payouts.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/db/reverse_lookup.rs** Modify existing code **crates/router/src/db/role.rs** Modify existing code **crates/router/src/db/routing_algorithm.rs** Modify existing code **crates/router/src/db/user.rs** Modify existing code **crates/router/src/db/user_role.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"issue_number": 4172, "pr_number": 3838, "commits_count": 1, "files_changed": 30, "response_length": 5846, "file_count": 73, "needs_breakdown": true}
feat(core): Add V2 Authentication to all available endpoints ## Type of Change - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This commit introduces V2 authentication mechanisms for various admin and client-side APIs : - [x] Added V2AdminApiAuth and modified AdminApiAuthWithMerchantIdFromRoute for V2 - [x] Added V2ApiKeyAuth , V2AdminApiAuth and V2ClientAuth to the endpoints - [x] Refactored functions to support V2 Auth as well as V1 Auth ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Motivation and Context ## How did you test it? For `/v2/merchant-accounts` Request ``` curl --location 'http://localhost:8080/v2/merchant-accounts' \ --header 'x-organization-id: org_d2lZPiRPOGbIMmFcb59A' \ --header 'Content-Type: application/json' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "merchant_name": "cloth_seller" }' ``` Response ``` { "id": "cloth_seller_KdjFPBxrxWyX09jri2VB", "merchant_name": "cloth_seller", "merchant_details": null, "publishable_key": "pk_dev_735cafe5f43446e88d22bedec15b0139", "metadata": null, "organization_id": "org_d2lZPiRPOGbIMmFcb59A", "recon_status": "not_requested", "product_type": "orchestration" } ``` For `/v2/organization` Request ``` curl --location 'http://localhost:8080/v2/organization' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'Content-Type: application/json' \ --data '{ "organization_name": "random_org_1741776562" }' ``` Response ``` { "id": "org_m4fLYdEFb7PNHynIfmZO", "organization_name": "random_org_1741776558", "organization_details": null, "metadata": null, "modified_at": "2025-03-12 10:49:18.475431", "created_at": "2025-03-12 10:49:18.475424" } ``` This is how V2AdminApiAuth looks like ``` pub struct V2AdminApiAuth; #[async_trait] impl<A> AuthenticateAndFetch<(), A> for V2AdminApiAuth where A: SessionStateInfo + Sync, { async fn authenticate_and_fetch( &self, request_headers: &HeaderMap, state: &A, ) -> RouterResult<((), AuthenticationType)> { let header_map_struct = HeaderMapStruct::new(&request_headers); let auth_string = header_map_struct.get_auth_string_from_header()?; let request_admin_api_key = auth_string .split(',') .find_map(|part| part.trim().strip_prefix("admin-api-key=")) .ok_or_else(|| { report!(errors::ApiErrorResponse::Unauthorized) .attach_printable("Unable to parse admin_api_key") })?; if request_admin_api_key.is_empty() { return Err(errors::ApiErrorResponse::Unauthorized) .attach_printable("Admin Api key is empty"); } let conf = state.conf(); let admin_api_key = &conf.secrets.get_inner().admin_api_key; if request_admin_api_key != admin_api_key.peek() { Err(report!(errors::ApiErrorResponse::Unauthorized) .attach_printable("Admin Authentication Failure"))?; } Ok(((), AuthenticationType::AdminApiKey)) } } ``` ### What changes are done in authorization header How it was earlier? ``` api-key = {{api-key}} client-secret={{client_secret}} api-key = {{admin_api_key}} ``` Changed version ``` Authorization = api-key={{api-key}} Authorization = admin-api-key={{admin_api_key}} Authorization = publishable-key={{publishable_key}},client-secret={{client_secret}} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] 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: remove client_secret from payment_intent and update related code - Merged: 2025-04-10T13:34:30Z - Files changed: 24 files - Commits: 21 commits Implementation approach: Your PR Description ## Description 1. This commit changes how the client secret is generated 2. Change how client secret is made in Create Payment Intent Old `{Payment_id}_secret_{Secret}` `eg : pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo` New `cs_{Secret}` `eg: cs_0195d2be95ba7ef1a05066e163295562` 3. Cli </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat: remove client_secret from payment_intent and update related code (#7648) Co-authored-by: hyper Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_utils/src/id_type/global_id/payment.rs** Remove: - function: pub::generate_client_secret **crates/common_utils/src/types.rs** Remove: - function: pub::get_string_repr - function: pub::new - function: private::from_str - function: private::deserialize - function: private::expecting - function: private::visit_str - function: private::serialize - function: private::to_sql - function: private::from_sql - function: private::build - function: private::test_serialize_client_secret - function: private::test_deserialize_client_secret - struct: pub::ClientSecret - struct: private::ClientSecretVisitor - impl: impl ClientSecret - impl: impl FromStr for ClientSecret - impl: impl Deserialize<'de> for ClientSecret - impl: impl Visitor<'_> for ClientSecretVisitor - impl: impl Serialize for ClientSecret - impl: impl ToSql<sql_types::Text, diesel::pg::Pg> for ClientSecret - impl: impl FromSql<sql_types::Text, DB> for ClientSecret - impl: impl Queryable<sql_types::Text, DB> for ClientSecret - mod: private::client_secret_type - mod: private::client_secret_tests **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Remove: - function: pub::validate_client_secret **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_client_secret - function: private::set_client_secret - function: private::get_client_secret - function: private::set_client_secret - function: private::get_client_secret - function: private::set_client_secret - function: private::get_client_secret - function: private::set_client_secret **crates/router/src/core/payments/helpers.rs** Remove: - function: pub::authenticate_client_secret **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_post_session_tokens.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session_intent.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/core/payments/operations/payment_update_intent.rs** Modify existing code **crates/router/src/core/payments/payment_methods.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"issue_number": 7487, "pr_number": 7648, "commits_count": 1, "files_changed": 24, "response_length": 4053, "file_count": 23, "needs_breakdown": true}
fix(payment_methods): delete token when a payment reaches terminal state ## 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 function call responsible for deleting card details from payments_operations_core() was been removed in this PR #1636. This modification ensured that the redundant deletion of already deleted card details no longer occurs, preventing the unnecessary error from being triggered. Now as the delete functionality was removed from the payments_operation_core the token created was valid even after the payment reached the terminal states. So, this pr deletes the internal token that is mapped to the locker token in the redis. Hence the token becomes invalid once a payment reaches terminal state. ### 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 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)? --> <img width="1068" alt="Screen Shot 2023-07-28 at 7 45 39 PM" src="https://github.com/juspay/hyperswitch/assets/83439957/c85c33d9-df2f-4c02-bfe7-4ae47ab8bdc2"> <img width="744" alt="image" src="https://github.com/juspay/hyperswitch/assets/83439957/73571106-b233-45e6-85e2-b567f2174bff"> <img width="966" alt="image" src="https://github.com/juspay/hyperswitch/assets/83439957/219ebb0b-4444-4a98-a59d-8a45c2d3582f"> ## 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: fix(payment_methods): delete token when a payment reaches terminal state - Merged: 2023-08-11T11:56:41Z - Files changed: 4 files - Commits: 1 commits Implementation approach: ## Description <!-- Describe your changes in detail --> The function call responsible for deleting card details from payments_operations_core() was been removed in this PR https://github.com/juspay/hyperswitch/pull/1636. This modification ensured that the redundant deletion of already deleted card </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payment_methods): delete token when a payment reaches terminal state (#1929) 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/routes/payment_methods.rs** Add: - function: pub::create_key_for_token - function: pub::insert - function: pub::should_delete_payment_method_token - function: pub::delete - struct: pub::ParentPaymentMethodToken - impl: impl ParentPaymentMethodToken
{"issue_number": 1818, "pr_number": 1929, "commits_count": 1, "files_changed": 4, "response_length": 1409, "file_count": 6, "needs_breakdown": false}
chore(analytics): create a seperate flow for a force sync Currently we use PaymentRetrieve for GET /payment/:id call, for force_sync use cases we should have a separate flow since the underlying execution differs significantly...
<think> PR Context: - Title: feat(analytics): add force retrieve call for force retrieve calls - Merged: 2024-02-28T13:54:43Z - Files changed: 7 files - Commits: 12 commits Implementation approach: Currently we use PaymentRetrieve for GET /payment/:id call, for force_sync use cases we should have a separate flow since the underlying execution differs significantly... Refs: #3562 ## Description <!-- Describe your changes in detail --> Currently we don't show payment retrieve call logs in t </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(analytics): add force retrieve call for force retrieve calls (#3565) Co-authored-by: harsh-shar Files to modify: **crates/router/src/compatibility/stripe/payment_intents.rs** Modify existing code **crates/router/src/compatibility/stripe/refunds.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/routes/refunds.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 3562, "pr_number": 3565, "commits_count": 1, "files_changed": 7, "response_length": 1427, "file_count": 9, "needs_breakdown": false}
[REFACTOR] : [NMI] 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): [NMI] change error message from not supported to not implemented - Merged: 2024-01-31T11:51:43Z - Files changed: 1 files - Commits: 3 commits Implementation approach: ## 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): [NMI] change error message from not supported to not implemented (#2848) Co-aut Files to modify: **crates/router/src/connector/nmi/transformers.rs** Modify existing code
{"issue_number": 2843, "pr_number": 2848, "commits_count": 1, "files_changed": 1, "response_length": 1012, "file_count": 3, "needs_breakdown": false}
Refactor Nexi Nets: Remove Default Case Handling (Fixes #2275) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Addresses Issue https://github.com/juspay/hyperswitch/issues/2275 Modified `hyperswitch/crates/router/src/connector/nexinets/transformers.rs` --> ### 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: fix(connector): [Forte] Response Handling for Verify Action - Merged: 2023-10-27T09:48:48Z - Files changed: 11 files - Commits: 4 commits Implementation approach: ## Description <!-- Describe your changes in detail --> Closes - [#2638](https://github.com/juspay/hyperswitch-cloud/issues/2638) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/enviro </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [Forte] Response Handling for Verify Action (#2601) Co-authored-by: Prasunna Soppa < Files to modify: **crates/router/src/connector/forte/transformers.rs** Modify existing code **Commit 2:** fix(connector): [Forte] Response Handling for Verify Action (#2601) Co-authored-by: Prasunna Soppa < Files to modify: **crates/router/src/connector/forte/transformers.rs** Modify existing code
{"issue_number": 2638, "pr_number": 2601, "commits_count": 2, "files_changed": 11, "response_length": 1201, "file_count": 5, "needs_breakdown": false}