prompt
stringlengths
24
63.1k
response
stringlengths
296
101k
metadata
stringlengths
143
152
Handle span closures after request completion or after consolidated log... Currently some consolidated logs don't have the values propogated all the way to the top, This seems to be a result of the way we handle the consolidated log & value propogation In this case the consolidated log line is printed before the spans are closed resulting in values not being propogated at the top <img width="1445" alt="image" src="https://github.com/juspay/hyperswitch/assets/21202349/fdbd4858-e432-4347-9a28-c28046566f38">
<think> PR Context: - Title: fix(connector): Connector wise validation for zero auth flow - Merged: 2023-12-19T13:44:16Z - Files changed: 30 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Resolves [#3683](https://github.com/juspay/hyperswitch-cloud/issues/3683) Setup Mandate flow is implemented only for 1. Adyen 2. Cybersource 3. Gocardless 4. Stripe Verify payment method flow was implemented in place of setup manda </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): Connector wise validation for zero auth flow (#3159) Co-authored-by: hyperswitch-bot Files to modify: **crates/router/src/connector/aci.rs** Add: - function: private::build_request **crates/router/src/connector/airwallex.rs** Add: - function: private::build_request **crates/router/src/connector/authorizedotnet.rs** Add: - function: private::build_request **crates/router/src/connector/bambora.rs** Add: - function: private::build_request **crates/router/src/connector/bankofamerica.rs** Add: - function: private::build_request **crates/router/src/connector/bitpay.rs** Add: - function: private::build_request **crates/router/src/connector/bluesnap.rs** Add: - function: private::build_request **crates/router/src/connector/boku.rs** Add: - function: private::build_request **crates/router/src/connector/braintree.rs** Add: - function: private::build_request **crates/router/src/connector/cashtocode.rs** Add: - function: private::build_request **crates/router/src/connector/checkout.rs** Add: - function: private::build_request **crates/router/src/connector/coinbase.rs** Add: - function: private::build_request **crates/router/src/connector/cryptopay.rs** Add: - function: private::build_request **crates/router/src/connector/dlocal.rs** Add: - function: private::build_request **crates/router/src/connector/dummyconnector.rs** Add: - function: private::build_request **crates/router/src/connector/fiserv.rs** Add: - function: private::build_request **crates/router/src/connector/forte.rs** Add: - function: private::build_request **crates/router/src/connector/globalpay.rs** Add: - function: private::build_request **crates/router/src/connector/globepay.rs** Add: - function: private::build_request **crates/router/src/connector/helcim.rs** Modify existing code **crates/router/src/connector/iatapay.rs** Add: - function: private::build_request **crates/router/src/connector/klarna.rs** Add: - function: private::build_request **crates/router/src/connector/mollie.rs** Add: - function: private::build_request **crates/router/src/connector/multisafepay.rs** Add: - function: private::build_request **crates/router/src/connector/nexinets.rs** Add: - function: private::build_request **crates/router/src/connector/nmi.rs** Modify existing code **crates/router/src/connector/noon.rs** Add: - function: private::build_request **crates/router/src/connector/nuvei.rs** Add: - function: private::build_request **crates/router/src/connector/opayo.rs** Add: - function: private::build_request **crates/router/src/connector/opennode.rs** Add: - function: private::build_request **crates/router/src/connector/payeezy.rs** Add: - function: private::build_request **crates/router/src/connector/payme.rs** Add: - function: private::build_request **crates/router/src/connector/paypal.rs** Add: - function: private::build_request **crates/router/src/connector/payu.rs** Add: - function: private::build_request **crates/router/src/connector/placetopay.rs** Add: - function: private::build_request **crates/router/src/connector/powertranz.rs** Add: - function: private::build_request **crates/router/src/connector/prophetpay.rs** Add: - function: private::build_request **crates/router/src/connector/rapyd.rs** Add: - function: private::build_request **crates/router/src/connector/riskified.rs** Add: - function: private::build_request **crates/router/src/connector/shift4.rs** Add: - function: private::build_request **crates/router/src/connector/signifyd.rs** Add: - function: private::build_request **crates/router/src/connector/square.rs** Add: - function: private::build_request **crates/router/src/connector/stax.rs** Add: - function: private::build_request **crates/router/src/connector/trustpay.rs** Add: - function: private::build_request **crates/router/src/connector/tsys.rs** Add: - function: private::build_request **crates/router/src/connector/volt.rs** Add: - function: private::build_request **crates/router/src/connector/wise.rs** Add: - function: private::build_request **crates/router/src/connector/worldline.rs** Add: - function: private::build_request **crates/router/src/connector/worldpay.rs** Add: - function: private::build_request **crates/router/src/connector/zen.rs** Add: - function: private::build_request
{"issue_number": 3683, "pr_number": 3159, "commits_count": 1, "files_changed": 30, "response_length": 5374, "file_count": 52, "needs_breakdown": true}
feat(connector): [Authorizedotnet] Use connector_response_reference_id as reference to merchant ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] 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 --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(connector): [Paypal] Implement 3DS for Cards - Merged: 2023-10-06T11:31:35Z - Files changed: 2 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> If 3D Secure is enabled, challenge url will be provided while doing card payment throught paypal Closes - [#2496](https://github.com/juspay/hyperswitch-cloud/issues/2496) ### Additional Changes - [ ] This PR modifies the API contract </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Paypal] Implement 3DS for Cards (#2443) Files to modify: **crates/router/src/connector/paypal.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Remove: - impl: impl TryFrom<types::ResponseRouterData<F, PaypalSyncResponse, T, types::PaymentsResponseData>> for get_redirect_url(item.response.clone()) Add: - function: private::try_from - function: private::try_from - function: private::paypal_threeds_link - struct: pub::ThreeDsSetting - struct: pub::ThreeDsMethod - struct: pub::PaypalThreeDsResponse - struct: pub::PaypalThreeDsSyncResponse - struct: pub::CardsData - struct: pub::CardDetails - enum: pub::ThreeDsType - enum: pub::PaypalAuthResponse - impl: impl TryFrom< types::ResponseRouterData< F, PaypalSyncResponse, types::PaymentsSyncData, types::PaymentsResponseData, >, > for get_redirect_url(item.response.links.clone()) - impl: impl TryFrom< types::ResponseRouterData< F, PaypalThreeDsSyncResponse, types::PaymentsSyncData, types::PaymentsResponseData, >, > for types::RouterData<F, types::PaymentsSyncData, types::PaymentsResponseData> - impl: impl TryFrom< types::ResponseRouterData< F, PaypalThreeDsResponse, types::PaymentsAuthorizeData, types::PaymentsResponseData, >, > for types::RouterData<F, types::PaymentsAuthorizeData, types::PaymentsResponseData>
{"issue_number": 2496, "pr_number": 2443, "commits_count": 1, "files_changed": 2, "response_length": 2375, "file_count": 4, "needs_breakdown": false}
[FEATURE]: [Authorizedotnet] 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): [Authorizedotnet] Enhance currency Mapping with ConnectorCurrencyCommon Trait - Merged: 2023-10-13T10:28:18Z - Files changed: 2 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### 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): [Authorizedotnet] Enhance currency Mapping with ConnectorCurrencyCommon Trait ( Files to modify: **crates/router/src/connector/authorizedotnet.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/authorizedotnet/transformers.rs** Add: - function: private::try_from - struct: pub::AuthorizedotnetRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for AuthorizedotnetRouterData<T>
{"issue_number": 2218, "pr_number": 2570, "commits_count": 1, "files_changed": 2, "response_length": 1369, "file_count": 4, "needs_breakdown": false}
disable stripe disable stripe
<think> PR Context: - Title: ci: disable stripe in cypress - Merged: 2025-02-04T10:41:55Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> disable sprite. closes #7184 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7184, "pr_number": 7183, "commits_count": 0, "files_changed": 1, "response_length": 759, "file_count": 0, "needs_breakdown": false}
[REFACTOR]: [Fiserv] Remove Default Case Handling ### :memo: Feature Description - We utilize match statements to make pivotal decisions, such as generating requests based on the payment method type and managing responses received from the connector. - These conditions generally go hand in hand with enum variants. - Default case is used because a match statement needs to be exhaustive i.e. every variant needs to be covered. - So, if all the explicit cases are handled then default is used to handle the rest. - Each connector have these match statements but many of them don’t provide reference to each variant in their default case, rather a `_` is put to handle all the other cases. - This approach carries a risk because developers may inadvertently overlook the need for explicit handling of the new cases. ### :hammer: Possible Implementation - Instead of relying on a default match case `_`, developers should handle each and every variant explicitly. - By doing so, if there are any changes in the future, they can readily assess the impact of their modifications simply by compiling the code. - 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/1955 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/fiserv/transformer.rs` ### :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: [Fiserv] Remove Default Case Handling - Merged: 2024-06-24T07:38:20Z - Files changed: 1 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR closes #4059 removes the default case handling in `hyperswitch/crates/router/src/connector/fiserv/transformer.rs`. ### 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: [Fiserv] Remove Default Case Handling (#4767) Files to modify: **crates/router/src/connector/fiserv/transformers.rs** Modify existing code
{"issue_number": 4059, "pr_number": 4767, "commits_count": 1, "files_changed": 1, "response_length": 932, "file_count": 3, "needs_breakdown": false}
feat(connector): [Adyen] implement Adyen bank transfers and voucher payments in Indonesia ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description A bank transfer is the most popular payment method in the Indonesian market, second to traditional cash transactions. For every order we create a virtual account (VA) so that the shopper can make a bank transfer into that account. As an alternative to a bank transfer, shoppers can complete their ecommerce transaction by paying cash at a convenience store. Because Indonesia is still a largely cash-based society, this is a popular payment method. Bank Transfers Payment Method Types ``` permata_bank_transfer bca_bank_transfer bni_va bri_va cimb_va danamon_va mandiri_va ``` Voucher Payment Method Types ``` alfamart indomaret ``` Payment Method Data Bank Transfer ``` "payment_method": "bank_transfer", "payment_method_type": "{{Bank_Transfers_Payment_Method_Type}}", "payment_method_data": { "bank_transfer": { "{{Bank_Transfers_Payment_Method_Type}}": { "billing_details": { "first_name": "Some", "second_name": "one", "email": "[email protected]" } } } } ``` Voucher ``` "payment_method": "voucher", "payment_method_type": "{Voucher_Payment_Method _Types}}", "payment_method_data": { "voucher": { "{{Voucher_Payment_Method}}": { "first_name": "Some", "second_name": "one", "email": "[email protected]" } } } ``` Output Bank Transfer ``` "next_action": { "type": "display_bank_transfer_information", "bank_transfer_steps_and_charges_details": { "doku_bank_transfer_instructions": { "expires_at": "2023-07-29T00:10:00", "reference": "8856079400139050", "instructions_url": "https://www.doku.com/how-to-pay/bank-permata.php" }, "receiver": null } } ``` Voucher ``` next_action": { "type": "display_voucher_information", "voucher_details": { "expires_at": "2023-07-29T00:10:00", "reference": "8888823200139049", "download_url": null } } ``` ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## 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="1714" alt="Screen Shot 2023-07-27 at 10 40 34 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/cc3f32c8-5d1c-405b-b8d9-056eafaa9818"> <img width="1659" alt="Screen Shot 2023-07-27 at 10 40 49 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/36618d13-62a3-473d-be3e-6c0b3abe8ad5"> ## 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: chore: remove spaces at beginning of commit messages when generating changelogs - Merged: 2023-08-09T12:16:47Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates the `git-cliff` templates to remove spaces at the beginning of the commit message. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issu </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 1804, "pr_number": 1906, "commits_count": 0, "files_changed": 2, "response_length": 809, "file_count": 0, "needs_breakdown": false}
[FEATURE] : [CONNECTOR] Add Billwerk, Fiservemea, Tsys supported payment methods, currencies and countries in feature matrix ### Feature Description Add Billwerk, Fiservemea, Tsys supported payment methods, currencies and countries in feature matrix ### Possible Implementation Add Billwerk, Fiservemea, Tsys supported payment methods, currencies and countries in feature matrix ### Have you spent some time checking if this feature request has been raised before? - [x] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes, I am willing to submit a PR!
<think> PR Context: - Title: feat(connector): [BILLWERK, FISERVEMEA, TSYS] add in feature matrix api - Merged: 2025-03-11T13:56:43Z - Files changed: 9 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add Billwerk, Fiservemea, Tsys supported payment methods, currencies and countries in feature matrix ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies appli </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [BILLWERK, FISERVEMEA, TSYS] add in feature matrix api (#7165) Co-authored-by: Anur Files to modify: **crates/hyperswitch_connectors/src/connectors/billwerk.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Billwerk - impl: impl ConnectorSpecifications for Billwerk Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Billwerk - impl: impl ConnectorSpecifications for Billwerk **crates/hyperswitch_connectors/src/connectors/fiservemea.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Fiservemea - impl: impl ConnectorSpecifications for Fiservemea Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Fiservemea - impl: impl ConnectorSpecifications for Fiservemea **crates/hyperswitch_connectors/src/connectors/tsys.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Tsys - impl: impl ConnectorSpecifications for Tsys Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Tsys - impl: impl ConnectorSpecifications for Tsys
{"issue_number": 7164, "pr_number": 7165, "commits_count": 1, "files_changed": 9, "response_length": 2436, "file_count": 5, "needs_breakdown": false}
[BUG] Description for refunds - list is not apt ### Bug Description https://api-reference.hyperswitch.io/api-reference/refunds/refunds--list This should be - `Lists all the refunds associated with the merchant, or for a specific payment if payment_id is provided` Current one implies that it'll return refunds of a payment_id if it is not provided. ### Expected Behavior It should reflect that refunds accociated with a merchant will be returned if payment_id is missing, otherwise only for that payment_id. ### Actual Behavior Incorrect message being shown. ### Steps To Reproduce Visit - https://api-reference.hyperswitch.io/api-reference/refunds/refunds--list ### Context For The Bug _No response_ ### Environment Are you using hyperswitch hosted version? Yes ### 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(docs): incorrect description for refund api - Merged: 2024-12-10T11:02:10Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description The current description for refund - list is incorrect. Newer one looks more apt. ### 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 change </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(docs): incorrect description for refund api (#6443) Signed-off-by: Shashank Kumar <shashankkumar Files to modify: **crates/openapi/src/routes/refunds.rs** Modify existing code
{"issue_number": 6751, "pr_number": 6443, "commits_count": 1, "files_changed": 2, "response_length": 963, "file_count": 3, "needs_breakdown": false}
refactor: move config defaults from TOML files to `Default` trait ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR moves default values for `router` and `drainer` binaries' configuration from the `defaults.toml` files to the implementation of the `Default` trait. Since we add a `#[serde(default)]` to the `Settings` struct, it will use the `Default` trait implementation to provide the default values. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> This should help catch errors in the default configuration values during compilation, and help reduce binary size. ## 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)? --> Ran the `router` and `drainer` binaries, verified that they both work with the current defaults provided. ## 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(redis_interface): add missing `#[serde(default)]` annotation to `RedisSettings` - Merged: 2023-01-18T13:21:08Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR fixes a mistake in my previous PR #352 where I missed out adding a `#[serde(default)]` annotation to the `RedisSettings` struct. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(redis_interface): add missing `#[serde(default)]` annotation to `RedisSettings` (#409) Files to modify: **crates/redis_interface/src/types.rs** Modify existing code
{"issue_number": 352, "pr_number": 409, "commits_count": 1, "files_changed": 1, "response_length": 988, "file_count": 3, "needs_breakdown": false}
[FEATURE]: [OpenNode] 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): [OpenNode] Use connector_request_reference_id as referemce to connector - Merged: 2023-10-25T19:06:59Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Use connector_request_reference_id as reference to the connector #2311 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [OpenNode] Use connector_request_reference_id as referemce to connector (#2596) Files to modify: **crates/router/src/connector/opennode/transformers.rs** Modify existing code
{"issue_number": 2311, "pr_number": 2596, "commits_count": 1, "files_changed": 1, "response_length": 1016, "file_count": 3, "needs_breakdown": false}
[FEATURE] Making CVV optional field for payments flow ### Feature Description CVV should be Optional and should only be passed for first time payment else depending upon use cases we don't need to pass the CVV. It gets handeled by the conntector itslef ### Possible Implementation We need to make the CVV field as optional and need to check for the flows, that if mandate_id is passed then we don't need to include CVV as this is a recurring payment else in other case we have to pass cvv ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: fix(mandate): make payment_method_data optional for mandate scenario - Merged: 2023-05-08T09:51:38Z - Files changed: 7 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> For Recurring mandate payments we don't need payment_method_data, currently we are storing all card_details in locker so payment_method_data can be built from card_details in locker for card_payment but in other_payment_methods(google_pay, app </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(mandate): make payment_method_data optional for mandate scenario (#1032) Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"issue_number": 1011, "pr_number": 1032, "commits_count": 1, "files_changed": 7, "response_length": 1410, "file_count": 9, "needs_breakdown": false}
[FEATURE] Use the newtype pattern for phone numbers ### Feature Description This issue covers one of the problems mentioned in #119, about using [the newtype pattern](https://rust-unofficial.github.io/patterns/patterns/behavioural/newtype.html) for phone numbers. The requirement is that phone numbers must be validated once during construction/deserialization and should never be validated again. Please also include unit tests in your PR. _For external contributors, clarify any questions you may have, and let us know that you're interested in picking this up. We'll assign this issue to you to reduce duplication of effort on the same task._ ### Possible Implementation You could use two newtypes for `PhoneNumber` and `PhoneCountryCode`. Also, implement `Serialize` and `Deserialize` on these two types. The complexity involved in parsing phone numbers seems to be too high to be done all by ourselves, you could use the [Rust port of `libphonenumber`](https://github.com/whisperfish/rust-phonenumber) to help ease this task. ### 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: chore(common_utils): Apply the new type pattern for phone numbers - Merged: 2023-06-16T18:16:57Z - Files changed: 5 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> * Used the phonenumber crate to validate the phonenumber * Implemented usual traits: FromStr, TryFrom, Deref, DerefMut, Queryable, FromSql, ToSql * Used the testcase crate to write a few phone number validation unit tests ### Additional C </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** chore(common_utils): Apply the new type pattern for phone numbers (#1286) Co-authored-by: rishavkar Files to modify: **crates/common_utils/src/errors.rs** Modify existing code **crates/common_utils/src/pii.rs** Add: - function: private::fmt - function: private::from_str - function: private::try_from - function: private::deref - function: private::deref_mut - function: private::build - function: private::from_sql - function: private::to_sql - function: private::test_valid_phone_number_default_masking - struct: pub::PhoneNumberStrategy - struct: pub::PhoneNumber - impl: impl Strategy<T> for PhoneNumberStrategy - impl: impl FromStr for PhoneNumber - impl: impl TryFrom<String> for PhoneNumber - impl: impl ops::Deref for PhoneNumber - impl: impl ops::DerefMut for PhoneNumber - impl: impl Queryable<diesel::sql_types::Text, DB> for PhoneNumber - impl: impl FromSql<sql_types::Text, DB> for PhoneNumber - impl: impl ToSql<sql_types::Text, DB> for PhoneNumber **crates/common_utils/src/validation.rs** Add: - function: pub::validate_phone_number - function: private::test_validate_phone_number - function: private::test_invalid_phone_number
{"issue_number": 851, "pr_number": 1286, "commits_count": 1, "files_changed": 5, "response_length": 2040, "file_count": 5, "needs_breakdown": false}
feat: add support for updating surcharge_applicable field intent ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> -> Enabled updating surcharge_applicable in payment_intent. -> Implemented apply_and_ceil_result() function in Percentage struct ## 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
<think> PR Context: - Title: feat(dashboard_metadata): Add `ReconStatus` in `dashboard_metadata` - Merged: 2025-03-26T10:26:02Z - Files changed: 7 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR will add a new variant in Dashboard Metadata for storing the recon state. ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuratio </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(dashboard_metadata): Add `ReconStatus` in `dashboard_metadata` (#7595) Co-authored-by: hyperswi Files to modify: **crates/api_models/src/user/dashboard_metadata.rs** Add: - struct: pub::ReconStatus **crates/diesel_models/src/enums.rs** Modify existing code **crates/router/src/core/user/dashboard_metadata.rs** Modify existing code **crates/router/src/types/domain/user/dashboard_metadata.rs** Modify existing code **crates/router/src/utils/user/dashboard_metadata.rs** Modify existing code
{"issue_number": 2647, "pr_number": 7595, "commits_count": 1, "files_changed": 7, "response_length": 1315, "file_count": 7, "needs_breakdown": false}
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 https://github.com/juspay/hyperswitch/pull/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. #1818 ### 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)? --> ## 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): return parent_payment_method_token for other payment methods (BankTransfer, Wallet, BankRedirect) - Merged: 2023-08-17T12:33:28Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> During the `make_pm_data` we construct a key (`pm_token_{token}_{payment_method}_hyperswitch`) using the token that is received in the request and try to get the value store in redis for that key. If there is no value present for that particul </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payment_methods): return parent_payment_method_token for other payment methods (BankTransfer, Wa Files to modify: **crates/router/src/core/payments/helpers.rs** Modify existing code
{"issue_number": 1929, "pr_number": 1947, "commits_count": 1, "files_changed": 1, "response_length": 1041, "file_count": 3, "needs_breakdown": false}
[ENHANCEMENT] Add connector_label field in error type ### Feature Description A `DuplicateMerchantConnectorAccount` will occur when inserting a row in the `merchant_connector_account` table if there is a row that already exists with the same merchant_id and connector_label. The connector_label is created by Hyperswitch internally hence it is necessary to send back the connector_label is the error response so that the user has an idea of what the connector_label is. ### Possible Implementation add a field connector_label in the error message of `DuplicateMerchantConnectorAccount`. ### 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(router): add the `connector_label` field to `DuplicateMerchantConnectorAccount` error message - Merged: 2023-05-04T14:29:59Z - Files changed: 3 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds the connector_label to the message of the DuplicateMerchantConnectorAccount variant in the ApiErrorResponse enum ### 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(router): add the `connector_label` field to `DuplicateMerchantConnectorAccount` error messa Files to modify: **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/errors/api_error_response.rs** Modify existing code
{"issue_number": 899, "pr_number": 1044, "commits_count": 1, "files_changed": 3, "response_length": 1170, "file_count": 5, "needs_breakdown": false}
[FIX] Add fallback connectors instead of active routing rule connectors if straight through connector is ineligible Add the fallback connectors to the list of eligible connectors instead of adding connectors configured in the active routing rule in case straight through connector is ineligible
<think> PR Context: - Title: revert(routing): Add connectors from current active routing algorithm before adding fallback connectors - Merged: 2025-06-04T16:36:28Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Reverts https://github.com/juspay/hyperswitch/pull/7921 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** revert(routing): Add connectors from current active routing algorithm before adding fallback connect Files to modify: **crates/router/src/core/payments.rs** Modify existing code
{"issue_number": 8208, "pr_number": 8207, "commits_count": 1, "files_changed": 1, "response_length": 1017, "file_count": 3, "needs_breakdown": false}
[FEATURE] complete the refund and void for capture specific transaction for cybersource connector ### Feature Description **Note:** refund and void can be done in two different ways. below flows for refund and void are yet to be implemented - [Refund Capture](https://developer.cybersource.com/api-reference-assets/index.html#payments_refund_refund-a-capture) - [Void Capture](https://developer.cybersource.com/api-reference-assets/index.html#payments_void_void-a-capture) ### Possible Implementation Complete the above mentioned flows based on the payment `capture_method` value in payment_attempt. right now this value is not provided directly. ### 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/contrib/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: feat(connector): add support for capture, void, psync, refund and rsync for cybersource - Merged: 2023-01-17T08:25:52Z - Files changed: 9 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> Updating support for [cybersource](https://developer.cybersource.com) payment gateway **Payment Method:** card **Supported payment flows** - [Authorize](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments_process-a-payment) - [Capture](https </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): add support for capture, void, psync, refund and rsync for cybersource (#381) Files to modify: **crates/router/src/connector/cybersource.rs** Remove: - impl: impl api::ConnectorCommon for Cybersource - impl: impl services::ConnectorIntegration< api::Verify, types::VerifyRequestData, types::PaymentsResponseData, > for Cybersource - impl: impl services::ConnectorIntegration< api::Session, types::PaymentsSessionData, types::PaymentsResponseData, > for Cybersource - impl: impl services::ConnectorIntegration< api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData, > for Cybersource - impl: impl services::ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> - impl: impl services::ConnectorIntegration< api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData, > for vec![ ( headers::CONTENT_TYPE.to_string(), types::PaymentsAuthorizeType::get_content_type(self).to_string(), ), ( headers::ACCEPT.to_string(), "application/hal+json;charset=utf-8".to_string(), ), ] - impl: impl services::ConnectorIntegration< api::Void, types::PaymentsCancelData, types::PaymentsResponseData, > for Cybersource - impl: impl services::ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> - impl: impl services::ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> Add: - function: private::build_error_response - function: private::build_headers - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_http_method - function: private::get_url - function: private::get_content_type - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_request_body - function: private::get_headers - function: private::get_url - function: private::get_content_type - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_http_method - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl ConnectorCommon for Cybersource - impl: impl ConnectorCommonExt<Flow, Request, Response> for Cybersource - impl: impl ConnectorIntegration<api::Verify, types::VerifyRequestData, types::PaymentsResponseData> for Cybersource - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Cybersource - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Cybersource - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for common_get_content_type() - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Cybersource - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> **crates/router/src/connector/cybersource/transformers.rs** Remove: - struct: pub::CybersourceRefundResponse - enum: pub::RefundStatus **crates/router/src/connector/globalpay/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Add: - function: private::get_attempt_id - function: private::get_billing_country - function: private::get_card - function: private::get_billing_phone - function: private::get_billing - function: private::get_number - function: private::get_first_name - function: private::get_last_name - function: private::get_line1 - function: private::get_city - function: private::get_line2 - function: private::get_zip - trait: pub::PhoneDetailsData - trait: pub::AddressDetailsData - impl: impl PaymentsRequestData for types::PaymentsAuthorizeRouterData **crates/router/src/services/api.rs** Add: - function: private::get_http_method **crates/router/tests/connectors/connector_auth.rs** Modify existing code **crates/router/tests/connectors/cybersource.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::get_default_payment_authorize_data - function: private::should_only_authorize_payment - function: private::should_authorize_and_capture_payment - function: private::should_sync_capture_payment - function: private::should_capture_already_authorized_payment - function: private::should_void_already_authorized_payment - function: private::should_refund_succeeded_payment - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_card_number - function: private::should_fail_payment_for_incorrect_exp_month - struct: private::Cybersource - impl: impl ConnectorActions for Cybersource - impl: impl utils::Connector for Cybersource **crates/router/tests/connectors/main.rs** Add: - mod: private::cybersource
{"issue_number": 380, "pr_number": 381, "commits_count": 1, "files_changed": 9, "response_length": 7213, "file_count": 12, "needs_breakdown": true}
[FEATURE]: [NMI] 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): [NMI] Currency Unit Conversion - Merged: 2023-11-05T11:46:45Z - Files changed: 2 files - Commits: 14 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Addressing Issue: #2236 - Modified two files in `hyperswitch/crates/router/src/connector/` - `nmi.rs` - Implement `get_currency_unit` function - Modify `ConnectorIntegration` implementations for `Nmi` - `nmi/transformers.rs` - Implement `NmiRouterData<T>` stru </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [NMI] Currency Unit Conversion (#2707) Files to modify: **crates/router/src/connector/nmi.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/nmi/transformers.rs** Add: - function: private::try_from - struct: pub::NmiRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for NmiRouterData<T>
{"issue_number": 2236, "pr_number": 2707, "commits_count": 1, "files_changed": 2, "response_length": 1226, "file_count": 4, "needs_breakdown": false}
feat(verify): add new types for validate API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This part of series of PR's which are aimed at adding ValidateAPI in the core. This PR specifically deals with introducing new types for the Flows and Operations which are to be added going further. <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to. 1. Create new types for the change 2. Introduce the Flow and Connector Integration 3. Add Stripe POC 4. Move the mandate related behaviour to domain 5. Introduce the new operation and all the related components in the payments core <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(verify_flow): add a new flow `Verify` [blocked on #45] - Merged: 2022-12-06T06:20:10Z - Files changed: 13 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This PR primarily focuses on adding a new flow `Verify` in the core implementation and all the implementation that come along with it <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variabl </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 45, "pr_number": 47, "commits_count": 0, "files_changed": 13, "response_length": 790, "file_count": 0, "needs_breakdown": false}
refactor(settings): make the function to deserialize hashsets more generic ## 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 updates the application configuration deserialization logic to use a common generic function to deserialize `HashSet<T>` instead of specific ones. In addition, this PR updates the function to be more lenient in that it allows spaces around the commas for better readability. ## 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). --> Closes #3466. ## 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)? --> Unit tests: ```shell cargo test --package router --lib --all-features -- configs::settings::hashset_deserialization_test ``` <img width="800" alt="Screenshot of unit tests run" src="https://github.com/juspay/hyperswitch/assets/22217505/ac1de2b4-f771-44c7-87a9-03e62e8904f6"> Also, ran the application with each of the modified config files to verify that the application is able to correctly deserialize the specified config entries. ## 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: chore: add missing migrations for recently added currencies - Merged: 2024-05-24T12:19:21Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds missing migrations for the new currencies introduced in #3104. ### Additional Changes - [ ] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/envi </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 3104, "pr_number": 4760, "commits_count": 0, "files_changed": 2, "response_length": 789, "file_count": 0, "needs_breakdown": false}
bug(users): Check lineage across entities in invite Currently in invites we don't check if user exists across entities. This will be a problem when inviting a user with higher entity from different lineage. We should check if user exists across lineage before allowing invite in this case.
<think> PR Context: - Title: fix(users): Check lineage across entities in invite - Merged: 2024-11-27T14:33:37Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently in invites we don't check if user exists across entities. This will be a problem when inviting a user with higher entity from different lineage. This PR fixes it. ### Additional Changes - [ ] This PR modifies the API contract </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(users): Check lineage across entities in invite (#6677) Files to modify: **crates/router/src/core/user.rs** Modify existing code
{"issue_number": 6679, "pr_number": 6677, "commits_count": 1, "files_changed": 1, "response_length": 920, "file_count": 3, "needs_breakdown": false}
[BUG] Facilitapay env connector configs breaking WASM It is `BodyKey` and not `Bodykey`. Affected files: `crates/connector_configs/toml/production.toml` `crates/connector_configs/toml/sandbox.toml` `crates/connector_configs/toml/integration_test.toml` this isn't affecting the current wasm as Facilitapay is not yet on dashboard.
<think> PR Context: - Title: chore(env): fix Facilitapay connector config - Merged: 2025-05-05T13:07:47Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR fixes Facilitapay payment method env that broke WASM. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment vari </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7957, "pr_number": 7958, "commits_count": 0, "files_changed": 3, "response_length": 774, "file_count": 0, "needs_breakdown": false}
refactor: remove code related to temp locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Removes redundant code related to temp locker that is not used . No logical change. ### 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)? --> Testcases not required as there is no logical change. ## 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: revert redis temp locker logic - Merged: 2023-10-23T14:56:57Z - Files changed: 20 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Reverts redis temp locker logic which includes PRs #2650 , #2640 , #2594 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** Revert "refactor: revert redis temp locker logic (#2670)" This reverts commit eaa972052024678ade122e Files to modify: **crates/api_models/src/payment_methods.rs** Remove: - struct: pub::DeleteTokenizeByDateRequest **crates/external_services/src/kms.rs** Remove: - struct: pub::KmsValue Add: - struct: pub::KmsValue **crates/router/src/configs/defaults.rs** Modify existing code **crates/router/src/configs/kms.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/configs/validations.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Remove: - function: private::create_payment_method_data_in_locker - struct: pub::BasiliskCardSupport - impl: impl BasiliskCardSupport Add: - struct: pub::TempLockerCardSupport **crates/router/src/core/payment_methods/transformers.rs** Remove: - function: pub::mk_crud_locker_request **crates/router/src/core/payment_methods/vault.rs** Remove: - function: pub::get_payment_method_data_from_locker - function: pub::get_payout_method_data_from_temporary_locker - function: pub::store_payout_method_data_in_locker - function: pub::store_payment_method_data_in_locker - function: pub::delete_locker_payment_method_by_lookup_key - function: pub::get_key_id - impl: impl Vault **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/services/api/client.rs** Modify existing code **crates/router/src/types/api/payment_methods.rs** Modify existing code **crates/router/src/workflows/tokenized_data.rs** Remove: - function: private::execute_workflow **Commit 2:** refactor: revert redis temp locker logic (#2670) Files to modify: **crates/api_models/src/payment_methods.rs** Add: - struct: pub::DeleteTokenizeByDateRequest **crates/external_services/src/kms.rs** Remove: - struct: pub::KmsValue Add: - struct: pub::KmsValue **crates/router/src/configs/defaults.rs** Modify existing code **crates/router/src/configs/kms.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/configs/validations.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Remove: - struct: pub::TempLockerCardSupport Add: - function: private::create_payment_method_data_in_locker - struct: pub::BasiliskCardSupport - impl: impl BasiliskCardSupport **crates/router/src/core/payment_methods/transformers.rs** Add: - function: pub::mk_crud_locker_request **crates/router/src/core/payment_methods/vault.rs** Add: - function: pub::get_payment_method_data_from_locker - function: pub::get_payout_method_data_from_temporary_locker - function: pub::store_payout_method_data_in_locker - function: pub::store_payment_method_data_in_locker - function: pub::delete_locker_payment_method_by_lookup_key - function: pub::get_key_id - impl: impl Vault **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/services/api/client.rs** Modify existing code **crates/router/src/types/api/payment_methods.rs** Modify existing code **crates/router/src/workflows/tokenized_data.rs** Add: - function: private::execute_workflow
{"issue_number": 2640, "pr_number": 2670, "commits_count": 2, "files_changed": 20, "response_length": 4416, "file_count": 33, "needs_breakdown": true}
[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(connector): add dummy connector template code - Merged: 2023-05-04T14:34:42Z - Files changed: 18 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add template code for dummy connector and feature flags to enable and disable it. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): add dummy connector template code (#970) Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/connector.rs** Add: - mod: pub::dummyconnector **crates/router/src/connector/dummyconnector.rs** Add: - function: private::build_headers - function: private::id - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::DummyConnector - impl: impl api::Payment for DummyConnector - impl: impl api::PaymentSession for DummyConnector - impl: impl api::ConnectorAccessToken for DummyConnector - impl: impl api::PreVerify for DummyConnector - impl: impl api::PaymentAuthorize for DummyConnector - impl: impl api::PaymentSync for DummyConnector - impl: impl api::PaymentCapture for DummyConnector - impl: impl api::PaymentVoid for DummyConnector - impl: impl api::Refund for DummyConnector - impl: impl api::RefundExecute for DummyConnector - impl: impl api::RefundSync for DummyConnector - impl: impl api::PaymentToken for DummyConnector - impl: impl ConnectorIntegration< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for DummyConnector - impl: impl ConnectorCommonExt<Flow, Request, Response> for DummyConnector - impl: impl ConnectorCommon for DummyConnector - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for DummyConnector - impl: impl ConnectorIntegration<api::Verify, types::VerifyRequestData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for DummyConnector - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for DummyConnector - impl: impl api::IncomingWebhook for DummyConnector - mod: private::transformers **crates/router/src/connector/dummyconnector/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::DummyConnectorPaymentsRequest - struct: pub::DummyConnectorCard - struct: pub::DummyConnectorAuthType - struct: pub::DummyConnectorPaymentsResponse - struct: pub::DummyConnectorRefundRequest - struct: pub::RefundResponse - struct: pub::DummyConnectorErrorResponse - enum: pub::DummyConnectorPaymentStatus - enum: pub::RefundStatus - impl: impl TryFrom<&types::PaymentsAuthorizeRouterData> for DummyConnectorPaymentsRequest - impl: impl TryFrom<&types::ConnectorAuthType> for DummyConnectorAuthType - impl: impl From<DummyConnectorPaymentStatus> for enums::AttemptStatus - impl: impl TryFrom< types::ResponseRouterData< F, DummyConnectorPaymentsResponse, T, types::PaymentsResponseData, >, > for types::RouterData<F, T, types::PaymentsResponseData> - impl: impl TryFrom<&types::RefundsRouterData<F>> for DummyConnectorRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>> for types::RefundsRouterData<api::Execute> - impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>> for types::RefundsRouterData<api::RSync> **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/connector_auth.rs** Modify existing code **crates/router/tests/connectors/dummyconnector.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_card_number - function: private::should_fail_payment_for_empty_card_number - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::DummyConnectorTest - impl: impl ConnectorActions for DummyConnectorTest - impl: impl utils::Connector for DummyConnectorTest **crates/router/tests/connectors/main.rs** Add: - mod: private::dummyconnector
{"issue_number": 726, "pr_number": 970, "commits_count": 1, "files_changed": 18, "response_length": 8763, "file_count": 12, "needs_breakdown": true}
fix(connector): [adyen] handle Webhook reference and object ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Update Psync response handler to consume the incoming webhook response - Handle Webhook Status Mapping ### 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). --> #3977 ## 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)? --> For Adyen all the subsequent payments are confirmed via Webhooks, So test Capture, Cancel, Refunds and Wallets payments. Payment Methods Need to be tested - Klarna (Manual Capture) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ooWwJsn2dIWX2JrPdAbV6SYbxVBF5W0LY2ZvWHV2U3F5UXRQdHDAm9zt5q7Hk0HL' \ --data-raw '{ "amount": 6540, "currency": "EUR", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "profile_id": "pro_doSItPZQZBbfoS0iEf81", "business_country": "US", "payment_method": "pay_later", "payment_method_type": "klarna", "payment_experience": "redirect_to_url", "connector": [ "adyen" ], "payment_method_data": { "pay_later": { "klarna_redirect": { "billing_email": "[email protected]", "billing_country": "DE" } } }, "routing": { "type": "single", "data": "adyen" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Paypal (Manual Capture) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ooWwJsn2dIWX2JrPdAbV6SYbxVBF5W0LY2ZvWHV2U3F5UXRQdHDAm9zt5q7Hk0HL' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "profile_id": "pro_doSItPZQZBbfoS0iEf81", "business_country": "US", "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_data": { "wallet": { "paypal_redirect": {} } }, "routing": { "type": "single", "data": "adyen" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Cards (Automatic and Manual) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ooWwJsn2dIWX2JrPdAbV6SYbxVBF5W0LY2ZvWHV2U3F5UXRQdHDAm9zt5q7Hk0HL' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "profile_id": "pro_doSItPZQZBbfoS0iEf81", "business_country": "US", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "371449635398431", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "7373" } }, "routing": { "type": "single", "data": "adyen" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - ideal (Automatic Capture) ``` **Confirm Call:** { "client_secret": "{{client_secret}}", "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "billing_details": { "billing_name": "John Doe" }, "bank_name": "n26", "preferred_language": "en", "country": "NL" } } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } } ``` - Do any of the operation `REFUND, CANCEL, CAPTURE` - Wait for Configured webhooks - Do a sync for Success Scenario **Outgoing Webhooks Example** - Charged <details><summary> Cards </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/47c3d2c1-3e13-4490-b54a-220ce4fe3873"> </details> <details><summary> Paypal </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/e4b32b2e-152a-4f75-8559-8e26994528d6"> </details> <details><summary> Klarna </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/62851be5-2b37-4d18-933c-cec2f956a6d8"> </details> <details><summary> Ideal </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/dec43f75-4859-43fe-a296-3a76362ec144"> </details> - Authorized <details><summary> Cards </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/6163f6fc-59ad-45da-86ee-9f847b5db5de"> </details> <details><summary> Paypal </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/94a1b125-06c1-4f47-9feb-37c551581bcf"> </details> <details><summary> Klarna </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/1875945d-e76c-43b8-9597-8dd9b89f7e76"> </details> <details><summary> Cancelled </summary> <img src = "https://github.com/juspay/hyperswitch/assets/55536657/1f24c3de-5e1a-4f13-aa72-4ac2f74b2a86"> </details> <details><summary> Captured </summary> <img src = "(https://github.com/juspay/hyperswitch/assets/55536657/e5d83e48-b70e-46f3-a815-6278878831a7"> </details> <details><summary> Refunded </summary> <img src = "(https://github.com/juspay/hyperswitch/assets/55536657/fef683dd-b4e2-498a-bc9a-6ef32206ef6c"> </details> ## 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): [adyen] handle Webhook reference and object - Merged: 2024-03-13T09:34:31Z - Files changed: 4 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [X] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Update Psync response handler to consume the incoming webhook response - Handle Webhook Status Mapping ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [adyen] handle Webhook reference and object (#4062) Files to modify: **crates/router/src/connector/adyen.rs** Add: - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response **crates/router/src/connector/adyen/transformers.rs** Remove: - impl: impl TryFrom<(&api::PayLaterData, Option<api_enums::CountryAlpha2>)> for value Add: - function: private::foreign_try_from - function: private::build_shopper_reference - function: pub::check_required_field - impl: impl ForeignTryFrom<(bool, AdyenWebhookStatus)> for storage_enums::AttemptStatus - impl: impl TryFrom<( &api::PayLaterData, &Option<api_enums::CountryAlpha2>, &Option<Email>, &Option<String>, &Option<ShopperName>, &Option<Secret<String>>, &Option<Address>, &Option<Address>, )> for ( pay_later_data, country_code, shopper_email, shopper_reference, shopper_name, telephone_number, billing_address, delivery_address, )
{"issue_number": 3976, "pr_number": 4062, "commits_count": 1, "files_changed": 4, "response_length": 2355, "file_count": 4, "needs_breakdown": false}
chore(codeowners): add codeowners data for PR reviews ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description Adding a CODEOWNERS file for facilitating PR reviews for teams ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> This leads to better ownership boundaries & increased efficiency for reviewers ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Doesn't need to be tested ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor: add mapping for ConnectorError in payouts flow - Merged: 2023-11-21T07:52:36Z - Files changed: 30 files - Commits: 11 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Issue - #2605 ### Additional Changes - [ ] 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 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor: add mapping for ConnectorError in payouts flow (#2608) Co-authored-by: Kashif <kashif@prot Files to modify: **crates/api_models/src/payouts.rs** Modify existing code **crates/diesel_models/src/payout_attempt.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/core/errors/utils.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/validator.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code
{"issue_number": 1, "pr_number": 2608, "commits_count": 1, "files_changed": 30, "response_length": 1443, "file_count": 10, "needs_breakdown": false}
fix: fixing payment method information for refunds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description This PR solves the following bugs 1. Refund not working for normal payments 2. Refund not working for recurring payments 3. While also maintaining support for `authorizedotnet` refunds <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 5. `crates/router/src/configs` 6. `loadtest/config` --> ## Motivation and Context N/A <!-- 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? <img width="688" alt="Screenshot 2023-01-06 at 5 25 32 PM" src="https://user-images.githubusercontent.com/51093026/211007775-4a04ad9a-2dd0-4866-8af1-f6c8c5ed1e5a.png"> <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code
<think> PR Context: - Title: fix: refund fix with `connector_metadata` - Merged: 2023-01-10T13:54:19Z - Files changed: 28 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description This PR overturns #313 & #314 This PR solves the following bugs 1. Refund not working for normal payments 2. Refund not working for recurring payments 3. While also maintaining support for `authorizedotnet` refunds <!-- Describe your changes in detail --> ### Additional Changes - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: refund fix with `connector_metadata` (#330) Files to modify: **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/authorizedotnet/transformers.rs** Modify existing code **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/cybersource/transformers.rs** Modify existing code **crates/router/src/connector/klarna/transformers.rs** Modify existing code **crates/router/src/connector/shift4/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/worldpay.rs** Modify existing code **crates/router/src/connector/worldpay/transformers.rs** Modify existing code **crates/router/src/core/errors/api_error_response.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/refunds/validator.rs** Add: - function: pub::validate_for_valid_refunds **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/db/payment_attempt.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/authorizedotnet.rs** Modify existing code **crates/router/tests/connectors/checkout.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/storage_models/src/payment_attempt.rs** Modify existing code **crates/storage_models/src/schema.rs** Modify existing code
{"issue_number": 313, "pr_number": 330, "commits_count": 1, "files_changed": 28, "response_length": 2809, "file_count": 28, "needs_breakdown": true}
feat(user_role): add support to get user role details v2 Add support to return user role details v2 Request will take email and response will return something like ``` [ { role_id: "r1", role_name: "name", org: { name: "Juspay", id: "o1" }, merchant: { // Optional name: "Juspay merchant", id: "m1" }, profile: { // Optional name: "Juspay profile", id: "p1" }, status: "status", entity_type: "type" } ] ```
<think> PR Context: - Title: feat(user_roles): get user role details - Merged: 2024-09-04T20:38:12Z - Files changed: 5 files - Commits: 11 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add support to get user role details ### 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. </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(user_roles): get user role details (#5777) Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::GetUserRoleDetailsResponseV2 - struct: pub::NameIdUnit **crates/router/src/core/user.rs** Add: - function: pub::list_user_roles_details **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::list_user_roles_details
{"issue_number": 5776, "pr_number": 5777, "commits_count": 1, "files_changed": 5, "response_length": 1261, "file_count": 7, "needs_breakdown": false}
refactor(config): redact config urls for hyperswitch vault ## 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 --> URLs are removed from config for Hyperswitch vault ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added in feature matrix api - Merged: 2025-02-25T19:48:48Z - Files changed: 12 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Fixes juspay/hyperswitch-cloud#8276 ## Description Added details feature api details for Jpmorgan, Payu, Digital Virgo. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment va </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added in feature matrix api Files to modify: **crates/hyperswitch_connectors/src/connectors/bitpay.rs** Remove: - impl: impl ConnectorSpecifications for Bitpay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Bitpay **crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Digitalvirgo Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Digitalvirgo **crates/hyperswitch_connectors/src/connectors/helcim.rs** Remove: - impl: impl ConnectorSpecifications for Helcim Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Helcim **crates/hyperswitch_connectors/src/connectors/jpmorgan.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Jpmorgan Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Jpmorgan **crates/hyperswitch_connectors/src/connectors/paybox.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Paybox Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Paybox **crates/hyperswitch_connectors/src/connectors/payu.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Payu - impl: impl ConnectorSpecifications for Payu Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Payu - impl: impl ConnectorSpecifications for Payu
{"issue_number": 8276, "pr_number": 7148, "commits_count": 1, "files_changed": 12, "response_length": 3337, "file_count": 8, "needs_breakdown": false}
[BUG] merchant account delete does not delete the `merchant_key_store` ### Bug Description When a merchant is created a `merchant_key_store` is created, which goes along with the `merchant_account`. But when the merchant account is deleted, the key store is not deleted. ### Expected Behavior Both merchant account and key store should be delted. ### Actual Behavior The key store still exists. ### Steps To Reproduce - Create a merchant account. - Delete the merchant account. ### Context For The Bug _No response_ ### Environment Local ### Have you spent some time checking if this bug has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? No, but I'm happy to collaborate on a PR with someone else
<think> PR Context: - Title: fix(router): merchant account delete does not delete the merchant_key_store - Merged: 2023-10-03T18:13:00Z - Files changed: 3 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Closes #2154 by calling `delete_merchant_key_store_by_merchant_id` at `merchant_account_delete` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies applicatio </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(router): merchant account delete does not delete the merchant_key_store (#2367) Files to modify: **crates/diesel_models/src/query/merchant_key_store.rs** Add: - function: pub::delete_by_merchant_id **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/db/merchant_key_store.rs** Add: - function: private::delete_merchant_key_store_by_merchant_id - function: private::delete_merchant_key_store_by_merchant_id
{"issue_number": 2154, "pr_number": 2367, "commits_count": 1, "files_changed": 3, "response_length": 1264, "file_count": 5, "needs_breakdown": false}
refactor(scheduler): improve code reusability and consumer logs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR contains changes to address the problems listed in #3711, namely: 1. Updates `ProcessTrackerExt::make_process_tracker_new()` method to accept a `tag` parameter in order to increase reusability. 2. Moves the `PTRunner` enum to the `diesel_models::process_tracker` module and renames it as `ProcessTrackerRunner`. 3. Makes use of the `ProcessTrackerExt::make_process_tracker_new()` method to construct all instances of `ProcessTrackerNew` within the codebase. 4. Move `ProcessTrackerExt::make_process_tracker_new()` as `ProcessTrackerNew::new()` method. 5. Removes a redundant `update_process_tracker()` method from the `ProcessTrackerInterface` trait in favor of the `update_process()` method from the same trait. 6. Moves the `reset()`, `retry()` and `finish_with_status()` methods from `ProcessTrackerExt` trait to `ProcessTrackerInterface` trait. 7. Update the business status insertion/updation logic to reduce cardinality of the business status column in the resulting process tracker table. 8. Adds/updates logs that would be displayed when specific parts of the scheduler execution fails. ## 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). --> Resolves #3711. ## 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)? --> Most of the changes involve moving existing code around, which should not affect the functioning of the scheduler, which I've verified by confirming the correct functioning of the payment sync workflow: the workflow now successfully completes with a business status of `COMPLETED_BY_PT` (only) instead of also including the process tracker ID in the business status. ### Sanity testing of process tracker with payments sync workflow 1. Disable any incoming payment webhooks from the connector with which a payment will be created in the next step. 2. Create a payment with a connector such that the payment reaches the processing state. 3. Check if the process tracker performs a payments sync successfully and updates the status of the payment to either succeeded or failed: 1. Immediately after creating the payment, you should see an entry in the `process_tracker` table with status `new` and business status `Pending`. The task should be scheduled to execute in a few minutes' time from the time of creation of the payment. 2. Once the producer picks up the task, the status should be `processing` and business status remains same. 3. Once the consumer picks up the task, the status should be `process_started` and business status remains same. If the execution of the task completes quickly enough, you might not notice this status transition. 4. Once the consumer has successfully completed the execution of the task, the final status should be `finish` and business status should be `COMPLETED_BY_PT`. 5. If you perform a payments retrieve after the execution of the task has completed, the payment intent's status should now be updated to a succeeded or failed state, as reported by the connector. ### Screenshots from local manual testing - Screenshot of process tracker entry in database after successful payment sync workflow execution: <img width="1200" alt="Screenshot of process tracker entry in database" src="https://github.com/juspay/hyperswitch/assets/22217505/7be2948e-e666-4d02-9003-306512c39d5c"> As for the logs, I've verified that logs are shown when there are consumer workflow execution errors: - Screenshot of error log displayed when the process tracker entry in the database table contains a value that does not correspond to a valid `ProcessTrackerRunner` variant: <img width="800" alt="Screenshot of error indicating invalid workflow runner name" src="https://github.com/juspay/hyperswitch/assets/22217505/2057e83d-873d-4d5c-8d79-b3e349012155"> This can be used to identify if an old version of the `consumer` service is deployed with a relatively newer version of the `router` service with newer process tracker workflows. - Screenshot of error log displayed when the `email` feature is enabled on the `router` service, but disabled on the `consumer` service: <img width="800" alt="Screenshot of error indicating email feature being disabled" src="https://github.com/juspay/hyperswitch/assets/22217505/cca4ab95-9ae6-4eb0-820d-3232f0fc1f3f"> This does not typically occur in our hosted environments, since we run builds/images with most (if not all) features enabled. ## 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: chore(process_tracker): use `const` instead of `String` for `business_status` - Merged: 2024-06-14T11:53:19Z - Files changed: 14 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> When below command is executed in sandbox DB, we get a set of "distinct" `business_status`es that is specified for process tracker: ```sql SELECT DISTINCT(business_status) FROM process_tracker; ``` For debugging and fun, execute to l </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** chore(process_tracker): use `const` instead of `String` for `business_status` (#4849) Co-authored-by Files to modify: **crates/diesel_models/src/process_tracker.rs** Add: - mod: pub::business_status **crates/router/src/bin/scheduler.rs** Modify existing code **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/webhooks/outgoing.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/types/storage.rs** Modify existing code **crates/router/src/workflows/api_key_expiry.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/scheduler/src/consumer.rs** Modify existing code **crates/scheduler/src/consumer/workflows.rs** Modify existing code **crates/scheduler/src/db/process_tracker.rs** Modify existing code
{"issue_number": 3712, "pr_number": 4849, "commits_count": 1, "files_changed": 14, "response_length": 1911, "file_count": 16, "needs_breakdown": true}
[FEATURE]: [Bitpay] 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): [Bitpay] Add order id as the reference id - Merged: 2023-11-06T18:10:57Z - Files changed: 1 files - Commits: 6 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> [Relevant documentation](https://developer.bitpay.com/docs/create-invoice#notificationurl) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application c </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Bitpay] Add order id as the reference id (#2591) Co-authored-by: AkshayaFoiger <13 Files to modify: **crates/router/src/connector/bitpay/transformers.rs** Modify existing code
{"issue_number": 2325, "pr_number": 2591, "commits_count": 1, "files_changed": 1, "response_length": 988, "file_count": 3, "needs_breakdown": false}
[FEATURE] Sorting POC Allow sorting on amount and date in tables under Operations If user clicks on the arrow to sort information being on a page which is not the first one, we will sort the data via backend and redirect them to first page Performance POC to be done for the same
<think> PR Context: - Title: feat(payments): support sort criteria in payments list - Merged: 2024-07-26T14:18:48Z - Files changed: 3 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Support sort criterial for payments list: - sort on basis of amount (ascending or descending) - sort on basis of created at time (ascending or descending) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payments): support sort criteria in payments list (#5389) Co-authored-by: hyperswitch-bot[bot] Files to modify: **crates/api_models/src/payments.rs** Add: - struct: pub::Order - enum: pub::SortOn - enum: pub::SortBy **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"issue_number": 5364, "pr_number": 5389, "commits_count": 1, "files_changed": 3, "response_length": 1195, "file_count": 5, "needs_breakdown": false}
[FEATURE]: [Coinbase] 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): [Coinbase] Add order id as the reference id - Merged: 2023-10-07T07:02:17Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Relevant documentation [here](https://docs.cloud.coinbase.com/commerce/docs/webhooks-events). I'm not 100% sure what `code` is in the documentation but they haven't provided more clarity, the only other identifier for the transaction is id, so </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Coinbase] Add order id as the reference id (#2469) Files to modify: **crates/router/src/connector/coinbase/transformers.rs** Modify existing code
{"issue_number": 2326, "pr_number": 2469, "commits_count": 1, "files_changed": 1, "response_length": 962, "file_count": 3, "needs_breakdown": false}
[FEATURE] Create a delete endpoint for Config Table ### Feature Description Add an API for deleting data from config table. ### Possible Implementation Add the endpoint DELETE `config/{key}` for deleting the config key. ### Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? None
<think> PR Context: - Title: feat(router): added api for the deleting config key - Merged: 2024-02-22T11:48:06Z - Files changed: 8 files - Commits: 9 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added the api to delete config key Fixes #3488 <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): added api for the deleting config key (#3554) Co-authored-by: Kartikeya Hegde <karthih Files to modify: **crates/diesel_models/src/query/configs.rs** Modify existing code **crates/router/src/core/configs.rs** Add: - function: pub::config_delete **crates/router/src/db/configs.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/configs.rs** Add: - function: pub::config_key_delete **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 3488, "pr_number": 3554, "commits_count": 1, "files_changed": 8, "response_length": 1457, "file_count": 10, "needs_breakdown": false}
[FEATURE] Analytics for payouts ### Feature Description **APIs** There is no provision for listing / filtering payout transactions processed via HyperSwitch. This needs to be implemented for analytical processing for payouts. - List API helps in listing payouts based on generic constraints - Filter API helps in filtering payouts based on payout specific filters **Dashboard Analytics** There are two tables for core payout operations - payouts - payout_attempt The information regarding payouts and the attempts are stored in respective tables. For fetching all the information, there needs to be 2 DB calls for gathering entire context. As of writing this issue, Hyperswitch's dashboard can read data only from a single table in CKH. As a temporary measure, all the required fields are to be moved to a single table. ### Possible Implementation List API to include below constraints (similar to payments) - customer_id - starting_after - ending_before - limit - created - created_lt - created_gt - created_lte - created_gte Filter API to include below filters - payout_id - profile_id - customer_id - limit - offset - time_range - connector - currency - status - payout_method - entity_type Below columns are to be added in `payout_attempt` - payout_type - amount - destination_currency - source_currency - recurring - entity_type ### 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(payouts): add kafka events - Merged: 2024-04-10T09:27:30Z - Files changed: 16 files - Commits: 26 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payouts): add kafka events (#4264) Co-authored-by: Ivor Dsouza <[email protected]> Co-autho Files to modify: **crates/data_models/src/payouts/payout_attempt.rs** Modify existing code **crates/data_models/src/payouts/payouts.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/payouts/retry.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/events.rs** Modify existing code **crates/router/src/services/kafka.rs** Remove: - mod: private::payout Add: - mod: pub::payout **crates/router/src/services/kafka/payout.rs** Modify existing code **crates/storage_impl/src/mock_db/payout_attempt.rs** Modify existing code **crates/storage_impl/src/mock_db/payouts.rs** Modify existing code **crates/storage_impl/src/payouts/payout_attempt.rs** Modify existing code **crates/storage_impl/src/payouts/payouts.rs** Modify existing code
{"issue_number": 3652, "pr_number": 4264, "commits_count": 1, "files_changed": 16, "response_length": 1828, "file_count": 15, "needs_breakdown": false}
[CHORE] FIX TYPOS IN THE REPO Its been months since the typos in the repo being unaddressed. This has resulted in negligence leading to even more typos being introduced.
<think> PR Context: - Title: chore: fix typos in the repo - Merged: 2025-05-23T07:52:09Z - Files changed: 29 files - Commits: 9 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates all the typos in the repository. For reference, check: https://github.com/juspay/hyperswitch/actions/runs/15082629873/job/42401247676?pr=8056 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** chore: fix typos in the repo (#8063) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_types/src/payment_methods.rs** Modify existing code **crates/common_utils/src/macros.rs** Modify existing code **crates/common_utils/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Remove: - struct: pub::FiuuWebhookSignauture Add: - struct: pub::FiuuWebhookSignature **crates/hyperswitch_connectors/src/connectors/recurly.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldpay/response.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/core/revenue_recovery.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/utils/currency.rs** Modify existing code
{"issue_number": 8064, "pr_number": 8063, "commits_count": 1, "files_changed": 29, "response_length": 2124, "file_count": 17, "needs_breakdown": true}
fix(payments): populate payments method data in list Populate payment method data in payments list to get details of card network.
<think> PR Context: - Title: fix(payments): populate payment method data in payments list - Merged: 2024-06-10T07:51:50Z - Files changed: 1 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Populate payment method data in payments list to get card network details. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments): populate payment method data in payments list (#4919) Files to modify: **crates/router/src/core/payments/transformers.rs** Modify existing code
{"issue_number": 4914, "pr_number": 4919, "commits_count": 1, "files_changed": 1, "response_length": 955, "file_count": 3, "needs_breakdown": false}
[FEATURE]: [Klarna] 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): [Klarna] Enhance currency Mapping with ConnectorCurrencyCommon Trait - Merged: 2023-10-02T15:53:27Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This pull request implements the `get_currency_unit` from the `ConnectorCommon` trait for the Klarna connector. This function allows connectors to declare their accepted currency unit as either `Base` or `Minor`. For Klarna it accepts currency as `Minor` units. ### Additional Changes - [ ] This PR modifies the API contra </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [Klarna] Enhance currency Mapping with ConnectorCurrencyCommon Trait (#2414) Files to modify: **crates/router/src/connector/klarna.rs** Add: - function: private::get_currency_unit **crates/router/src/connector/klarna/transformers.rs** Add: - function: private::try_from - struct: pub::KlarnaRouterData - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for KlarnaRouterData<T>
{"issue_number": 2230, "pr_number": 2414, "commits_count": 1, "files_changed": 2, "response_length": 1321, "file_count": 4, "needs_breakdown": false}
[BUG] mandate details are not persisted for Adyen connector ### Bug Description This is specific to Adyen's connector integration. In case mandate details were not present in the response of payment sync with Adyen, these details are sent through webhooks. However, these details are not being persisted in DB leading to MIT failures. ### Expected Behavior Mandate details sent in the webhook's request should be persisted in payment_methods table for future MITs ### Actual Behavior Mandate details sent in the webhook's request are not persisted in `payment_methods` table. ### 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: feat(webhooks): adyen - consume and update connector's network_transaction_id in payment_methods - Merged: 2024-12-05T13:34:59Z - Files changed: 7 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6719 This PR introduces below changes - `get_network_txn_id` fn in IncomingWebhook trait - implement this new fn for Adyen for retrieving the network txn ID - consume this fn in core flows for updating `network_transaction_id` in `payment_methods` table ### Add </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(webhooks): adyen - consume and update connector's network_transaction_id in payment_methods (#6 Files to modify: **crates/diesel_models/src/payment_method.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs** Add: - function: pub::new - function: pub::get_id - struct: pub::ConnectorNetworkTxnId - impl: impl ConnectorNetworkTxnId **crates/hyperswitch_interfaces/src/webhooks.rs** Add: - function: private::get_network_txn_id **crates/router/src/connector/adyen.rs** Add: - function: private::get_network_txn_id **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/services/connector_integration_interface.rs** Add: - function: private::get_network_txn_id
{"issue_number": 6719, "pr_number": 6738, "commits_count": 1, "files_changed": 7, "response_length": 1694, "file_count": 9, "needs_breakdown": false}
[CYPRESS_FRAMEWORK] Re-use config update commands **Description:** Cypress is the testing framework that Hyperswitch uses to run automated tests. Having good grip on Javascript to work on Cypress is a must. Cypress makes use of custom [commands](https://github.com/juspay/hyperswitch/blob/main/cypress-tests/cypress/support/commands.js) to make requests and parse responses instead of having the exchange put in a spec file. This increases the code redundancy. Custom commands are versatile that helps in reducing command duplication. These commands should be generic and should be capable of handling multiple requests of same / similar type. **The problem:** Currently, there exist `3` implementations that makes update config request for different purposes: - [autoRetryConfig](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/support/commands.js#L2229-L2255) - [setMaxAutoRetries](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/support/commands.js#L2257-L2282) - [stepUp](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/support/commands.js#L2312-L2334) These are called by [Retries](https://github.com/juspay/hyperswitch/blob/main/cypress-tests/cypress/e2e/RoutingTest/00003-Retries.cy.js) tests under Routing specs. **Getting started:** Go through the [README](https://github.com/juspay/hyperswitch/blob/main/cypress-tests/readme.md) for guidelines on file structure, formatting and instructions on how to set up and run Cypress. In short: ```sh cd cypress-tests npm ci ``` **Possible implementation:** Refactor config update `context`s in the spec file (for example: [Update max auto retries](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/e2e/RoutingTest/00003-Retries.cy.js#L102-L108), [Enable auto retries](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/e2e/RoutingTest/00003-Retries.cy.js#L46-L48), [Step up](https://github.com/juspay/hyperswitch/blob/45c19a1729af3f4b80bde2661868cb213138df86/cypress-tests/cypress/e2e/RoutingTest/00003-Retries.cy.js#L482C10-L483C14)) and pass as all the necessary data into the new unified command in [commands](https://github.com/juspay/hyperswitch/blob/main/cypress-tests/cypress/support/commands.js) **Additional info:** - Language: Javascript - Difficulty: Easy ### 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: refactor(cypress): reuse config update command - Merged: 2024-10-16T06:51:34Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## Type of Change - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD This pull request resolves issue #5913 ## Description This PR refactors the existing Cypress commands used for configuration updates (autoRetryConfig, setMaxAutoRetries, and stepUp) into a single unified command cy.updateConfig. The refactor helps reduce redundancy in the codebase by consolidating multiple similar implementations into one </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 5913, "pr_number": 6197, "commits_count": 0, "files_changed": 2, "response_length": 776, "file_count": 0, "needs_breakdown": false}
[FEATURE]: Add Session token flow for Paypal Sdk ### Feature Description Add Session token flow for Paypal Sdk ### Possible Implementation - Accept data in `metadata` field of the MCA - create call - Return that data in the sessions call - Change payment_experience for paypal via paypal to sdk ### 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(core): [Paypal] Add session_token flow for Paypal sdk - Merged: 2024-05-27T11:19:17Z - Files changed: 28 files - Commits: 24 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add session_token flow to enable Paypal via Paypal SDK - Accept data in `metadata` field of the MCA - create call - Return that data in the sessions call - Change payment_experience for paypal via paypal to sdk ### Additional Changes </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): [Paypal] Add session_token flow for Paypal sdk (#4697) Co-authored-by: swangi-kumari <sw Files to modify: **crates/api_models/src/payments.rs** Add: - struct: pub::SdkNextActionData - struct: pub::PaypalSdkMetaData - struct: pub::PaypalSdkSessionTokenData **crates/connector_configs/src/common_config.rs** Add: - struct: pub::PaypalSdkData **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/openapi/src/openapi.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/configs/defaults.rs** Modify existing code **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/paypal.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Add: - function: private::create_paypal_sdk_session_token **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/bambora.rs** Modify existing code **crates/router/tests/connectors/forte.rs** Modify existing code **crates/router/tests/connectors/nexinets.rs** Modify existing code **crates/router/tests/connectors/paypal.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/zen.rs** Modify existing code
{"issue_number": 4698, "pr_number": 4697, "commits_count": 1, "files_changed": 28, "response_length": 2798, "file_count": 26, "needs_breakdown": true}
[BUG]Noon Connector V2 API Failure - Missing order_category in Authorize flow ### Bug Description The Noon Connector V2 API is failing in the payment flow with the error “Missing required param: order_category.” This happens because the connector_metadata is not being extracted properly in the V2 confirm-intent flow, which causes the order_category field to be None. ### Expected Behavior The Noon Connector V2 API should extract order_category from connector_metadata during the payment flow. When a request with valid connector_metadata is sent, the order_category value should be passed correctly to the connector, and the payment should proceed without errors. ### Actual Behavior The connector_metadata is not being extracted in the V2 payment flow, causing the `order_category` field to be None. As a result, the API returns the error `Missing required param: order_category`, and the payment flow fails to complete. ### 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(payments): add connector metadata parsing and order category to payment router data - Merged: 2025-10-16T10:25:01Z - Files changed: 8 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description The Noon Connector V2 API is failing in the payment flow with the error `Missing required param: order_category.` This happens because the connector_metadata is not being extracted in the V2 confirm-intent flow, which causes the order_category field to be None. The fix involves co </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payments): add connector metadata parsing and order category to payment router data (#9825) Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Remove: - function: pub::get_optional_connector_metadata **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_intent.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/services/kafka/payment_intent.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code
{"issue_number": 9824, "pr_number": 9825, "commits_count": 1, "files_changed": 8, "response_length": 1600, "file_count": 10, "needs_breakdown": false}
feat: decision manger for user flows As we are going to split all the APIs, we need a way to get the next API that dashboard should go to using the current flow/origin. We need a decision manager that can take the current flow and origin and give the next flow.
<think> PR Context: - Title: feat(users): Create Decision manager for User Flows - Merged: 2024-05-02T15:12:54Z - Files changed: 10 files - Commits: 18 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - This PR will enable APIs to get the next flow from the current flow. - This PR will also add a query param which will enable to access the new flows. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): Create Decision manager for User Flows (#4518) Co-authored-by: hyperswitch-bot[bot] <14 Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::TokenOnlyQueryParam - struct: pub::TokenResponse - enum: pub::SignInWithTokenResponse **crates/common_enums/src/enums.rs** Add: - enum: pub::TokenPurpose **crates/router/src/core/user.rs** Modify existing code **crates/router/src/routes/user.rs** Modify existing code **crates/router/src/routes/user_role.rs** Modify existing code **crates/router/src/services/authentication.rs** Remove: - struct: pub::SinglePurposeJWTAuth - enum: pub::Purpose Add: - struct: pub::SinglePurposeJWTAuth **crates/router/src/services/authentication/blacklist.rs** Modify existing code **crates/router/src/types/domain/user.rs** Add: - function: pub::get_preferred_or_active_user_role_from_db - mod: pub::decision_manager **crates/router/src/types/domain/user/decision_manager.rs** Add: - function: private::is_required - function: private::is_required - function: pub::generate_spt - function: private::is_required - function: pub::generate_jwt - function: private::get_flows - function: pub::new - function: pub::next - function: pub::from_origin - function: pub::get_flow - function: private::from - function: private::from - function: private::from - struct: pub::CurrentFlow - struct: pub::NextFlow - enum: pub::UserFlow - enum: pub::SPTFlow - enum: pub::JWTFlow - enum: pub::Origin - impl: impl UserFlow - impl: impl SPTFlow - impl: impl JWTFlow - impl: impl Origin - impl: impl CurrentFlow - impl: impl NextFlow - impl: impl From<UserFlow> for TokenPurpose - impl: impl From<SPTFlow> for TokenPurpose - impl: impl From<JWTFlow> for TokenPurpose
{"issue_number": 4517, "pr_number": 4518, "commits_count": 1, "files_changed": 10, "response_length": 2732, "file_count": 12, "needs_breakdown": false}
[FEATURE]: [OpenNode] 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(router): [OpenNode] response reference id - Merged: 2023-10-04T08:01:36Z - Files changed: 1 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding ch </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): [OpenNode] response reference id (#2416) Files to modify: **crates/router/src/connector/opennode/transformers.rs** Modify existing code
{"issue_number": 2342, "pr_number": 2416, "commits_count": 1, "files_changed": 1, "response_length": 932, "file_count": 3, "needs_breakdown": false}
ci: add tests that make use of locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces necessary refactoring to add support for locker specific tests. This includes `addition of delete payment method` (which is restricted to work only on hosted environments and not local given `tartarus` is unavailable and is complicated to setup things) but not limited to: - fixes: - fix reports not being generated - fix multiple credential not picking proper api keys - refactoring: - move configs that makes use of response custom under `getCustomExchange` - misc: - clarify ntid files to make them meaningful - update dependencies - update cypress credential to support stripe multiple api keys - feat: - add multiple credential support for stripe - add ntid support for stripe with another api key - add recurring mit payment endpoint to ntid connector agnostic flows ### 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)? --> delete payment method: |local|hosted| |-|-| |<img width="457" alt="image" src="https://github.com/user-attachments/assets/8b65aa07-3ee6-46f7-83ac-8850e3530aa2">|<img width="462" alt="image" src="https://github.com/user-attachments/assets/2712463c-a458-483c-9daf-d17b3f9b573b">| |`5xx` is expected since this requires locker to be set up locally which is not optimal|`2xx` is expected since locker is already setup| ntid with mit based on payment token: |cybersource|stripe| |-|-| |<img width="463" alt="image" src="https://github.com/user-attachments/assets/64686ac4-4b0f-4bbc-94c7-f60d0c5c4a7f" />|<img width="467" alt="image" src="https://github.com/user-attachments/assets/4059ac5c-2ad1-4bc0-b149-a2c867b465ed" />| |adyen|bluesnap|cybersource|stripe| |-|-|-|-| |<img width="467" alt="image" src="https://github.com/user-attachments/assets/0716b0bb-f34b-47bf-a27f-32bfe322935f" />|<img width="462" alt="image" src="https://github.com/user-attachments/assets/ca98cc84-cb72-4dc8-91c3-7654c628f347" />|<img width="554" alt="image" src="https://github.com/user-attachments/assets/4e01f0fe-acb0-4ecf-8873-be35a16c052c" />|<img width="555" alt="image" src="https://github.com/user-attachments/assets/86a052c2-3a51-4952-abf8-8f93826959e9" />| |adyen ntid failure has been addressed in #6851. #6735 has been soft cherry-picked and the tests have been run against local|||stripe with multiple credential support (ntid)| ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `prettier . --write` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: fix: cypress reports generation - Merged: 2024-12-20T08:19:41Z - Files changed: 3 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> closes https://github.com/juspay/hyperswitch/issues/6893 this pr also bumps cypress dependencies ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies appl </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6735, "pr_number": 6894, "commits_count": 0, "files_changed": 3, "response_length": 761, "file_count": 0, "needs_breakdown": false}
[FEATURE] Add Refund Sync route in Stripe compatibility ### Feature Description There is a refund sync route https://github.com/juspay/hyperswitch/blob/573a4d384ee6a9d72648ab537804799a3993e1e8/crates/router/src/routes/app.rs#L184 A similar route needs to be added in the compatibility layer in this file - https://github.com/juspay/hyperswitch/blob/main/crates/router/src/compatibility/stripe/refunds.rs ### Possible Implementation refer similar route of payments as an example. - https://github.com/juspay/hyperswitch/blob/573a4d384ee6a9d72648ab537804799a3993e1e8/crates/router/src/compatibility/stripe/app.rs#L12 ### 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: feat(compatibility): add refund retrieve endpoint which accepts gateway creds - Merged: 2023-04-24T19:52:10Z - Files changed: 3 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR is based on the issue #920 to add refund sync with gateway creds in stripe compatibility. Adds a new service refund_retrieve_with_gateway_creds which parses the JSON to type RefundsRetrieveRequest which already has an optional fiel </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(compatibility): add refund retrieve endpoint which accepts gateway creds (#958) Files to modify: **crates/router/src/compatibility/stripe/app.rs** Modify existing code **crates/router/src/compatibility/stripe/refunds.rs** Add: - function: pub::refund_retrieve_with_gateway_creds
{"issue_number": 920, "pr_number": 958, "commits_count": 1, "files_changed": 3, "response_length": 1104, "file_count": 4, "needs_breakdown": false}
feat(router): Include `payment_experience` in PML for payments response (v2) Required by SDK
<think> PR Context: - Title: feat(router): Return payment_experience in PML for payment (v2) - Merged: 2025-06-05T16:40:31Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added `payment_experience` in Payment Method List for Payments Response ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environm </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): Return payment_experience in PML for payment (v2) (#8255) Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/core/payments/payment_methods.rs** Modify existing code
{"issue_number": 8254, "pr_number": 8255, "commits_count": 1, "files_changed": 3, "response_length": 1026, "file_count": 4, "needs_breakdown": false}
fix(connector): [noon] sync with reference_id ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> sync payments and refunds with our reference_id ### 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: revert: fix(connector): [noon] sync with reference_id - Merged: 2023-10-12T08:03:00Z - Files changed: 10 files - Commits: 1 commits Implementation approach: Reverts juspay/hyperswitch#2544 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** revert: fix(connector): [noon] sync with reference_id (#2556) Files to modify: **crates/router/src/connector/noon.rs** Modify existing code **crates/router/src/connector/noon/transformers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/tests/connectors/bambora.rs** Modify existing code **crates/router/tests/connectors/forte.rs** Modify existing code **crates/router/tests/connectors/nexinets.rs** Modify existing code **crates/router/tests/connectors/paypal.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/zen.rs** Modify existing code
{"issue_number": 2544, "pr_number": 2556, "commits_count": 1, "files_changed": 10, "response_length": 1081, "file_count": 12, "needs_breakdown": false}
[BUG]: [Noon] Payment not reaching terminal state ### Bug Description If there is a timeout or some other unfortunate instance in the application the payment is put in `pending` state, when we sync the payment with Noon, in some cases it returns 4xx and we do not update the status. But for some status like `order_does_not_exist` in their system we should fail it immediately. ### Expected Behavior for some status like `order_does_not_exist` in their system we should fail it immediately. ### Actual Behavior in some cases it returns 4xx and we do not update the status. ### 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): [noon] Fail the payment for specific error_response - Merged: 2024-02-19T10:13:33Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently in Psync if 4xx or 5xx comes the payment_status is not changed for all the error_codes, for specific error_codes like order does not exist should be failed immediately. ### Additional Changes - [ ] This PR modifies the API cont </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(connector): [noon] Fail the payment for specific error_response (#3674) Files to modify: **crates/router/src/connector/noon.rs** Modify existing code
{"issue_number": 3675, "pr_number": 3674, "commits_count": 1, "files_changed": 1, "response_length": 957, "file_count": 3, "needs_breakdown": false}
feat(compatibility): add multiuse mandates support in stripe compatibility ## 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 --> Populate Mandate data for multi-use mandates ## 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.Create a mandate payment with noon through stripe compatibility layer <img width="1334" alt="Screenshot 2024-01-23 at 1 56 50 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/e9cd6c97-f1a7-4f07-b252-5fcef6ed62bf"> 2.Do a mandate payment with the same <img width="1006" alt="Screenshot 2024-01-23 at 1 52 49 PM" src="https://github.com/juspay/hyperswitch/assets/131388445/1267b1c6-7739-49ba-a3a4-aedf9d4cec39"> ## 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(compatibility): revert add multiuse mandates support in stripe compatibility - Merged: 2024-01-24T10:36:48Z - Files changed: 1 files - Commits: 2 commits Implementation approach: Reverts juspay/hyperswitch#3425 resolves [#3445](https://github.com/juspay/hyperswitch/issues/3445) Dependency changes not made </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** Refactor(compatibility): revert add multiuse mandates support in stripe compatibility (#3436) Files to modify: **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code
{"issue_number": 3425, "pr_number": 3436, "commits_count": 1, "files_changed": 1, "response_length": 650, "file_count": 3, "needs_breakdown": false}
[FEATURE] Allow rotating and revoking API keys ### Feature Description As of now, the `merchant_account` table has an `api_key` field which restricts a merchant account to only have one API key. Furthermore, there are no mechanisms in place to revoke and regenerate API keys. To improve the convenience of rotating and revoking API keys, it'd be better to allow multiple API keys to be associated with a merchant account. Furthermore, API keys are stored in plaintext as of now. It'd be great if they could be hashed as well, when this request is addressed. ### Possible Implementation A possible approach to address this is to add an `api_keys` table with `name`, `merchant_id`, `hashed_key` fields (including any additional fields as necessary). And for the API interface, this could include endpoints to create, retrieve, update and revoke an API key, and an endpoint to list all API keys associated with the current merchant account. ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: fix(storage_models): fix inconsistent field order for merchant account types - Merged: 2023-02-06T12:50:25Z - Files changed: 2 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> This PR fixes inconsistent field order for merchant account types as compared to the generated `schema.rs` file when the `diesel migration run` command is run on a fresh clone of the repository. ## Motivation and Context <!-- Why is this change required? What problem does </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(storage_models): fix inconsistent field order for merchant account types (#503) Files to modify: **crates/storage_models/src/merchant_account.rs** Modify existing code **crates/storage_models/src/schema.rs** Modify existing code **Commit 2:** fix(storage_models): fix inconsistent field order for merchant account types (#503) Files to modify: **crates/storage_models/src/merchant_account.rs** Modify existing code **crates/storage_models/src/schema.rs** Modify existing code
{"issue_number": 501, "pr_number": 503, "commits_count": 2, "files_changed": 2, "response_length": 1303, "file_count": 7, "needs_breakdown": false}
feat: add blacklist for roles After a role is updated, the users who are using that role at that time should get new tokens. So, the role should be blacklisted.
<think> PR Context: - Title: feat(roles): Add blacklist for roles - Merged: 2024-02-23T11:09:44Z - Files changed: 4 files - Commits: 8 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds ability to blacklist roles to stop JWTs after a role is changed. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/en </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(roles): Add blacklist for roles (#3794) Co-authored-by: hyperswitch-bot[bot] <148525504+hypersw Files to modify: **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/services/authentication/blacklist.rs** Add: - function: pub::insert_role_in_blacklist - function: pub::check_role_in_blacklist - function: private::check_in_blacklist - function: private::check_in_blacklist - trait: pub::BlackList - impl: impl BlackList for AuthToken - impl: impl BlackList for UserAuthToken
{"issue_number": 3793, "pr_number": 3794, "commits_count": 1, "files_changed": 4, "response_length": 1445, "file_count": 6, "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: refactor(connector-configs): worldpay - update username / password mapping - Merged: 2024-12-05T14:02:43Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6316 point # 8 This PR includes WASM changes for Worldpay MCA creation on dashboard. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variable </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 6316, "pr_number": 6752, "commits_count": 0, "files_changed": 3, "response_length": 804, "file_count": 0, "needs_breakdown": false}
feat(payouts): Add profile level get filters API for payouts Currently payout get filter API gives filters whole merchant. Since dashboard is being moved to profile level, filter API at profile level should be needed.
<think> PR Context: - Title: feat(payouts): Add profile level payout filter API - Merged: 2024-09-05T11:36:44Z - Files changed: 3 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - This PR adds a profile level get filters api for payouts. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variable </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payouts): Add profile level payout filter API (#5808) Files to modify: **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payouts.rs** Modify existing code
{"issue_number": 5805, "pr_number": 5808, "commits_count": 1, "files_changed": 3, "response_length": 1045, "file_count": 5, "needs_breakdown": false}
refactor: Add OLAP feature for replica database ## 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 --> ### Additional Changes - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes --> ## Motivation and Context Added a feature called OLAP which enables us to add read replica database in the application and use it wherever we want ## How did you test it? Run `cargo r --features olap` and check if it can create a connection to read replica database ## 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 payments update-intent API for v2 - Merged: 2024-12-09T07:45:58Z - Files changed: 23 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added `update-intent` API for payments ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): Add payments update-intent API for v2 (#6490) Co-authored-by: hyperswitch-bot[bot] <1485 Files to modify: **crates/api_models/src/payments.rs** Add: - function: pub::order_amount - function: pub::currency - function: pub::shipping_cost - function: pub::order_tax_amount - function: pub::skip_external_tax_calculation - function: pub::skip_surcharge_calculation - function: pub::surcharge_amount - function: pub::tax_on_surcharge - struct: pub::PaymentsUpdateIntentRequest - struct: pub::AmountDetailsUpdate - impl: impl AmountDetailsUpdate **crates/common_enums/src/enums.rs** Add: - function: private::from - function: pub::as_bool - function: private::from - function: pub::as_bool - impl: impl From<Option<bool>> for TaxCalculationOverride - impl: impl TaxCalculationOverride - impl: impl From<Option<bool>> for SurchargeCalculationOverride - impl: impl SurchargeCalculationOverride **crates/diesel_models/src/kv.rs** Add: - struct: pub::PaymentIntentUpdateMems **crates/diesel_models/src/payment_intent.rs** Remove: - function: pub::apply_changeset - function: private::from - enum: pub::PaymentIntentUpdate - impl: impl PaymentIntentUpdate - impl: impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal **crates/hyperswitch_domain_models/src/lib.rs** Remove: - function: private::from - function: private::from - impl: impl From<common_enums::SurchargeCalculationOverride> for payments::SurchargeCalculationOverride - impl: impl From<common_enums::TaxCalculationOverride> for payments::TaxCalculationOverride **crates/hyperswitch_domain_models/src/payments.rs** Remove: - function: private::from - function: private::from - enum: pub::TaxCalculationOverride - enum: pub::SurchargeCalculationOverride - impl: impl From<Option<bool>> for TaxCalculationOverride - impl: impl From<Option<bool>> for SurchargeCalculationOverride **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Remove: - struct: pub::PaymentIntentUpdateInternal **crates/hyperswitch_domain_models/src/router_flow_types/payments.rs** Add: - struct: pub::PaymentUpdateIntent **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Add: - function: pub::payments_update_intent **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_update_intent **crates/router/src/core/payments/operations/payment_update_intent.rs** Add: - function: private::validate_status_for_operation - 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::get_trackers - function: private::update_trackers - function: private::validate_request - function: private::get_customer_details - function: private::make_pm_data - function: private::perform_routing - function: private::guard_payment_against_blocklist - struct: pub::PaymentUpdateIntent - impl: impl ValidateStatusForOperation for PaymentUpdateIntent - impl: impl Operation<F, PaymentsUpdateIntentRequest> for &PaymentUpdateIntent - impl: impl Operation<F, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl ValidateRequest<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent - impl: impl Domain<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent **crates/router/src/core/payments/transformers.rs** Remove: - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<common_enums::TaxCalculationOverride> for hyperswitch_domain_models::payments::TaxCalculationOverride - impl: impl ForeignFrom<hyperswitch_domain_models::payments::TaxCalculationOverride> for common_enums::TaxCalculationOverride - impl: impl ForeignFrom<common_enums::SurchargeCalculationOverride> for hyperswitch_domain_models::payments::SurchargeCalculationOverride - impl: impl ForeignFrom<hyperswitch_domain_models::payments::SurchargeCalculationOverride> for common_enums::SurchargeCalculationOverride **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"issue_number": 4, "pr_number": 6490, "commits_count": 1, "files_changed": 23, "response_length": 6023, "file_count": 22, "needs_breakdown": true}
Adding Deep health check for Hyperswitch Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy - [x] Failure of health check should emit logs providing evidential data regarding the failure The deep health will verify the following services - [x] #3267 - [x] #3268 - [x] #3269 - [x] #3270 - [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
<think> PR Context: - Title: fix(payment_link): sanitize embedded payment link data - Merged: 2025-05-29T08:22:03Z - Files changed: 10 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR addresses below issues specifically for payment links - improper use of innerHTML for API inputs - for rendering transaction details - improper use of receiving event (isFormReadyForSubmission) from HS SDK Overall, this PR sanitizes API text based inputs which are rendere </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payment_link): sanitize embedded payment link data (#7736) Files to modify: **crates/hyperswitch_domain_models/src/api.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - function: private::default - impl: impl Default for PaymentLink **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payout_link.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"issue_number": 3264, "pr_number": 7736, "commits_count": 1, "files_changed": 10, "response_length": 1329, "file_count": 8, "needs_breakdown": false}
feat(verify): add new types for validate API ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This part of series of PR's which are aimed at adding ValidateAPI in the core. This PR specifically deals with introducing new types for the Flows and Operations which are to be added going further. <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to. 1. Create new types for the change 2. Introduce the Flow and Connector Integration 3. Add Stripe POC 4. Move the mandate related behaviour to domain 5. Introduce the new operation and all the related components in the payments core <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(single_use): add extra fields in `Mandate` table and `MandateData` [Blocked on #61] - Merged: 2022-12-09T11:48:13Z - Files changed: 9 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This PR adds single use mandate support and a 2 new fields to the mandate table (i.e. singe_use_amount, single_use_currency) <!-- Describe your changes in detail --> ### Additional Changes - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!- </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(single_use): add extra fields in `Mandate` table and `MandateData` [Blocked on #61] (#66) Files to modify: **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/routes/payments.rs** Remove: - function: pub::validate_pm **crates/router/src/schema.rs** Modify existing code **crates/router/src/types/api/payments.rs** Add: - enum: pub::MandateType **crates/router/src/types/storage/mandate.rs** Add: - struct: pub::SingleUseMandate
{"issue_number": 45, "pr_number": 66, "commits_count": 1, "files_changed": 9, "response_length": 1478, "file_count": 9, "needs_breakdown": false}
ci(hotfix-branch-creation): rename `hotfix-branch-creation` workflow to `create-hotfix-branch` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> rename `hotfix-branch-creation` workflow to `create-hotfix-branch` ### 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 --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(vsaas): modify api key auth to support vsaas cases - Merged: 2025-04-16T10:50:02Z - Files changed: 24 files - Commits: 17 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Modified api key auth to support control over VSAAS operations. The PR provides fine grained control over routes authentication - allowing Platform to perform payments in V1 (MVP case) - disallowing all the operations in v2 - disallowing all other operations other than payments, f </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(vsaas): modify api key auth to support vsaas cases (#7593) Co-authored-by: hyperswitch-bot[bot] Files to modify: **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 **crates/router/src/routes/blocklist.rs** Modify existing code **crates/router/src/routes/cards_info.rs** Modify existing code **crates/router/src/routes/currency.rs** Modify existing code **crates/router/src/routes/customers.rs** Modify existing code **crates/router/src/routes/disputes.rs** Modify existing code **crates/router/src/routes/ephemeral_key.rs** Modify existing code **crates/router/src/routes/files.rs** Modify existing code **crates/router/src/routes/fraud_check.rs** Modify existing code **crates/router/src/routes/mandates.rs** Modify existing code **crates/router/src/routes/payment_link.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/routes/payouts.rs** Modify existing code **crates/router/src/routes/pm_auth.rs** Modify existing code **crates/router/src/routes/profiles.rs** Modify existing code **crates/router/src/routes/refunds.rs** Modify existing code **crates/router/src/routes/relay.rs** Modify existing code **crates/router/src/routes/routing.rs** Modify existing code **crates/router/src/routes/verification.rs** Modify existing code **crates/router/src/services/authentication.rs** Remove: - struct: pub::ApiKeyAuth - struct: pub::V2ApiKeyAuth Add: - struct: pub::ApiKeyAuth - struct: pub::V2ApiKeyAuth
{"issue_number": 2540, "pr_number": 7593, "commits_count": 1, "files_changed": 24, "response_length": 2679, "file_count": 26, "needs_breakdown": true}
Todo redis interface ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description This PR is a part of greater refactoring which aims on removing `// TODO: ...` & `// FIXME: ..` from the entire codebase. The objective of this PR is to fix `xgroup_create` by adding a guard or some specific `RedisEntryId` while also adding unit tests for the same. It also adds crate documentation for the `redis_interface` crate <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context The codebase wide initiative in fixing existing problems, `TODO:`s and `FIXME:`s while also adding documentations. <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? unit-tests included <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [x] I added unit tests for my changes where possible
<think> PR Context: - Title: fix: fix email verification regex & unittests - Merged: 2022-12-13T16:09:25Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description The PR focuses on removing `TODO: ..` from `common_utils` and is part of the chain of PR's i.e. 1. #136 <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you c </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: fix email verification regex & unittests (#139) Files to modify: **crates/common_utils/src/validation.rs** Add: - function: private::proptest_invalid_email
{"issue_number": 136, "pr_number": 139, "commits_count": 1, "files_changed": 1, "response_length": 946, "file_count": 3, "needs_breakdown": false}
feat(connector): [payload] introduce no-3ds cards ## 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 the below given flows for Payload connector: - [x] Cards (No 3DS) - [x] PSync - [x] Void - [x] Refunds - [x] AVS Checks - [x] Cypress Connector does not support 3DS transactions. ### 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). --> New connector. Closes #8527 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Running Cypress will be a pain as the connector marks automatic capture payments as `duplicate` eventually `failing` the payment if done within 15 second time span. Curls: <details> <summary>Authorize 3DS</summary> ```curl curl --location 'http://Localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data-raw '{ "amount": 10400, "currency": "USD", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "customer_id": "customer", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" , "first_name": "PiX" , "last_name": "THE" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } }' ``` ```json { "payment_id": "pay_dBN3ZKKNj7sCIjt0qYRH", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_dBN3ZKKNj7sCIjt0qYRH_secret_9e4dJN8io2oIY6qNiNf5", "created": "2025-07-04T08:38:12.557Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "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": "manual", "payment_method": null, "payment_method_data": 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": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": null, "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer", "created_at": 1751618292, "expires": 1751621892, "secret": "epk_4f9fe3bf5dc94b57819620a7d3c0918a" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:53:12.557Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:38:12.568Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Confirm 3DS</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_dBN3ZKKNj7sCIjt0qYRH/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_852ccab463694df1a50337317c37c05c' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "card_cvc": "123" } }, "client_secret": "pay_dBN3ZKKNj7sCIjt0qYRH_secret_9e4dJN8io2oIY6qNiNf5" }' ``` ```json { "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "Cards 3DS is not supported by Payload" } } ``` </details> <details> <summary>Authorize No 3DS</summary> ```curl curl --location 'http://Localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data-raw '{ "amount": 10400, "currency": "USD", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "customer_id": "customer", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" , "first_name": "PiX" , "last_name": "THE" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" } }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "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": "manual", "payment_method": null, "payment_method_data": 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": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": null, "phone": "999999999", "return_url": "https://duck.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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer", "created_at": 1751618398, "expires": 1751621998, "secret": "epk_0f9fd59624604cfcae9b1340ad176710" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:39:58.537Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Confirm</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_852ccab463694df1a50337317c37c05c' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "card_cvc": "123" } }, "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3" }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "requires_capture", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": null, "phone": "999999999", "return_url": "https://duck.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": null, "manual_retry_allowed": false, "connector_transaction_id": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:40:09.253Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Capture</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data '{ "amount_to_capture": 10400, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": null, "phone": "999999999", "return_url": "https://duck.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": null, "manual_retry_allowed": false, "connector_transaction_id": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:41:34.623Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>PSync</summary> ```curl curl --location 'http://Localhost:8080/payments/pay_oG45Z9ZE9KVNSlDE5kEU?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' ``` ```json { "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "merchant_id": "postman_merchant_GHAction_1751615211", "status": "succeeded", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10400, "connector": "payload", "client_secret": "pay_oG45Z9ZE9KVNSlDE5kEU_secret_FEs1MMwoHyFsb8L8joG3", "created": "2025-07-04T08:39:58.524Z", "currency": "USD", "customer_id": "customer", "customer": { "id": "customer", "name": null, "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": "THE" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": null, "phone": "999999999", "return_url": "https://duck.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": null, "manual_retry_allowed": false, "connector_transaction_id": "txn_3epWFzMKsIMDjAdQApgOe", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-LS0-6XQ-OCT", "payment_link": null, "profile_id": "pro_GXv0G95IHPxJokca7ece", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-04T08:54:58.524Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-04T08:41:34.623Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Refund</summary> ```curl curl --location 'http://Localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' \ --data '{ "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "amount": 600, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "refund_id": "ref_zEyDe7aksCgcYsvZDivv", "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "amount": 600, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-07-04T08:42:07.233Z", "updated_at": "2025-07-04T08:42:08.116Z", "connector": "payload", "profile_id": "pro_GXv0G95IHPxJokca7ece", "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Retrieve</summary> ```curl curl --location 'http://Localhost:8080/refunds/ref_zEyDe7aksCgcYsvZDivv' \ --header 'Accept: application/json' \ --header 'api-key: dev_ojBKSaGCsEr3lo3NumPRA8oytAaoUkFZBfbdQ2XJyzFqzYzbQFOgQqgBCOVqeTCB' ``` ```json { "refund_id": "ref_zEyDe7aksCgcYsvZDivv", "payment_id": "pay_oG45Z9ZE9KVNSlDE5kEU", "amount": 600, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-07-04T08:42:07.233Z", "updated_at": "2025-07-04T08:42:08.116Z", "connector": "payload", "profile_id": "pro_GXv0G95IHPxJokca7ece", "merchant_connector_id": "mca_QfDIuUKUfARzzR3l0Q4n", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Merchant Payment Methods List</summary> ```curl curl --location 'http://Localhost:8080/account/payment_methods?client_secret=pay_sTHSF5DAnYQbkieTlWLf_secret_tsJjXuEgleLsBp0Ku8NH' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_987a41163e3044679cd16d6293365850' ``` ```json { "redirect_url": "https://duck.com/", "currency": "USD", "payment_methods": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "[email protected]" }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "THE" }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "San Fransico" }, "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "94122" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "PiX" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "billing.address.state": { "required_field": "payment_method_data.billing.address.state", "display_name": "state", "field_type": "user_address_state", "value": "California" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "payload" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "payload" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "[email protected]" }, "payment_method_data.card.card_cvc": { "required_field": "payment_method_data.card.card_cvc", "display_name": "card_cvc", "field_type": "user_card_cvc", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "THE" }, "payment_method_data.card.card_exp_year": { "required_field": "payment_method_data.card.card_exp_year", "display_name": "card_exp_year", "field_type": "user_card_expiry_year", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "San Fransico" }, "payment_method_data.card.card_exp_month": { "required_field": "payment_method_data.card.card_exp_month", "display_name": "card_exp_month", "field_type": "user_card_expiry_month", "value": null }, "payment_method_data.card.card_number": { "required_field": "payment_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "94122" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "PiX" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "billing.address.state": { "required_field": "payment_method_data.billing.address.state", "display_name": "state", "field_type": "user_address_state", "value": "California" } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible <!-- @coderabbitai ignore -->
<think> PR Context: - Title: feat(connector): [payload] add webhook support - Merged: 2025-07-11T12:58:37Z - Files changed: 8 files - Commits: 10 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR: - Adds support for webhooks to Payload connector. The connector does not support source verification. - Address Cypress comments that was asked in #8545. - Fixes setup mandate not throwing `501` ### Additional Changes - [ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [payload] add webhook support (#8558) Files to modify: **crates/api_models/src/webhooks.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload.rs** Remove: - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Payload Add: - function: private::build_request - function: private::verify_webhook_source - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Payload **crates/hyperswitch_connectors/src/connectors/payload/responses.rs** Add: - struct: pub::PayloadWebhookEvent - struct: pub::PayloadEventDetails - enum: pub::PayloadWebhooksTrigger **crates/hyperswitch_connectors/src/connectors/payload/transformers.rs** Modify existing code
{"issue_number": 8545, "pr_number": 8558, "commits_count": 1, "files_changed": 8, "response_length": 1593, "file_count": 6, "needs_breakdown": false}
[FEATURE] Analytics for payouts ### Feature Description **APIs** There is no provision for listing / filtering payout transactions processed via HyperSwitch. This needs to be implemented for analytical processing for payouts. - List API helps in listing payouts based on generic constraints - Filter API helps in filtering payouts based on payout specific filters **Dashboard Analytics** There are two tables for core payout operations - payouts - payout_attempt The information regarding payouts and the attempts are stored in respective tables. For fetching all the information, there needs to be 2 DB calls for gathering entire context. As of writing this issue, Hyperswitch's dashboard can read data only from a single table in CKH. As a temporary measure, all the required fields are to be moved to a single table. ### Possible Implementation List API to include below constraints (similar to payments) - customer_id - starting_after - ending_before - limit - created - created_lt - created_gt - created_lte - created_gte Filter API to include below filters - payout_id - profile_id - customer_id - limit - offset - time_range - connector - currency - status - payout_method - entity_type Below columns are to be added in `payout_attempt` - payout_type - amount - destination_currency - source_currency - recurring - entity_type ### 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(payouts): implement KVRouterStore - Merged: 2024-03-19T10:18:15Z - Files changed: 30 files - Commits: 24 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR includes below changes - implement KVRouterStore for storing payout data in either redis + postgres or postgres only - moving required columns for dashboard analytics to a single table - usage and consumption of `payouts` feature throughout crates Explained in issue - #3 </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(payouts): implement KVRouterStore (#3889) Co-authored-by: hyperswitch-bot[bot] <148525504+hyper Files to modify: **crates/api_models/src/admin.rs** Remove: - enum: pub::PayoutRoutingAlgorithm **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/data_models/src/lib.rs** Add: - trait: pub::PayoutAttemptInterface - trait: pub::PayoutsInterface - mod: pub::payouts **crates/data_models/src/payouts.rs** Add: - mod: pub::payout_attempt - mod: pub::payouts **crates/data_models/src/payouts/payout_attempt.rs** Add: - function: private::default - function: private::from - struct: pub::PayoutAttempt - struct: pub::PayoutAttemptNew - struct: pub::PayoutAttemptUpdateInternal - enum: pub::PayoutAttemptUpdate - trait: pub::PayoutAttemptInterface - impl: impl Default for PayoutAttemptNew - impl: impl From<PayoutAttemptUpdate> for PayoutAttemptUpdateInternal **crates/data_models/src/payouts/payouts.rs** Add: - function: private::default - function: private::from - struct: pub::Payouts - struct: pub::PayoutsNew - struct: pub::PayoutsUpdateInternal - enum: pub::PayoutsUpdate - trait: pub::PayoutsInterface - impl: impl Default for PayoutsNew - impl: impl From<PayoutsUpdate> for PayoutsUpdateInternal **crates/diesel_models/src/kv.rs** Modify existing code **crates/diesel_models/src/lib.rs** Modify existing code **crates/diesel_models/src/payout_attempt.rs** Remove: - function: private::default - impl: impl Default for PayoutAttempt Add: - function: private::default - function: pub::apply_changeset - impl: impl Default for PayoutAttemptUpdateInternal - impl: impl PayoutAttemptUpdate **crates/diesel_models/src/payouts.rs** Remove: - function: private::default - impl: impl Default for Payouts Add: - function: private::default - impl: impl Default for PayoutsUpdateInternal **crates/diesel_models/src/query/payout_attempt.rs** Add: - function: pub::update_with_attempt_id **crates/diesel_models/src/query/payouts.rs** Add: - function: pub::update - function: pub::find_optional_by_merchant_id_payout_id **crates/diesel_models/src/schema.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/locker_migration.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/payouts/retry.rs** Modify existing code **crates/router/src/core/payouts/validator.rs** Modify existing code **crates/router/src/db.rs** Remove: - mod: pub::payout_attempt - mod: pub::payouts **crates/router/src/db/kafka_store.rs** Remove: - function: private::find_payout_attempt_by_merchant_id_payout_id - function: private::insert_payout_attempt Add: - impl: impl PayoutAttemptInterface for KafkaStore - impl: impl PayoutsInterface for KafkaStore **crates/router/src/db/payout_attempt.rs** Remove: - function: private::find_payout_attempt_by_merchant_id_payout_id - function: private::find_payout_attempt_by_merchant_id_payout_attempt_id - function: private::update_payout_attempt_by_merchant_id_payout_id - function: private::update_payout_attempt_by_merchant_id_payout_attempt_id - function: private::insert_payout_attempt - function: private::find_payout_attempt_by_merchant_id_payout_id - function: private::find_payout_attempt_by_merchant_id_payout_attempt_id - function: private::update_payout_attempt_by_merchant_id_payout_id - function: private::update_payout_attempt_by_merchant_id_payout_attempt_id - function: private::insert_payout_attempt - trait: pub::PayoutAttemptInterface - impl: impl PayoutAttemptInterface for Store - impl: impl PayoutAttemptInterface for MockDb **crates/router/src/db/payouts.rs** Remove: - function: private::find_payout_by_merchant_id_payout_id - function: private::update_payout_by_merchant_id_payout_id - function: private::insert_payout - function: private::find_payout_by_merchant_id_payout_id - function: private::update_payout_by_merchant_id_payout_id - function: private::insert_payout - trait: pub::PayoutsInterface - impl: impl PayoutsInterface for Store - impl: impl PayoutsInterface for MockDb **crates/router/src/routes/payouts.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api.rs** Add: - trait: pub::Payouts - trait: pub::Payouts **crates/router/src/types/api/admin.rs** Modify existing code **crates/router/src/types/api/payouts.rs** Remove: - trait: pub::Payouts - trait: pub::Payouts **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/types/storage.rs** Modify existing code **crates/router/src/types/storage/payment_method.rs** Add: - struct: pub::PaymentMethodListContext **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/payme.rs** Modify existing code **crates/router/tests/connectors/square.rs** Modify existing code **crates/router/tests/connectors/stax.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/storage_impl/src/lib.rs** Add: - function: private::unique_constraints - function: private::table_name - function: private::unique_constraints - function: private::table_name - impl: impl UniqueConstraints for diesel_models::Payouts - impl: impl UniqueConstraints for diesel_models::PayoutAttempt - impl: impl PayoutAttemptInterface for KVRouterStore<T> - impl: impl PayoutAttemptInterface for RouterStore<T> - impl: impl PayoutsInterface for KVRouterStore<T> - impl: impl PayoutsInterface for RouterStore<T> - mod: pub::payouts **crates/storage_impl/src/mock_db.rs** Add: - impl: impl PayoutsInterface for MockDb - impl: impl PayoutAttemptInterface for MockDb - mod: pub::payout_attempt - mod: pub::payouts **crates/storage_impl/src/mock_db/payout_attempt.rs** Add: - function: private::update_payout_attempt - function: private::insert_payout_attempt - function: private::find_payout_attempt_by_merchant_id_payout_attempt_id - impl: impl PayoutAttemptInterface for MockDb **crates/storage_impl/src/mock_db/payouts.rs** Add: - function: private::find_payout_by_merchant_id_payout_id - function: private::update_payout - function: private::insert_payout - function: private::find_optional_payout_by_merchant_id_payout_id - impl: impl PayoutsInterface for MockDb **crates/storage_impl/src/payouts.rs** Add: - impl: impl KvStorePartition for Payouts - impl: impl KvStorePartition for PayoutAttempt - mod: pub::payout_attempt - mod: pub::payouts **crates/storage_impl/src/payouts/payout_attempt.rs** Add: - function: private::insert_payout_attempt - function: private::update_payout_attempt - function: private::find_payout_attempt_by_merchant_id_payout_attempt_id - function: private::insert_payout_attempt - function: private::update_payout_attempt - function: private::find_payout_attempt_by_merchant_id_payout_attempt_id - function: private::to_storage_model - function: private::from_storage_model - function: private::to_storage_model - function: private::from_storage_model - function: private::to_storage_model - function: private::from_storage_model - impl: impl PayoutAttemptInterface for KVRouterStore<T> - impl: impl PayoutAttemptInterface for crate::RouterStore<T> - impl: impl DataModelExt for PayoutAttempt - impl: impl DataModelExt for PayoutAttemptNew - impl: impl DataModelExt for PayoutAttemptUpdate **crates/storage_impl/src/payouts/payouts.rs** Add: - function: private::insert_payout - function: private::update_payout - function: private::find_payout_by_merchant_id_payout_id - function: private::find_optional_payout_by_merchant_id_payout_id - function: private::insert_payout - function: private::update_payout - function: private::find_payout_by_merchant_id_payout_id - function: private::find_optional_payout_by_merchant_id_payout_id - function: private::to_storage_model - function: private::from_storage_model - function: private::to_storage_model - function: private::from_storage_model - function: private::to_storage_model - function: private::from_storage_model - impl: impl PayoutsInterface for KVRouterStore<T> - impl: impl PayoutsInterface for crate::RouterStore<T> - impl: impl DataModelExt for Payouts - impl: impl DataModelExt for PayoutsNew - impl: impl DataModelExt for PayoutsUpdate
{"issue_number": 3652, "pr_number": 3889, "commits_count": 1, "files_changed": 30, "response_length": 10131, "file_count": 51, "needs_breakdown": true}
feat(core): Implement UCS based upi for paytm and phonepe ## Feature Request: Implement UPI Intent and QR Code Payment Flows for UCS Integration ### Description Add support for UPI Intent and QR code payment methods through the Unified Connector Service (UCS) for Paytm and PhonePe payment gateways. ### Background UPI is a critical payment method in India. Currently, Hyperswitch lacks support for UPI Intent (for mobile apps) and QR code flows through the UCS integration. This limits merchants' ability to accept UPI payments through these popular payment gateways. ### Requirements - Add default implementations for Paytm and PhonePe connectors - Support UPI Intent payment method for mobile app integrations - Support QR code generation and payment flow for UPI - Route payment requests through UCS (actual payment processing handled by UCS) - Add necessary configuration entries for both connectors ### Technical Details - The implementation should follow the existing UCS architecture pattern - No direct API integration with Paytm/PhonePe required (handled by UCS) - Need to add routing logic and connector definitions - Should support standard payment operations: create, sync, refund ### Acceptance Criteria - Successfully create UPI Intent payments through Paytm and PhonePe via UCS - QR code generation works for UPI payments - Payment status sync operations function correctly - Configuration properly set up across all environments
<think> PR Context: - Title: feat(core): Implement UCS based upi for paytm and phonepe - Merged: 2025-07-31T14:18:08Z - Files changed: 30 files - Commits: 22 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Fixed #8734 ## Description <!-- Describe your changes in detail --> This PR implements UPI Intent and QR code payment flows for the Unified Connector Service (UCS) integration, adding default implementations for Paytm and PhonePe connectors. ### Key Changes: - **Default Connector Implem </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): Implement UCS based upi for paytm and phonepe (#8732) Co-authored-by: hyperswitch-bot[ Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::paytm - mod: pub::phonepe **crates/hyperswitch_connectors/src/connectors/paytm.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::validate_mandate_payment - function: private::validate_psync_reference_id - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - struct: pub::Paytm - impl: impl Paytm - impl: impl api::Payment for Paytm - impl: impl api::PaymentSession for Paytm - impl: impl api::ConnectorAccessToken for Paytm - impl: impl api::MandateSetup for Paytm - impl: impl api::PaymentAuthorize for Paytm - impl: impl api::PaymentSync for Paytm - impl: impl api::PaymentCapture for Paytm - impl: impl api::PaymentVoid for Paytm - impl: impl api::Refund for Paytm - impl: impl api::RefundExecute for Paytm - impl: impl api::RefundSync for Paytm - impl: impl api::PaymentToken for Paytm - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Paytm - impl: impl ConnectorCommonExt<Flow, Request, Response> for Paytm - impl: impl ConnectorCommon for Paytm - impl: impl ConnectorValidation for Paytm - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Paytm - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Paytm - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Paytm - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Paytm - impl: impl webhooks::IncomingWebhook for Paytm - impl: impl ConnectorSpecifications for Paytm - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/paytm/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::PaytmRouterData - struct: pub::PaytmPaymentsRequest - struct: pub::PaytmCard - struct: pub::PaytmAuthType - struct: pub::PaytmPaymentsResponse - struct: pub::PaytmRefundRequest - struct: pub::RefundResponse - struct: pub::PaytmErrorResponse - enum: pub::PaytmPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for PaytmRouterData<T> - impl: impl TryFrom<&PaytmRouterData<&PaymentsAuthorizeRouterData>> for PaytmPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for PaytmAuthType - impl: impl From<PaytmPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, PaytmPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&PaytmRouterData<&RefundsRouterData<F>>> for PaytmRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/connectors/phonepe.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::validate_mandate_payment - function: private::validate_psync_reference_id - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - struct: pub::Phonepe - impl: impl Phonepe - impl: impl api::Payment for Phonepe - impl: impl api::PaymentSession for Phonepe - impl: impl api::ConnectorAccessToken for Phonepe - impl: impl api::MandateSetup for Phonepe - impl: impl api::PaymentAuthorize for Phonepe - impl: impl api::PaymentSync for Phonepe - impl: impl api::PaymentCapture for Phonepe - impl: impl api::PaymentVoid for Phonepe - impl: impl api::Refund for Phonepe - impl: impl api::RefundExecute for Phonepe - impl: impl api::RefundSync for Phonepe - impl: impl api::PaymentToken for Phonepe - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Phonepe - impl: impl ConnectorCommonExt<Flow, Request, Response> for Phonepe - impl: impl ConnectorCommon for Phonepe - impl: impl ConnectorValidation for Phonepe - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Phonepe - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Phonepe - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Phonepe - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Phonepe - impl: impl webhooks::IncomingWebhook for Phonepe - impl: impl ConnectorSpecifications for Phonepe - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::PhonepeRouterData - struct: pub::PhonepePaymentsRequest - struct: pub::PhonepeCard - struct: pub::PhonepeAuthType - struct: pub::PhonepePaymentsResponse - struct: pub::PhonepeRefundRequest - struct: pub::RefundResponse - struct: pub::PhonepeErrorResponse - enum: pub::PhonepePaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for PhonepeRouterData<T> - impl: impl TryFrom<&PhonepeRouterData<&PaymentsAuthorizeRouterData>> for PhonepePaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for PhonepeAuthType - impl: impl From<PhonepePaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, PhonepePaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&PhonepeRouterData<&RefundsRouterData<F>>> for PhonepeRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/connector_endpoints.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::paytm - mod: private::phonepe **crates/router/tests/connectors/paytm.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::PaytmTest - impl: impl ConnectorActions for PaytmTest - impl: impl utils::Connector for PaytmTest **crates/router/tests/connectors/phonepe.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::PhonepeTest - impl: impl ConnectorActions for PhonepeTest - impl: impl utils::Connector for PhonepeTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 8734, "pr_number": 8732, "commits_count": 1, "files_changed": 30, "response_length": 16679, "file_count": 24, "needs_breakdown": true}
[FEATURE]: Enable client_secret auth for payments - Get Intent [v2] Required for SDK
<think> PR Context: - Title: feat(router): Enable client_secret auth for payments_get_intent [v2] - Merged: 2025-05-27T10:56:27Z - Files changed: 1 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added support for `client_secret` authentication in `Payments - Get Intent` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/envi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): Enable client_secret auth for payments_get_intent [v2] (#8119) Files to modify: **crates/router/src/routes/payments.rs** Modify existing code
{"issue_number": 8118, "pr_number": 8119, "commits_count": 1, "files_changed": 1, "response_length": 960, "file_count": 3, "needs_breakdown": false}
build(deps): update aws dependencies ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates rust aws dependencies to their latest version ### 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)? --> Deployed the branch in custom pod. Application deployed successfully hence kms feature works fine. Tested email feature too. ``` curl --location 'https://http://localhost:8080/user/signup_with_merchant_id' \ --header 'Content-Type: application/json' \ --header 'api-key: abc' \ --data-raw '{ "email": "[email protected]", "password": "Test@123", "company_name": "test_comp2", "name": "test_merchant1" }' ``` ![image](https://github.com/juspay/hyperswitch/assets/70657455/7bc754db-c81a-44fc-8a7b-57add55f3425) ## 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: build(deps): update dependencies - Merged: 2024-04-02T10:30:02Z - Files changed: 30 files - Commits: 29 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates dependencies to their latest versions which support our current MSRV. In addition, this PR includes some minor changes/improvements to the metadata included in the `Cargo.toml` files. Some of the crates that have NOT been up </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** build(deps): update dependencies (#4268) Files to modify: **crates/analytics/src/sqlx.rs** Modify existing code **crates/api_models/src/conditional_configs.rs** Modify existing code **crates/api_models/src/enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/euclid/src/enums.rs** Modify existing code **crates/euclid/src/frontend/dir.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/types.rs** Modify existing code **crates/router/src/types/domain/user.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code **crates/storage_impl/src/errors.rs** Remove: - function: private::from - impl: impl From<ring::error::Unspecified> for EncryptionError **crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs** Modify existing code **crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs** Modify existing code **crates/test_utils/tests/connectors/bluesnap_wh_ui.rs** Modify existing code **crates/test_utils/tests/connectors/checkout_wh_ui.rs** Modify existing code **crates/test_utils/tests/connectors/stripe_wh_ui.rs** Modify existing code
{"issue_number": 4194, "pr_number": 4268, "commits_count": 1, "files_changed": 30, "response_length": 1994, "file_count": 18, "needs_breakdown": true}
feat(core): external authentication related schema changes for existing tables ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Made schema changes to payment_attempt, payment_intent and merchant_account tables in order to accommodate core implementation of separate authentication feature. Hyperswitch currently uses the "Processor driven approach" for 3DS and is now looking to move towards "Third Party 3DS provider approach" - Using a specialized 3DS provider for checking card enrollment and 3DS authentication Eg: Cardinal, Netcetra The 3DS authentication can be done once and the authentication response that we get can be sent to any processor to authorize the payment. Columns added: BusinessProfile: 1. authentication_connector_details: default null PaymentAttempt: 1. external_three_ds_authentication_attempted: default false 2. authentication_connector: default null 3. authentication_id: default null PaymentIntent: 1. request_external_three_ds_authentication: default null ### Additional Changes - [ ] 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` 5. `crates/router/src/configs` 6. `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). --> Separate authentication feature ## 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)? --> Compiler guided and Sanity testing to make sure it's backward compatible This feature can only be tested once core changes are done. ## 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(payouts): saved payment methods list for bank details - Merged: 2024-02-07T09:35:00Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Issue [#3904](https://github.com/juspay/hyperswitch-cloud/issues/3904) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to t </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(payouts): saved payment methods list for bank details (#3507) Co-authored-by: Kashif <mohammed.k Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code
{"issue_number": 3904, "pr_number": 3507, "commits_count": 1, "files_changed": 2, "response_length": 1067, "file_count": 4, "needs_breakdown": false}
fix(openapi): Fix broken pages in mintlify (v2) v2 mintlify docs have several broken pages and some endpoints are missing.
<think> PR Context: - Title: fix(openapi): Fix broken mintlify pages (v2) - Merged: 2025-06-20T13:54:03Z - Files changed: 18 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fixed the following mintlify pages: - `v2/customers/customers--update.mdx` - `payment-method-session--confirm-a-payment-method-session.mdx` - `payment-method-session--delete-a-saved-payment-method.mdx` - `payment-method-session--list-pay </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(openapi): Fix broken mintlify pages (v2) (#8382) Co-authored-by: hyperswitch-bot[bot] <148525504 Files to modify: **crates/openapi/src/routes/payments.rs** Modify existing code **crates/openapi/src/routes/tokenization.rs** Modify existing code
{"issue_number": 8381, "pr_number": 8382, "commits_count": 1, "files_changed": 18, "response_length": 1032, "file_count": 4, "needs_breakdown": false}
Removing mailhog container from the docker setup Removing mailhog container from the docker setup
<think> PR Context: - Title: fix: docker changes in setup script - Merged: 2025-05-08T09:01:27Z - Files changed: 7 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Repopulating the docker changes in the stable release ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables < </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7962, "pr_number": 7979, "commits_count": 0, "files_changed": 7, "response_length": 765, "file_count": 0, "needs_breakdown": false}
refactor(cypress): error handling and add sync refunds in places where missing <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This is a following PR of https://github.com/juspay/hyperswitch/pull/5093 that implements significant changes to the way Cypress handles `4xx` errors. Will go through it one by one: - We now check if the error is 4xx and is `not supported` error in utils which is where `defaultErorHandler` have been moved. If yes, then we throw the error from `Commons.js` - Removed `unsupported error` configs from all `connector.js` configs as we now have default case which takes of it - Removed duplicate `getValueByKey()` as we now re-use the existing ones from utils - Removed unused variables - Used loops where ever possible - `logRequestId()` could not moved to utils as the `cy.task()` used in that function can only be used in either `spec` file or `helper` file (`commands.js`) - [Connector auth issue](https://github.com/juspay/hyperswitch/pull/4993#discussion_r1639835590) has been handled with [`55ae0b1` (#5128)](https://github.com/juspay/hyperswitch/pull/5128/commits/55ae0b1998b92ce70ed3df9fd366df7d06ed8a03) ### 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). --> NIL ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> After commit [`7fac187` (#5128)](https://github.com/juspay/hyperswitch/pull/5128/commits/7fac187dd4dd166951f5aa4836b0a3e294fe35cb) |Adyen|bank of America|Bluesnap|Cybersource|Iatapay| |-|-|-|-|-| |<img width="406" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/6646acb3-c78a-4e8b-9643-1d23bcc2b82e">|<img width="404" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/6cfd08dd-d53a-4eca-a006-1ce4801e3e50">|<img width="408" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/026daaf9-143f-411d-ae1c-251e6ccf9eb6">|<img width="407" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/4d217820-14b6-4967-bb05-f1bf1da7d5f3">|<img width="407" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/b2ac46ab-7ede-4d00-b668-64f3ea8a930b">| |NMI|PayPal|Stripe|Trustpay|| |<img width="407" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/fdf4c536-9fb6-4586-9207-230584c3aa9e">|<img width="405" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/c647f969-5968-4b7a-a56f-b8263cb251cc">|<img width="406" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/bd90b4da-734b-4c7e-a9ea-c106948bf8a6">|<img width="404" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/b9e1880f-2fa2-47e9-be70-6d84f3ded217">|| NMI PMID 2 failures are backend issues and @likhinbopanna is behind it. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `prettier . --write` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
<think> PR Context: - Title: refactor(cypress): error handling and add sync refunds in places where missing - Merged: 2024-07-04T08:01:03Z - Files changed: 23 files - Commits: 30 commits Implementation approach: <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This is a following PR of https://github.com/juspay/hyperswitch/pull/5093 that implements significant changes to the way Cypress handles `4xx` errors. Will go through it one by one: - We now check if the error is 4xx and is `not supported` error in utils wh </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 5128, "pr_number": 5128, "commits_count": 0, "files_changed": 23, "response_length": 810, "file_count": 0, "needs_breakdown": false}
build(deps): bump `diesel` to `2.2.3` and `sqlx` to `0.8.1` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates `diesel` to `2.2.3`, `sqlx` to `0.8.1` and `bigdecimal` to `0.4.5`. `diesel 2.2.3` requires an MSRV of 1.78, and `sqlx 0.8.1` requires an MSRV of 1.80 (at least until https://github.com/launchbadge/sqlx/pull/3459 is merged and a new version is released), so the MSRV had to be bumped to 1.80. In addition, this PR removes the dependency on the `bigdecimal` crate in `router` and replaces it with `num-traits`, since we were only using a trait from `num-traits` re-exported by `bigdecimal`. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> The updated versions of the dependencies address security vulnerabilities https://github.com/advisories/GHSA-xmrp-424f-vfpx and https://github.com/advisories/GHSA-wq9x-qwcq-mmgf. ## 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 --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: build(deps): bump `sqlx` to `0.8.2` - Merged: 2024-09-11T16:01:14Z - Files changed: 5 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR bumps the `sqlx` crate to `0.8.2`. This also allows us to drop our MSRV from 1.80.0 to 1.78.0. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to th </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 5688, "pr_number": 5859, "commits_count": 0, "files_changed": 5, "response_length": 765, "file_count": 0, "needs_breakdown": false}
[FEATURE] Implement V2 UCS (Unified Connector Service) Integration for Authorization Flow ### Feature Description # [Feature Request] Implement V2 UCS (Unified Connector Service) Integration for Authorization Flow ## Issue Type - [x] Feature Request - [ ] Bug Report - [ ] Enhancement - [ ] Documentation ## Priority - [x] High - [ ] Medium - [ ] Low ## Labels `A-core` `C-feature` `payment-flows` `ucs-integration` `v2-api` ## Summary Implement V2 UCS (Unified Connector Service) integration for the authorization payment flow, upgrading from the existing V1 UCS integration to support the updated gRPC schema and enhanced V2 payment architecture. ## Background Currently, Hyperswitch has V1 UCS integration that works with the legacy gRPC schema. However, the UCS service has evolved to V2 with improved: - Enhanced gRPC schema with better type safety - Improved field structures for card details, addresses, and identifiers - Better error handling and response parsing - Enhanced payment method data transformation ## Problem Statement ### Current State - V1 UCS integration uses outdated `PaymentsAuthorizeRequest` schema - Limited support for V2 payment flow architecture - Outdated transformer implementations for V2 data structures - Monolithic UCS function structure affecting maintainability ### Pain Points 1. **Schema Incompatibility**: V1 gRPC schema doesn't support V2 enhanced data models 2. **Limited Error Handling**: V1 response parsing lacks V2 identifier structure support 3. **Technical Debt**: Monolithic UCS functions make debugging and enhancement difficult 4. **Missing V2 Features**: Cannot leverage V2 payment flow improvements through UCS ### Possible Implementation ## Proposed Solution ### High-Level Approach Implement V2 UCS integration that: 1. **Updates gRPC Schema**: Migrate to `PaymentServiceAuthorizeRequest` with V2 field structure 2. **Enhances Architecture**: Refactor payment flow with better separation of concerns 3. **Improves Transformers**: Update V2 transformers for new schema compatibility 4. **Maintains Backward Compatibility**: Preserve V1 integration with feature flag separation ### Technical Requirements #### 1. gRPC Schema Migration - [ ] Update `rust-grpc-client` dependency to latest version - [ ] Migrate from `PaymentsAuthorizeRequest` to `PaymentServiceAuthorizeRequest` - [ ] Update authentication headers and request metadata handling - [ ] Implement new identifier structure for response parsing #### 2. Payment Flow Architecture - [ ] Refactor `call_connector_service()` into separate prerequisite and decision functions - [ ] Implement `call_connector_service_prerequisites()` for V2 flow preparation - [ ] Create `decide_unified_connector_service_call()` for UCS routing logic - [ ] Maintain feature flag separation between V1 and V2 implementations #### 3. V2 Transformer Enhancements - [ ] Update card data transformation for new schema structure - [ ] Enhance address handling with improved field mapping - [ ] Implement customer ID support in V2 transformers #### 4. Error Handling & Response Parsing - [ ] Update response handlers for new identifier structure - [ ] Enhance error context and fallback mechanisms - [ ] Maintain automatic fallback to traditional connector flow #### 5. Testing & Validation - [ ] Create comprehensive test cases for V2 UCS flow - [ ] Test schema compatibility and field mapping - [ ] Validate fallback mechanisms and error handling ### 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(core): Hyperswitch <|> UCS integration v2 - Merged: 2025-07-11T14:44:46Z - Files changed: 13 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ### Fixes #8440 ## Description <!-- Describe your changes in detail --> This PR implements **V2 UCS (Unified Connector Service) Integration** for authorization and synchronization flows, building upon the existing V1 UCS integration (PR#[8280](https://github.com/juspay/ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): Hyperswitch <|> UCS integration v2 (#8439) Co-authored-by: debarshi.gupta <debarshi.gupt Files to modify: **crates/external_services/src/grpc_client/unified_connector_service.rs** Add: - function: pub::payment_get **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Add: - function: private::call_unified_connector_service **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Add: - function: private::foreign_try_from - impl: impl ForeignTryFrom<&RouterData<PSync, PaymentsSyncData, PaymentsResponseData>> for payments_grpc::PaymentServiceGetRequest **crates/router/src/types.rs** Modify existing code
{"issue_number": 8440, "pr_number": 8439, "commits_count": 1, "files_changed": 13, "response_length": 1911, "file_count": 13, "needs_breakdown": false}
Add Global Payments for card payments
<think> PR Context: - Title: feat(connector): add payment create, sync, capture, refund, void, rsync support for globalpay - Merged: 2023-01-11T14:03:07Z - Files changed: 26 files - Commits: 17 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> - Adding support for [globalpay](https://www.globalpayments.com/en-ap) payment gateway - Updated connector creation script **Payment Method:** card **Supported payment flows** - [Authorize](https://developer.globalpay.com/api/transactions#create) - [Capture](https://d </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): add payment create, sync, capture, refund, void, rsync support for globalpay (#322) Files to modify: **connector-template/mod.rs** Add: - function: private::build_request - function: private::build_request **connector-template/test.rs** Modify existing code **connector-template/transformers.rs** Modify existing code **crates/api_models/src/enums.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/connector.rs** Add: - mod: pub::globalpay - mod: pub::utils **crates/router/src/connector/globalpay.rs** Add: - function: private::build_headers - function: private::id - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::get_request_body - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::get_error_response - function: private::handle_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - function: private::get_flow_type - struct: pub::Globalpay - impl: impl ConnectorCommonExt<Flow, Request, Response> for Globalpay - impl: impl ConnectorCommon for Globalpay - impl: impl api::Payment for Globalpay - impl: impl api::PreVerify for Globalpay - impl: impl ConnectorIntegration<api::Verify, types::VerifyRequestData, types::PaymentsResponseData> for Globalpay - impl: impl api::PaymentVoid for Globalpay - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Globalpay - impl: impl api::PaymentSync for Globalpay - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Globalpay - impl: impl api::PaymentCapture for Globalpay - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Globalpay - impl: impl api::PaymentSession for Globalpay - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Globalpay - impl: impl api::PaymentAuthorize for Globalpay - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Globalpay - impl: impl api::Refund for Globalpay - impl: impl api::RefundExecute for Globalpay - impl: impl api::RefundSync for Globalpay - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Globalpay - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Globalpay - impl: impl api::IncomingWebhook for Globalpay - impl: impl services::ConnectorRedirectResponse for Globalpay - mod: private::requests - mod: private::response - mod: private::transformers **crates/router/src/connector/globalpay/requests.rs** Add: - struct: pub::GlobalpayPaymentsRequest - struct: pub::CurrencyConversion - struct: pub::Device - struct: pub::Capabilities - struct: pub::Lodging - struct: pub::LodgingChargeItem - struct: pub::Notifications - struct: pub::Order - struct: pub::PaymentMethod - struct: pub::Apm - struct: pub::Authentication - struct: pub::ThreeDs - struct: pub::BankTransfer - struct: pub::Bank - struct: pub::Address - struct: pub::Card - struct: pub::DigitalWallet - struct: pub::Encryption - struct: pub::StoredCredential - struct: pub::GlobalpayRefundRequest - enum: pub::AuthorizationMode - enum: pub::CaptureMode - enum: pub::Channel - enum: pub::EnabledResponse - enum: pub::CapabilitiesEntryMode - enum: pub::Mobile - enum: pub::PayerVerification - enum: pub::DeviceEntryMode - enum: pub::GratuityPromptMode - enum: pub::PrintReceiptMode - enum: pub::GlobalpayPaymentsRequestType - enum: pub::Initiator - enum: pub::Language - enum: pub::PaymentMethodProgramCode - enum: pub::TypeElement - enum: pub::ApmProvider - enum: pub::ExemptStatus - enum: pub::NumberType - enum: pub::SecCode - enum: pub::ChipCondition - enum: pub::CvvIndicator - enum: pub::Funding - enum: pub::DigitalWalletProvider - enum: pub::TokenFormat - enum: pub::Method - enum: pub::PaymentMethodEntryMode - enum: pub::FingerprintMode - enum: pub::CardStorageMode - enum: pub::Model - enum: pub::Reason - enum: pub::Sequence **crates/router/src/connector/globalpay/response.rs** Add: - struct: pub::GlobalpayPaymentsResponse - struct: pub::Action - struct: pub::CurrencyConversion - struct: pub::PaymentMethod - struct: pub::Apm - struct: pub::Bank - struct: pub::Mandate - struct: pub::Authentication - struct: pub::ThreeDs - struct: pub::BankTransfer - struct: pub::Card - struct: pub::ProviderClass - enum: pub::ResultCode - enum: pub::FundStatus - enum: pub::ApmProvider - enum: pub::NumberType - enum: pub::AvsAction - enum: pub::GlobalPayResult - enum: pub::Brand - enum: pub::FingerprintPresenceIndicator - enum: pub::GlobalpayPaymentStatus **crates/router/src/connector/globalpay/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - function: private::from - function: private::from - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::GlobalpayAuthType - struct: pub::GlobalpayErrorResponse - impl: impl TryFrom<&types::PaymentsAuthorizeRouterData> for GlobalpayPaymentsRequest - impl: impl TryFrom<&types::PaymentsCaptureRouterData> for GlobalpayPaymentsRequest - impl: impl TryFrom<&types::PaymentsCancelRouterData> for GlobalpayPaymentsRequest - impl: impl TryFrom<&types::ConnectorAuthType> for GlobalpayAuthType - impl: impl From<GlobalpayPaymentStatus> for enums::AttemptStatus - impl: impl From<GlobalpayPaymentStatus> for enums::RefundStatus - impl: impl TryFrom<types::ResponseRouterData<F, GlobalpayPaymentsResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData> - impl: impl TryFrom<&types::RefundsRouterData<F>> for requests::GlobalpayRefundRequest - impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, GlobalpayPaymentsResponse>> for types::RefundExecuteRouterData - impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, GlobalpayPaymentsResponse>> for types::RefundsRouterData<api::RSync> **crates/router/src/connector/utils.rs** Add: - function: pub::missing_field_err - function: private::get_card_number - function: private::get_card_expiry_month - function: private::get_card_expiry_year - function: private::get_card_expiry_year_2_digit - function: private::get_card_cvc - function: private::get_attempt_id - function: private::get_billing_country - function: private::get_card - trait: pub::PaymentsRequestData - trait: pub::CardData - impl: impl CardData for api::CCard - impl: impl PaymentsRequestData for types::PaymentsAuthorizeRouterData **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/connector_auth.rs** Modify existing code **crates/router/tests/connectors/globalpay.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_connector_meta - function: private::get_default_payment_info - function: private::should_only_authorize_payment - function: private::should_authorize_and_capture_payment - function: private::should_capture_already_authorized_payment - function: private::should_sync_payment - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_refund_succeeded_payment - function: private::should_void_already_authorized_payment - function: private::should_sync_refund - struct: private::Globalpay - impl: impl ConnectorActions for Globalpay - impl: impl utils::Connector for Globalpay **crates/router/tests/connectors/main.rs** Add: - mod: private::globalpay **crates/router/tests/connectors/shift4.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Add: - function: private::get_connector_meta - struct: pub::PaymentInfo **crates/router/tests/connectors/worldpay.rs** Modify existing code
{"issue_number": 230, "pr_number": 322, "commits_count": 1, "files_changed": 26, "response_length": 11066, "file_count": 22, "needs_breakdown": true}
[FEATURE] Add required fields for giropay ### Feature Description Add giropay wallet required fields for all connectors that implement Giropay ### Possible Implementation Add required fields for Giropay ### 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(pm_list): add required fields for giropay - Merged: 2024-02-12T08:10:52Z - Files changed: 14 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Resolves [#3622](https://github.com/juspay/hyperswitch/issues/3622) ### Test Cases 1. Create a giropay payment with mollie with empty payment method object. The payment should succeed. ``` { "amount": 1000, "currency": "EUR", " </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(pm_list): add required fields for giropay (#3194) Co-authored-by: hyperswitch-bot[bot] <148525 Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/configs/defaults.rs** Modify existing code **crates/router/src/connector/aci/transformers.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/worldline/transformers.rs** Modify existing code
{"issue_number": 3622, "pr_number": 3194, "commits_count": 1, "files_changed": 14, "response_length": 1345, "file_count": 8, "needs_breakdown": false}
[REFACTOR]: [Payeezy] Remove Default Case Handling ### :memo: Feature Description - We utilize match statements to make pivotal decisions, such as generating requests based on the payment method type and managing responses received from the connector. - These conditions generally go hand in hand with enum variants. - Default case is used because a match statement needs to be exhaustive i.e. every variant needs to be covered. - So, if all the explicit cases are handled then default is used to handle the rest. - Each connector have these match statements but many of them don’t provide reference to each variant in their default case, rather a `_` is put to handle all the other cases. - This approach carries a risk because developers may inadvertently overlook the need for explicit handling of the new cases. ### :hammer: Possible Implementation - Instead of relying on a default match case `_`, developers should handle each and every variant explicitly. - By doing so, if there are any changes in the future, they can readily assess the impact of their modifications simply by compiling the code. - You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/1955 :bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` ### :package: Have you spent some time checking if this feature request has been raised before? - [X] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): [Payeezy] remove default case handling - Merged: 2023-10-31T11:47:45Z - Files changed: 1 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Fix issue #2281 - Changes to be made : Remove default case handling - File changed: ```transformers.rs``` (crates/router/src/connector/payeezy/transformers.rs) ### Additional Changes - [ ] This PR modifies the API contract - [ ] Thi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): [Payeezy] remove default case handling (#2712) Co-authored-by: DEEPANSHU BANSAL Files to modify: **crates/router/src/connector/payeezy/transformers.rs** Modify existing code **Commit 2:** refactor(connector): [Payeezy] remove default case handling (#2712) Co-authored-by: DEEPANSHU BANSAL Files to modify: **crates/router/src/connector/payeezy/transformers.rs** Modify existing code
{"issue_number": 2281, "pr_number": 2712, "commits_count": 2, "files_changed": 1, "response_length": 1204, "file_count": 5, "needs_breakdown": false}
feat: ACH transfers ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> ACH (Automated Clearing House) transfer is a US based bank transfer method that enables electronic bank-to-bank money transfers through the ACH Network run by Nacha. Steps followed for ACH transfers: 1. After getting payments/confirm call for ACH bank transfer, stripe's source endpoint is called. We get the account_no, routing_no , swift_code etc. This response from stripe's endpoint is shown in the Hyperswitch's confirrm call response. ``` "ach_credit_transfer": { "account_number": "test_4e28a1d0114d", "bank_name": "TEST BANK", "routing_number": "110000000", "swift_code": "TSTEZ122", "amount_received": 0, "amount_charged": 0 } ``` 2. Front-end needs to instruct the customer to transfer funds from their bank to the above routing number and account number 3. Once the customer transfers money from their account and the transfer is settled (may take up to 5 days), the above source becomes chargeable and Stripe sends the **source.chargeable** and **source.transaction.created** webhook events. 4. Custom webhook event flow is implemented for ACH transfer, like after getting the above mentioned webhook events, we call **customer** endpoint and get the id and consume it in **charges** call. 5. The charge immediately succeeds but in case of some unexpected error, **charge.succeeded** webhook event from Stripe is received to confirm the payment success. 6. After the successful charge, webhook is triggered to merchant. <!-- 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` 7. `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). --> Bank Transfers are a popular way of transmitting money between different bank accounts and they are popular in US, EU and few Asian and LATAM countries. They are primarily used by businesses for accepting large payments from other businesses. Bank transfers are also used by consumers in certain countries as a preferred method for transferring money to others and while transacting online. So, ACH bank transfer will be added as a bank transfer feature ## 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="1240" alt="image" src="https://user-images.githubusercontent.com/59434228/232693691-75bf500f-0b51-4470-841e-4cbe7ce0e06f.png"> After this, if we get the source chargeable or source transaction created, we call customer and charges api of stripe and trigger the merchant webhook event. ## 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: fix(core): remove `missing_required_field_error` being thrown in `should_add_task_to_process_tracker` function - Merged: 2023-05-23T13:52:27Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> In should_add_task_to_process_tracker, if connector is missing then we are raising `MissingRequiredField` error. This will fail in some flows where connector is not available. This PR includes a fix for that. This bug was introduced in #905 <!-- Provide links to the files with corresponding changes. Following are the paths where you can find confi </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(core): remove `missing_required_field_error` being thrown in `should_add_task_to_process_tracker Files to modify: **crates/router/src/core/payments.rs** Modify existing code
{"issue_number": 905, "pr_number": 1239, "commits_count": 1, "files_changed": 2, "response_length": 1024, "file_count": 3, "needs_breakdown": false}
refactor(router): send 200 response for 5xx status codes received from connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Send the 200 response with status as `processing`, populating error_code and error_message when we receive 5xx status codes from connector. ### Additional Changes - [ ] 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` --> ## 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? Tested Manually DB payment_attempt for 5xx code from connector ![image](https://github.com/juspay/hyperswitch/assets/56996463/a3231f83-04ee-4303-bf1c-239d70d3840a) Payments response for 5xx code from connector ![image](https://github.com/juspay/hyperswitch/assets/56996463/fabebf05-fd28-42b5-a70e-2f086a478bb0) ## 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(connector): [Trustpay] add reason to all the error responses - Merged: 2023-06-20T10:35:24Z - Files changed: 2 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description After #1440, we are sending reason as error_message in payments response. Added valid reason for all the error responses. ### 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 reason to all the error responses (#1482) Files to modify: **crates/router/src/connector/trustpay.rs** Modify existing code **crates/router/src/connector/trustpay/transformers.rs** Modify existing code
{"issue_number": 1440, "pr_number": 1482, "commits_count": 1, "files_changed": 2, "response_length": 1036, "file_count": 4, "needs_breakdown": false}
docs(cypress): Update Cypress README Documentation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description In this PR, I have updated the README file to include detailed information about Cypress test scenarios and the folder structure . Added detailed instructions for adding new test scenarios to the ConnectorTest directory. Included a clear explanation of the folder structure, guiding contributors on where to find specific files and directories related to Cypress tests. Emphasized the importance of writing clear test scenarios using Cypress commands for effective testing. By providing a descriptive title and detailed description, reviewers can quickly understand the purpose of the changes and ensure that the README file enhancements align with the project's goals and standards. ### 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 This update aims to improve the documentation for contributors and provide a clearer understanding of the testing approach. ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: refactor(cypress): read creds from env instead of hardcoding the path - Merged: 2024-04-30T09:58:57Z - Files changed: 30 files - Commits: 18 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> - Beginning of Cypress refactor - Removed the hardcoded `ConnectorAuthDetails` for reading it through env - Code formatting - Remove duplicated logger code for calling it through a function - Documentation update is done at #4380 #### </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 4380, "pr_number": 4430, "commits_count": 0, "files_changed": 30, "response_length": 802, "file_count": 0, "needs_breakdown": false}
feat(users): Add profile level custom role Currently only merchant level custom role is allowed with role scope as Merchant and organization The requirement is to add profile level custom role at Organization , Merchant and Profile scope
<think> PR Context: - Title: feat(users): custom role at profile read - Merged: 2025-02-05T14:28:03Z - Files changed: 19 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pr adds the functionality to read custom role at profile level ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): custom role at profile read (#6875) Co-authored-by: hyperswitch-bot[bot] <148525504+hyp Files to modify: **crates/api_models/src/user_role/role.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - function: private::from **crates/diesel_models/src/query/role.rs** Remove: - function: pub::list_roles Add: - function: pub::generic_list_roles_by_entity_type **crates/diesel_models/src/role.rs** Add: - enum: pub::ListRolesByEntityPayload **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.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/core/user_role/role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Remove: - function: private::list_all_roles Add: - function: private::generic_list_roles_by_entity_type **crates/router/src/db/role.rs** Modify existing code **crates/router/src/services/authorization/roles.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code **Commit 2:** feat(users): custom role at profile read (#6875) Co-authored-by: hyperswitch-bot[bot] <148525504+hyp Files to modify: **crates/api_models/src/user_role/role.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - function: private::from **crates/diesel_models/src/query/role.rs** Remove: - function: pub::list_roles Add: - function: pub::generic_list_roles_by_entity_type **crates/diesel_models/src/role.rs** Add: - enum: pub::ListRolesByEntityPayload **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.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/core/user_role/role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Remove: - function: private::list_all_roles Add: - function: private::generic_list_roles_by_entity_type **crates/router/src/db/role.rs** Modify existing code **crates/router/src/services/authorization/roles.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"issue_number": 6488, "pr_number": 6875, "commits_count": 2, "files_changed": 19, "response_length": 3139, "file_count": 29, "needs_breakdown": true}
feat(Connector): [Noon] Add Cards payments, Refunds, Capture and Void ### Feature Description AddSupport for payments with Non-3DS cards via Noon. Includes: - [Authorize](https://docs.noonpayments.com/payment-api/reference/initiate) - [Capture](https://docs.noonpayments.com/payment-api/reference/capture) - [Void](https://docs.noonpayments.com/payment-api/reference/reverse) - [Refund](https://docs.noonpayments.com/payment-api/reference/refund) ### Possible Implementation Add all the flows in the connector files for Noon ### Have you spent some time to check if this feature request has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: feat(connector): [Noon] Add Card Payments, Capture, Void and Refund - Merged: 2023-05-23T11:30:20Z - Files changed: 8 files - Commits: 11 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added Card Payments (3DS and Non-3DS) along with all the listed flows: - [Authorize](https://docs.noonpayments.com/payment-api/reference/initiate) - [Capture](https://docs.noonpayments.com/payment-api/reference/capture) - [Void](https:/ </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [Noon] Add Card Payments, Capture, Void and Refund (#1207) Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/router/src/connector/noon.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_flow_type - impl: impl services::ConnectorRedirectResponse for Noon **crates/router/src/connector/noon/transformers.rs** Remove: - struct: pub::NoonPaymentsRequest Add: - struct: pub::NoonOrder - struct: pub::NoonConfiguration - enum: pub::NoonChannels - enum: pub::NoonPaymentActions - enum: pub::NoonPaymentData - enum: pub::NoonApiOperations **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/connector_auth.rs** Modify existing code **crates/router/tests/connectors/noon.rs** Modify existing code
{"issue_number": 1185, "pr_number": 1207, "commits_count": 1, "files_changed": 8, "response_length": 1962, "file_count": 9, "needs_breakdown": false}
Adding Deep health check for Hyperswitch Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy - [x] Failure of health check should emit logs providing evidential data regarding the failure The deep health will verify the following services - [x] #3267 - [x] #3268 - [x] #3269 - [x] #3270 - [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
<think> PR Context: - Title: refactor(payment_methods): propagate empty wallet details for paypal … - Merged: 2025-03-04T13:41:10Z - Files changed: 1 files - Commits: 2 commits Implementation approach: …during MIT ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR adds support for propagating the wallet details during MIT txns for PayPal. This ensures PayPal is propagated with same wallet details during CIT and MIT which in turn ensures the return type for `payment_method_data` is same for CIT and MIT. **Notes** - `ad </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(payment_methods): propagate empty wallet details for paypal … (#7423) Files to modify: **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code
{"issue_number": 3264, "pr_number": 7423, "commits_count": 1, "files_changed": 1, "response_length": 988, "file_count": 4, "needs_breakdown": false}
fix: fixes to surface level mandate issues ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description This Bugfixes fixes the following issues. 1. mandate_id not being populated in response for verify call 2. verify case while making payment for a mandate_id 3. validating mandate checks like currency and single use <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 4. `crates/router/src/configs` 5. `loadtest/config` --> ## Motivation and Context This PR deals with surface level bugs, and some data inconsistencies. <!-- 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? <img width="621" alt="Screenshot 2022-12-20 at 2 02 23 PM" src="https://user-images.githubusercontent.com/51093026/208620240-b1fc1bb2-2414-4050-9836-1b9e9ebda704.png"> <img width="867" alt="Screenshot 2022-12-20 at 2 10 16 PM" src="https://user-images.githubusercontent.com/51093026/208622052-d8fe4fe5-9745-49ff-9cf1-f46282e9ece0.png"> <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code
<think> PR Context: - Title: fix: fix mandate behaviour post merge - Merged: 2022-12-22T19:46:50Z - Files changed: 3 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description This bug was fixed in #180 but because of the PR order it was reintroduced in #191 <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. ` </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix: fix mandate behaviour post merge (#221) Files to modify: **crates/router/src/core/mandate.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Add: - function: private::get_setup_mandate_details **crates/router/src/core/payments/flows/verfiy_flow.rs** Add: - function: private::get_setup_mandate_details
{"issue_number": 180, "pr_number": 221, "commits_count": 1, "files_changed": 3, "response_length": 1129, "file_count": 5, "needs_breakdown": false}
[REFACTOR] remove unnecessary function from Refunds Validate Flow ### Bug Description Remove this function `validate_uniqueness_of_refund_id_against_merchant_id`. Not required as (refund_id, merchant_id ) unique btree, just insert. if insert fails it is not valid . ### Expected Behavior Not required as (refund_id, merchant_id ) unique btree, just insert. if insert fails it is not valid . ### Actual Behavior Does extra DB calls ### 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 for helping us debug your issue. If not (or if building/running locally), please provide the following details: 1. Operating System or Linux distribution: 2. Rust version (output of `rustc --version`): `` 3. App version (output of `cargo r --features vergen -- --version`): `` ### Have you spent some time to check if this bug has been raised before? - [X] I checked and didn't find similar issue ### Have you read the Contributing Guidelines? - [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### Are you willing to submit a PR? Yes I am willing to submit a PR!
<think> PR Context: - Title: refactor(router): remove unnecessary function from Refunds Validate Flow - Merged: 2023-10-18T10:44:50Z - Files changed: 2 files - Commits: 4 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Refactoring to remove `validate_uniqueness_of_refund_id_against_merchant_id` as it isn't required because of the db being a unique btree. So you are able to try to insert the refund by id and if the insert fails then the refund is not valid </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(router): remove unnecessary function from Refunds Validate Flow (#2609) Co-authored-by: Aar Files to modify: **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/refunds/validator.rs** Remove: - function: pub::validate_uniqueness_of_refund_id_against_merchant_id
{"issue_number": 1521, "pr_number": 2609, "commits_count": 1, "files_changed": 2, "response_length": 1118, "file_count": 4, "needs_breakdown": false}
One click docker setup A script is needed to ensure one click docker setup, to minimise issues faced by users. > Run the whole setup with simple command > Show output with localhost links for different setups
<think> PR Context: - Title: fix: script for one click docker setup - Merged: 2025-04-13T21:08:39Z - Files changed: 2 files - Commits: 15 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Script for one click docker setup, to minimise issues faced by users. >Run the whole setup with simple command >Show output with localhost links for different setups ### Additional Changes - [ ] This PR modifies the API contract - [ </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 7761, "pr_number": 7762, "commits_count": 0, "files_changed": 2, "response_length": 769, "file_count": 0, "needs_breakdown": false}
feat(users): support tenant level users - Add api to create tenant_admin - Create org by tenant level user - Support tenant entity: tenant level roles/permission
<think> PR Context: - Title: feat(users): add support for tenant level users - Merged: 2024-12-06T13:19:57Z - Files changed: 22 files - Commits: 15 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Add api to create tenant users - Add api to create orgs - Support tenant level entity for the user hierarchy A tenant level user should see dashboard as seen by the org admin. He will be pinned to one org, merchant and profile. And he can switch between any org in the given ten </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): add support for tenant level users (#6708) Co-authored-by: hyperswitch-bot[bot] <148525 Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::CreateTenantUserRequest - struct: pub::UserOrgMerchantCreateRequest **crates/common_enums/src/enums.rs** Modify existing code **crates/common_utils/src/consts.rs** Modify existing code **crates/diesel_models/src/query/merchant_account.rs** Add: - function: pub::list_all_merchant_accounts **crates/router/src/analytics.rs** Modify existing code **crates/router/src/consts/user.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::create_tenant_user - function: pub::create_org_merchant_for_user **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::list_merchant_and_org_ids **crates/router/src/db/merchant_account.rs** Add: - function: private::list_merchant_and_org_ids - function: private::list_merchant_and_org_ids **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/user.rs** Add: - function: pub::create_tenant_user - function: pub::user_org_create **crates/router/src/services/authorization/permissions.rs** Modify existing code **crates/router/src/services/authorization/roles/predefined_roles.rs** Modify existing code **crates/router/src/types/domain/user.rs** Add: - function: private::from - function: private::foreign_from - function: private::from - function: private::try_from - function: private::from - struct: pub::MerchantAccountIdentifier - struct: pub::TenantLevel - impl: impl From<(user_api::CreateTenantUserRequest, MerchantAccountIdentifier)> for NewUserOrganization - impl: impl ForeignFrom<api_models::user::UserOrgMerchantCreateRequest> for diesel_models::organization::OrganizationNew - impl: impl From<(user_api::CreateTenantUserRequest, MerchantAccountIdentifier)> for NewUserMerchant - impl: impl TryFrom<(user_api::CreateTenantUserRequest, MerchantAccountIdentifier)> for NewUser - impl: impl From<TenantLevel> for EntityInfo **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code **crates/router/src/utils/user.rs** Add: - function: pub::create_merchant_account_request_for_org **crates/router/src/utils/user_role.rs** Add: - function: pub::get_single_org_id **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 6707, "pr_number": 6708, "commits_count": 1, "files_changed": 22, "response_length": 3525, "file_count": 24, "needs_breakdown": true}
[FEATURE]: [ACI] 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): [ACI] Use connector_request_reference_id as reference to the connector - Merged: 2023-10-12T07:59:46Z - Files changed: 1 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Replaced payment_id with connector_request_reference_id ### Additional Changes - [X] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [ACI] Use connector_request_reference_id as reference to the connector (#2549) Sign Files to modify: **crates/router/src/connector/aci/transformers.rs** Modify existing code
{"issue_number": 2203, "pr_number": 2549, "commits_count": 1, "files_changed": 1, "response_length": 1014, "file_count": 3, "needs_breakdown": false}
Gift Card Balance check API for split payments We need to add an API to check balance for gift card. This API will be called by the SDK and based on the gift card balance and transaction amount, we will collect either only gift card details or gift card details + another payment method
<think> PR Context: - Title: feat(router): Add gift card balance check endpoint (v2) - Merged: 2025-09-17T07:50:47Z - Files changed: 29 files - Commits: 25 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Added `check-gift-card-balance` API - Added `GiftCardBalanceCheck` flow for connectors and implemented it for Adyen - Updated PML flow to store gift card enabled MCA in redis <img width="2314" height="1286" alt="image" src="https://gith </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(router): Add gift card balance check endpoint (v2) (#9102) Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for payments::GiftCardBalanceCheckResponse **crates/api_models/src/payments.rs** Add: - struct: pub::GiftCardBalanceCheckResponse - struct: pub::PaymentsGiftCardBalanceCheckRequest **crates/common_utils/src/id_type/global_id/payment.rs** Add: - function: pub::get_gift_card_connector_key **crates/hyperswitch_connectors/src/connectors/adyen.rs** Add: - function: private::get_headers - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_5xx_error_response - impl: impl api::PaymentsGiftCardBalanceCheck for Adyen - impl: impl ConnectorIntegration< GiftCardBalanceCheck, GiftCardBalanceCheckRequestData, GiftCardBalanceCheckResponseData, > for Adyen **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Add: - function: private::try_from - function: private::try_from - impl: impl TryFrom<&PaymentsGiftCardBalanceCheckRouterData> for AdyenBalanceRequest<'_> - impl: impl TryFrom< ResponseRouterData< GiftCardBalanceCheck, AdyenBalanceResponse, GiftCardBalanceCheckRequestData, GiftCardBalanceCheckResponseData, >, > for RouterData< GiftCardBalanceCheck, GiftCardBalanceCheckRequestData, GiftCardBalanceCheckResponseData, > **crates/hyperswitch_connectors/src/default_implementations.rs** Add: - impl: impl PaymentsGiftCardBalanceCheck for connectors::DummyConnector<T> - impl: impl ConnectorIntegration< GiftCardBalanceCheck, GiftCardBalanceCheckRequestData, GiftCardBalanceCheckResponseData, > for connectors::DummyConnector<T> **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Add: - impl: impl PaymentsGiftCardBalanceCheckV2 for $connector - impl: impl ConnectorIntegrationV2< GiftCardBalanceCheck, GiftCardBalanceCheckFlowData, GiftCardBalanceCheckRequestData, GiftCardBalanceCheckResponseData, > for $connector **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::GiftCardBalanceCheckFlowData **crates/hyperswitch_domain_models/src/router_flow_types/payments.rs** Add: - struct: pub::GiftCardBalanceCheck **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - struct: pub::GiftCardBalanceCheckRequestData **crates/hyperswitch_domain_models/src/router_response_types.rs** Add: - struct: pub::GiftCardBalanceCheckResponseData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api/payments.rs** Modify existing code **crates/hyperswitch_interfaces/src/api/payments_v2.rs** Add: - trait: pub::PaymentsGiftCardBalanceCheckV2 **crates/hyperswitch_interfaces/src/conversion_impls.rs** Add: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for GiftCardBalanceCheckFlowData **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Add: - function: pub::payment_check_gift_card_balance **crates/router/src/core.rs** Add: - mod: pub::gift_card **crates/router/src/core/gift_card.rs** Add: - function: pub::payments_check_gift_card_balance_core **crates/router/src/core/payments/payment_methods.rs** Add: - function: private::store_gift_card_mca_in_redis **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payment_check_gift_card_balance **crates/router/src/services/api.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 9101, "pr_number": 9102, "commits_count": 1, "files_changed": 29, "response_length": 5096, "file_count": 28, "needs_breakdown": true}
feat(core): setup platform merchant account - Setup platform merchant account. Platform merchant account is a special type of merchant account which can do operations on behalf of other merchant account present in the same organisation. - Add APIs to create a platform merchant account / convert a merchant account into platform account. - Feature should be disabled in sandbox and production.
<think> PR Context: - Title: feat(core): implemented platform merchant account - Merged: 2024-12-23T13:21:14Z - Files changed: 30 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description #### About the feature - This the first PR for the Platform Account feature. - Feature is under development and behind the feature flag. - Feature is supposed to be disabled for sandbox and production environments. #### Enabling the platform account. - New API has been created t </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(core): implemented platform merchant account (#6882) Co-authored-by: Narayanbhat166 <narayan.bh Files to modify: **crates/diesel_models/src/merchant_account.rs** Modify existing code **crates/diesel_models/src/payment_intent.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/errors/api_error_response.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/build.rs** Modify existing code **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents.rs** Modify existing code **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::Platform **crates/router/src/core/admin.rs** Add: - function: pub::enable_platform_account **crates/router/src/core/fraud_check.rs** Modify existing code **crates/router/src/core/fraud_check/operation.rs** Modify existing code **crates/router/src/core/fraud_check/operation/fraud_check_post.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture_v2.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.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.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_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.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_status.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/operations/payments_incremental_authorization.rs** Modify existing code **crates/router/src/core/payments/operations/tax_calculation.rs** Modify existing code **crates/router/src/core/payments/session_operation.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/admin.rs** Add: - function: pub::merchant_account_enable_platform_account **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: pub::get_id_type_from_header_if_present - function: private::get_connected_merchant_account - function: private::get_platform_merchant_account - function: private::get_and_validate_connected_merchant_id - function: private::throw_error_if_platform_merchant_authentication_required **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 6883, "pr_number": 6882, "commits_count": 1, "files_changed": 30, "response_length": 5751, "file_count": 58, "needs_breakdown": true}
feat(stripe): add setup intent in connector integration (stripe) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This PR adds a stripe POC for the verify API <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to. 1. Create new types for the change #45 2. Introduce the Flow and Connector Integration #47 3. Add Stripe POC 4. Move the mandate related behaviour to domain 5. Introduce the new operation and all the related components in the payments core <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: feat(routes): add the validation API in payments route - Merged: 2022-12-08T14:36:46Z - Files changed: 14 files - Commits: 21 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This PR is an extension to the pr for adding operation in payments core where the changes are also included in the routes #53 <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables < </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(routes): add the validation API in payments route (#61) Files to modify: **crates/router/src/compatibility/stripe/payment_intents.rs** Modify existing code **crates/router/src/connector/stripe.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_method_validate.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::update_tracker - impl: impl PostUpdateTracker<F, PaymentData<F>, types::VerifyRequestData> for PaymentResponse **crates/router/src/core/payments/transformers.rs** Add: - function: private::generate_response - function: private::generate_response - trait: pub::ToResponse - impl: impl ToResponse<Req, PaymentData<F>, Op> for api::PaymentsResponse - impl: impl ToResponse<Req, PaymentData<F>, Op> for api::VerifyResponse **crates/router/src/core/webhooks.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/types/api/payments.rs** Add: - function: private::from - function: private::from - impl: impl From<PaymentsRequest> for VerifyRequest - impl: impl From<VerifyRequest> for VerifyResponse **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code **crates/router_derive/src/macros/operation.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 50, "pr_number": 61, "commits_count": 1, "files_changed": 14, "response_length": 2413, "file_count": 16, "needs_breakdown": true}
[FEATURE] : Billwerk payments integration ### Feature Description Billwerk Payments is a payment gateway provider focused on Northern Europe countries. ### Possible Implementation Product: [https://www.billwerk.plus/payments/](https://www.billwerk.plus/payments/) Docs: [https://docs.reepay.com/](https://docs.reepay.com/) ### 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(connector): [billwerk] add connector template code - Merged: 2024-03-27T08:22:28Z - Files changed: 20 files - Commits: 12 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add Billwerk Template connector code https://reference.reepay.com/api/ ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environm </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [billwerk] add connector template code (#4123) Co-authored-by: hyperswitch-bot[bot] Files to modify: **crates/api_models/src/enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/connector_configs/src/connector.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/connector.rs** Add: - mod: pub::billwerk **crates/router/src/connector/billwerk.rs** Add: - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Billwerk - impl: impl api::Payment for Billwerk - impl: impl api::PaymentSession for Billwerk - impl: impl api::ConnectorAccessToken for Billwerk - impl: impl api::MandateSetup for Billwerk - impl: impl api::PaymentAuthorize for Billwerk - impl: impl api::PaymentSync for Billwerk - impl: impl api::PaymentCapture for Billwerk - impl: impl api::PaymentVoid for Billwerk - impl: impl api::Refund for Billwerk - impl: impl api::RefundExecute for Billwerk - impl: impl api::RefundSync for Billwerk - impl: impl api::PaymentToken for Billwerk - impl: impl ConnectorIntegration< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for Billwerk - impl: impl ConnectorCommonExt<Flow, Request, Response> for Billwerk - impl: impl ConnectorCommon for Billwerk - impl: impl ConnectorValidation for Billwerk - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for Billwerk - impl: impl ConnectorIntegration< api::SetupMandate, types::SetupMandateRequestData, types::PaymentsResponseData, > for Billwerk - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Billwerk - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Billwerk - impl: impl api::IncomingWebhook for Billwerk - mod: pub::transformers **crates/router/src/connector/billwerk/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - struct: pub::BillwerkRouterData - struct: pub::BillwerkPaymentsRequest - struct: pub::BillwerkCard - struct: pub::BillwerkAuthType - struct: pub::BillwerkPaymentsResponse - struct: pub::BillwerkRefundRequest - struct: pub::RefundResponse - struct: pub::BillwerkErrorResponse - enum: pub::BillwerkPaymentStatus - enum: pub::RefundStatus - impl: impl TryFrom<( &types::api::CurrencyUnit, types::storage::enums::Currency, i64, T, )> for BillwerkRouterData<T> - impl: impl TryFrom<&BillwerkRouterData<&types::PaymentsAuthorizeRouterData>> for BillwerkPaymentsRequest - impl: impl TryFrom<&types::ConnectorAuthType> for BillwerkAuthType - impl: impl From<BillwerkPaymentStatus> for enums::AttemptStatus - impl: impl TryFrom<types::ResponseRouterData<F, BillwerkPaymentsResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData> - impl: impl TryFrom<&BillwerkRouterData<&types::RefundsRouterData<F>>> for BillwerkRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>> for types::RefundsRouterData<api::Execute> - impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>> for types::RefundsRouterData<api::RSync> **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/billwerk.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_default_payment_info - function: private::payment_method_details - function: private::should_only_authorize_payment - function: private::should_capture_authorized_payment - function: private::should_partially_capture_authorized_payment - function: private::should_sync_authorized_payment - function: private::should_void_authorized_payment - function: private::should_refund_manually_captured_payment - function: private::should_partially_refund_manually_captured_payment - function: private::should_sync_manually_captured_refund - function: private::should_make_payment - function: private::should_sync_auto_captured_payment - function: private::should_refund_auto_captured_payment - function: private::should_partially_refund_succeeded_payment - function: private::should_refund_succeeded_payment_multiple_times - function: private::should_sync_refund - function: private::should_fail_payment_for_incorrect_cvc - function: private::should_fail_payment_for_invalid_exp_month - function: private::should_fail_payment_for_incorrect_expiry_year - function: private::should_fail_void_payment_for_auto_capture - function: private::should_fail_capture_for_invalid_payment - function: private::should_fail_for_refund_amount_higher_than_payment_amount - struct: private::BillwerkTest - impl: impl ConnectorActions for BillwerkTest - impl: impl utils::Connector for BillwerkTest **crates/router/tests/connectors/main.rs** Add: - mod: private::billwerk **crates/test_utils/src/connector_auth.rs** Modify existing code
{"issue_number": 3227, "pr_number": 4123, "commits_count": 1, "files_changed": 20, "response_length": 8983, "file_count": 16, "needs_breakdown": true}
build(router_env): obtain workspace member package names from `cargo_metadata` more deterministically ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates the build script code to obtain cargo workspace member package names to use a better and more deterministic way to do so. Previously, we used to perform string manipulation on the package ID format (obtained from the `workspace_members` field in `cargo metadata --format-version=1`), and the package ID format was not stabilized (until recently). The package ID format has been [stabilized](https://github.com/rust-lang/cargo/pull/12914) in Rust 1.77, and the stabilized format breaks our existing build scripts. This PR updates the build script code to instead obtain the workspace member package names using the [`Metadata::workspace_packages()`](https://docs.rs/cargo_metadata/0.18.1/cargo_metadata/struct.Metadata.html#method.workspace_packages) method that the `cargo_metadata` crate provides. ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This would fix builds from breaking once Rust 1.77 is released as the stable version on March 21st, 2024. Fixes #4137. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> `cargo run` was successful with both Rust 1.76 and 1.77 (although with warnings). I installed the Rust 1.77 toolchain by following the instructions from the [Rust 1.77.0 pre-release testing](https://blog.rust-lang.org/inside-rust/2024/03/17/1.77.0-prerelease.html) blog post. ## 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: ci(CI-pr): determine modified crates more deterministically - Merged: 2024-03-28T10:35:25Z - Files changed: 3 files - Commits: 2 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates the `CI-pr` workflow to determine modified crates more deterministically. As of now, the workflow is subject to the same problem addressed in #4139. To test the changes in the workflow, I've removed an empty module in the `a </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** ci(CI-pr): determine modified crates more deterministically (#4233) Files to modify: **crates/api_models/src/bank_accounts.rs** Modify existing code **crates/api_models/src/lib.rs** Remove: - mod: pub::bank_accounts
{"issue_number": 4139, "pr_number": 4233, "commits_count": 1, "files_changed": 3, "response_length": 1018, "file_count": 4, "needs_breakdown": false}
[BUG] Payments list doesn't work with pagination parameters ### Context - Currently the API accepts payment_id as pagination parameters for e.g starting_after = `pay_Ajabdhakjhah` - However the underlying code relies on the auto-increment characteristic of databases - While we do some sort of conversion here our pagination filters are based on `id` whereas the sort is `modified_at` - This causes the response list to be not actually be paginated but return inconsistent & wrong results #### Possible Solutions - Either we can update the pagination filters to use `modified_at` (which can cause inconsistencies with data lists since `modified_at` can be changed) - We can also try to sort out the list by incremental id
<think> PR Context: - Title: fix(router): desc payment list for pagination - Merged: 2023-07-07T09:11:59Z - Files changed: 3 files - Commits: 6 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Sorted the payment list order in API response for descending based on `created_at` parameter. It allows the database fetches to be asycn and is collected in an hashmap and collected later in a descending order. ### Additional Changes - [x] This PR modifies the API contract - </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** fix(router): desc payment list for pagination (#1556) Signed-off-by: NavinShrinivas <karupal2002@gma Files to modify: **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/types/storage/payment_intent.rs** Modify existing code
{"issue_number": 1439, "pr_number": 1556, "commits_count": 1, "files_changed": 3, "response_length": 1037, "file_count": 4, "needs_breakdown": false}
fix(connector): fix Stripe status to attempt status map ## 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 --> @Narayanbhat166 had added this accidentally ``` // This is the case in Pending, ``` and assured removing it won't break any flows. ``` StripePaymentStatus::RequiresPaymentMethod => Self::Failure, ``` This change done to accommodate manual retries ### 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)? --> compiles ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: revert(connector): fix stripe status to attempt status map - Merged: 2023-05-17T15:05:21Z - Files changed: 1 files - Commits: 2 commits Implementation approach: reverts #1132 This status is required in case of `sofort` bank_redirect payment method. Incorrect comments caused this to be removed. </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** revert(connector): fix stripe status to attempt status map (#1179) Files to modify: **crates/router/src/connector/stripe/transformers.rs** Modify existing code
{"issue_number": 1132, "pr_number": 1179, "commits_count": 1, "files_changed": 1, "response_length": 594, "file_count": 3, "needs_breakdown": false}
feat: get specific user role details api Currently frontend is using the user list api to get the details of the users in a particular merchant account. If somebody is in a user details page and refreshes, FE will again call list api to get the details as there is no api to get the details of a specific user.
<think> PR Context: - Title: feat(users): Add new API get the user and role details of specific user - Merged: 2024-03-07T06:37:39Z - Files changed: 7 files - Commits: 3 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently there is no way to get the details of user and their role directly. This API solves it by taking the email of the user and returns the details. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modif </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(users): Add new API get the user and role details of specific user (#3988) Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Remove: - struct: pub::GetUsersResponse Add: - struct: pub::ListUsersResponse - struct: pub::GetUserDetailsRequest - struct: pub::GetUserDetailsResponse **crates/router/src/core/user.rs** Add: - function: pub::get_user_details_in_merchant_account **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::get_user_role_details **crates/router_env/src/logger/types.rs** Modify existing code
{"issue_number": 3987, "pr_number": 3988, "commits_count": 1, "files_changed": 7, "response_length": 1556, "file_count": 9, "needs_breakdown": false}
[FEAT] Add mandates for Payload - Add MIT payments to Payload connector - Add connector customer - Fix amount conversion Relevant docs: - https://docs.payload.com/apis/payments/ - https://docs.payload.com/apis/payments/charging-a-customer/ - https://docs.payload.com/apis/automatic-payments/ - https://docs.payload.com/apis/customers/ - https://docs.payload.com/apis/object-reference/customers/ - https://docs.payload.com/apis/object-reference/transactions/ - https://docs.payload.com/apis/api-design/
<think> PR Context: - Title: feat(connector): [payload] add recurring payments - Merged: 2025-07-31T07:04:50Z - Files changed: 23 files - Commits: 29 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR targets Payload connector and has multiple fixes and a new feature introduced: - Add support for mandates (PMID and MandateID) - Add filters - Enable connector customer - Enable mandates - Add currency filter - Change A </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(connector): [payload] add recurring payments (#8597) Files to modify: **crates/hyperswitch_connectors/src/connectors/payload.rs** Remove: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Payload Add: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Payload **crates/hyperswitch_connectors/src/connectors/payload/requests.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload/responses.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload/transformers.rs** Remove: - struct: pub::PayloadAuthType Add: - function: private::try_from - function: private::try_from - struct: pub::PayloadAuth - struct: pub::PayloadAuthType - impl: impl TryFrom<(&ConnectorAuthType, enums::Currency)> for PayloadAuth - impl: impl TryFrom<&ConnectorAuthType> for PayloadAuthType **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::is_mandate_payment **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/test_utils/src/connector_auth.rs** Add: - function: private::from - impl: impl From<CurrencyAuthKey> for ConnectorAuthType
{"issue_number": 8610, "pr_number": 8597, "commits_count": 1, "files_changed": 23, "response_length": 2221, "file_count": 11, "needs_breakdown": false}
[FEATURE]: [Worldline] 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(worldline): use `connector_request_reference_id` as reference to the connector - Merged: 2023-10-12T12:04:42Z - Files changed: 1 files - Commits: 7 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Replace `payment_id` with `connector_request_reference_id` in worldline. Closes #2320 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- P </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(worldline): use `connector_request_reference_id` as reference to the connector (#2498) Files to modify: **crates/router/src/connector/worldline/transformers.rs** Add: - struct: pub::References
{"issue_number": 2320, "pr_number": 2498, "commits_count": 1, "files_changed": 1, "response_length": 1029, "file_count": 3, "needs_breakdown": false}
fix(compatibility): add last_payment_error in stripe payment response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description <!-- Describe your changes in detail --> Add last_payment_error field in payments response in stripe compatibility. ### Additional Changes - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless its an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Manual ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
<think> PR Context: - Title: Changelog for release v0.5.3 - Merged: 2023-03-29T10:34:03Z - Files changed: 1 files - Commits: 1 commits Implementation approach: # 0.5.3 (2023-03-29) ## Documentation Changes * **rfc:** add rfc template & first RFC (#806) (01a5e0a0) ## New Features * cards info api (#749) (b15b8f7b) * **connector:** [Nuvei] add webhook support (#795) (20b4372b) ## Bug Fixes * **compatibility:** add last_payment_error in stripe payment response (#803) (97b95f0e) ## Refactors * **api_models:** enhance accepted countries/currencies types (#807) (f9ef3135) * **services:** make AppState impl generic using AppSt </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 803, "pr_number": 812, "commits_count": 0, "files_changed": 1, "response_length": 758, "file_count": 5, "needs_breakdown": false}
[FEATURE] Implement `RefundInterface` for `MockDb` Spin out from #172. Please refer to that issue for more information.
<think> PR Context: - Title: feat(db): implement `RefundInterface` for `MockDb` - Merged: 2023-06-03T13:51:23Z - Files changed: 2 files - Commits: 6 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding c </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** feat(db): implement `RefundInterface` for `MockDb` (#1277) Co-authored-by: Sanchith Hegde <22217505+ Files to modify: **crates/router/src/db/refund.rs** Modify existing code **crates/storage_models/src/refund.rs** Add: - function: pub::create_refund - impl: impl RefundUpdateInternal
{"issue_number": 1276, "pr_number": 1277, "commits_count": 1, "files_changed": 2, "response_length": 1081, "file_count": 4, "needs_breakdown": false}
[FEATURE]: [Klarna] 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): [Klarna] Add order id as the reference id to merchant - Merged: 2023-10-19T14:22:51Z - Files changed: 1 files - Commits: 5 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### 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): [Klarna] Add order id as the reference id to merchant (#2614) Files to modify: **crates/router/src/connector/klarna/transformers.rs** Modify existing code
{"issue_number": 2334, "pr_number": 2614, "commits_count": 1, "files_changed": 1, "response_length": 978, "file_count": 3, "needs_breakdown": false}
[FEATURE] Cypress test for UCS through Hyperswitch ### Feature Description there should be a cypress test supported for ucs through hyperswitch ### Possible Implementation make code changes in cypress folder and call ucs related api's ### 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(cypress): Cypress test for ucs - Merged: 2025-09-02T15:36:00Z - Files changed: 5 files - Commits: 30 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> added cypress test for ucs by maintaing the flow Closes #8968 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment vari </think> To implement this, you'll need to modify: (No detailed commit information available)
{"issue_number": 8968, "pr_number": 8967, "commits_count": 0, "files_changed": 5, "response_length": 766, "file_count": 0, "needs_breakdown": false}
[REFACTOR]: [WISE] Add amount conversion framework to Wise ### :memo: Feature Description Currently, amounts are represented as `i64` values throughout the application. We want to introduce a `Unit` struct that explicitly states the denomination. A new type, `MinorUnit`, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows. Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application. ### :hammer: Possible Implementation - For each connector, we need to create an amount conversion function. Connectors will specify the format they require, and the core framework will handle the conversion accordingly. - Connectors should invoke the `convert` function to receive the amount in their required format. - Refer to the [connector documentation](https://docs.wise.com/api-docs/api-reference/card) to determine the required amount format for each connector. - You can refer [this PR](https://github.com/juspay/hyperswitch/pull/4825) for more context. 🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` , `crates/router/src/types/api.rs` , `crates/router/tests/connectors/` ### :package: Have you spent some time checking if this feature request has been raised before? - [ ] I checked and didn't find a similar issue ### :package: Have you read the Contributing Guidelines? - [ ] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md) ### :package: Submission Process: - Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself. - Once assigned, submit a pull request (PR). - Maintainers will review and provide feedback, if any. - Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules). Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest. ### :sparkles: Are you willing to submit a PR?
<think> PR Context: - Title: refactor(connector): Added amount conversion framework to Wise. - Merged: 2024-11-07T07:36:11Z - Files changed: 4 files - Commits: 1 commits Implementation approach: ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces significant changes to the Wise connector in the `crates/router` module, focusing on the integration of a new amount conversion utility and refactoring to utilize a new `WiseRouterData` struct. The changes enhance </think> To implement this, you'll need to modify: **Detailed Implementation:** **Commit 1:** refactor(connector): Added amount conversion framework to Wise. (#6469) Files to modify: **crates/router/src/connector/wise.rs** Remove: - struct: pub::Wise Add: - function: pub::new - struct: pub::Wise - impl: impl Wise **crates/router/src/connector/wise/transformers.rs** Add: - function: private::from - struct: pub::WiseRouterData - impl: impl From<(MinorUnit, T)> for WiseRouterData<T> **crates/router/src/types/api.rs** Modify existing code **crates/router/tests/connectors/wise.rs** Modify existing code
{"issue_number": 6121, "pr_number": 6469, "commits_count": 1, "files_changed": 4, "response_length": 1349, "file_count": 6, "needs_breakdown": false}