prompt
stringlengths 24
63.1k
| response
stringlengths 296
101k
| metadata
stringlengths 143
152
|
|---|---|---|
[REFACTOR]: [Square] 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): [Square] remove default case handling
- Merged: 2023-10-27T16:44:13Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Fix issue #2286
- Changes to be made : Remove default case handling
- File changed: ```transformers.rs``` (crates/router/src/connector/square/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): [Square] remove default case handling (#2701)
Co-authored-by: DEEPANSHU BANSAL
Files to modify:
**crates/router/src/connector/square/transformers.rs**
Modify existing code
**Commit 2:** refactor(connector): [Square] remove default case handling (#2701)
Co-authored-by: DEEPANSHU BANSAL
Files to modify:
**crates/router/src/connector/square/transformers.rs**
Modify existing code
|
{"issue_number": 2286, "pr_number": 2701, "commits_count": 2, "files_changed": 1, "response_length": 1201, "file_count": 5, "needs_breakdown": false}
|
feat(core): accept payment_confirm_source header in capture call and store in payment_intent
## 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 -->
Accept payment_confirm_source header in payments confirm call and store it in payment_intent table and return in the response header.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(test_utils): Add custom-headers and custom delay support to rustman
- Merged: 2023-11-07T17:43:02Z
- Files changed: 4 files
- Commits: 19 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
- [x] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
Closes #2646
This PR as usual, narrows the main aim of rustman by making specific to Hyperswitch. With this, you should now be able to:
- Set delay between each request sent as per your own wish while default being `7` milliseconds
- Pass in custom-headers of your wish in run time
### How custom-headers works
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(test_utils): Add custom-headers and custom delay support to rustman (#2636)
Files to modify:
**crates/test_utils/src/main.rs**
Modify existing code
**crates/test_utils/src/newman_runner.rs**
Add:
- function: private::insert_content
- struct: pub::ReturnArgs
|
{"issue_number": 2116, "pr_number": 2636, "commits_count": 1, "files_changed": 4, "response_length": 1083, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] Include client source and client version to identify where a payment attempt originated from
### Feature Description
Include client source and client version in the payment_attempt schema to identify where a payment attempt originated from.
### Possible Implementation
Collect this information from the PaymentsConfirm request headers
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: fix: include client columns in payment attempts response struct
- Merged: 2024-05-28T10:39:36Z
- Files changed: 3 files
- Commits: 2 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 pull request introduces a modification to the **PaymentAttemptResponse** struct by adding two new fields: **client_source** and **client_version**. These fields are intended to provide additional context about the client making the paymen
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix: include client columns in payment attempts response struct (#4761)
Co-authored-by: hyperswitch-
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 4656, "pr_number": 4761, "commits_count": 1, "files_changed": 3, "response_length": 1044, "file_count": 7, "needs_breakdown": false}
|
refactor(payment_methods): add `requires_cvv` field to customer payment method list api object
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Added new field in the customer list payment method object to include `requires_cvv` field which specifies whether for a given merchant, cvv is a required_field to be collected. If an entry is found in config table, then requires_cvv is set to `false` i.e., by default cvv is made a required_field for all merchants
Requires db insertion into configs table with key as `<merchant_id>_requires_cvv` and config as `false`
DB query - `insert into configs(key,config) values('<merchant_id>_requires_cvv',false);`
### 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`
-->
## 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)?
-->
ListPaymentMethodForCustomer object

## 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): add `requires_cvv` field to customer payment method list api object
- Merged: 2023-08-03T12:01:23Z
- 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
<!-- Describe your changes in detail -->
Hotfix [#1852](https://github.com/juspay/hyperswitch/pull/1852)
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment vari
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_methods): add `requires_cvv` field to customer payment method list api object (#1858)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
|
{"issue_number": 1852, "pr_number": 1858, "commits_count": 1, "files_changed": 3, "response_length": 1082, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] onboard customer's bank details using /payment_methods CREATE
### Feature Description
Add capability to onboard customers and their bank details prior to making a txn.
**Current State**
Only card payment method can be persisted using /payment_methods endpoint. A txn has to be completed for persisting bank details.
**Use case**
Use payment_tokens for initiating a bank txn.
### Possible Implementation
Add capability in /payment_methods CREATE API to persist bank details.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(payment_method): add capability to store bank details using /payment_methods endpoint
- Merged: 2024-01-17T09:19:29Z
- Files changed: 14 files
- Commits: 16 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
Ref - Issue #3112
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payment_method): add capability to store bank details using /payment_methods endpoint (#3113)
C
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payouts.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Remove:
- function: private::get_payout_card_details
Add:
- function: private::try_from
- impl: impl TryFrom<&PayoutMethodData> for PayoutCardDetails
**crates/router/src/core/locker_migration.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Add:
- function: pub::store_default_payment_method
**crates/router/src/core/payment_methods/transformers.rs**
Add:
- function: pub::mk_add_bank_response_hs
**crates/router/src/core/payment_methods/vault.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/helpers.rs**
Modify existing code
**crates/router/src/types/api/payment_methods.rs**
Modify existing code
**crates/router/tests/connectors/adyen.rs**
Modify existing code
**crates/router/tests/connectors/wise.rs**
Modify existing code
|
{"issue_number": 3112, "pr_number": 3113, "commits_count": 1, "files_changed": 14, "response_length": 2090, "file_count": 15, "needs_breakdown": false}
|
feat(users): Decision manager changes for SSO Flows
Because SSO needs new flows and will affect other login flows and email flows like accept invite, we have to change some flows in Decision Manager for SSO flows.
|
<think>
PR Context:
- Title: feat(users): Decision manager flow changes for SSO
- Merged: 2024-06-24T12:35:15Z
- Files changed: 6 files
- Commits: 10 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR adds SSO flows in login decision flows. Currently they are disabled as we have no APIs for SSO and will be enabled in upcoming PRs which adds SSO APIs.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): Decision manager flow changes for SSO (#4995)
Co-authored-by: hyperswitch-bot[bot] <148
Files to modify:
**crates/common_enums/src/enums.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/services/authentication.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Modify existing code
**crates/router/src/types/domain/user/decision_manager.rs**
Modify existing code
|
{"issue_number": 4992, "pr_number": 4995, "commits_count": 1, "files_changed": 6, "response_length": 1310, "file_count": 8, "needs_breakdown": false}
|
feat(payout_link): return total_count in filtered payouts list API response
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR refactors the payouts filtered list's API response to include `total_count` which specifies the total number of payout entries available for the given constraints.
### 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?
1. Create payouts (create multiple for listing based on different constraints)
<details>
<summary>2. Filter payouts</summary>
curl --location 'http://localhost:8080/payouts/list' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_cp78v8fT2C03KkEClI9aBMrqKF6N0SBLyUjasXtUQMbLTasfR2LJwjg0LlNHY060' \
--data '{}'

</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
|
<think>
PR Context:
- Title: fix(payout): query for getting a list of active payout IDs
- Merged: 2024-09-04T09:49:50Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR fixes the DB query for fetching a list of active payout IDs, which is later used for getting a total count of available payout objects.
Fixes the payout list API response in #5538
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payout): query for getting a list of active payout IDs (#5771)
Files to modify:
**crates/storage_impl/src/payouts/payouts.rs**
Modify existing code
|
{"issue_number": 5538, "pr_number": 5771, "commits_count": 1, "files_changed": 1, "response_length": 946, "file_count": 3, "needs_breakdown": false}
|
refactor(mandate): allow merchant to pass the mandate details and customer acceptance separately
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
**Current Implementation**
In order to create a mandate, the merchant has to provide both `mandate_type` and `customer_acceptance` together and is only allowed during the confirm call.
**Requirements**
As per the SDK requirements and the data availability. Both of these data fields won't be available together on either the merchant side or the SDK side. This compels us to make a mechanism which will provide a way for the merchant to provide the `mandate_type` and the SDK to provide `customer_acceptance`.
**Change**
The PR aims to solve the current limitations and provide a way for the merchant to provide/update the mandate type, and they allow the customer during the confirm call to provide the customer_acceptance to create & activate the mandate.
The PR also provides a entry flag in the `payment_method_list` to let the customer know, that this payment is a create mandate payment. This is done by looking for any mandate details in the payment_attempt when the customer tries to get the list of the payment methods
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the API contract
adding an extra field in the payment_method_list response
```json
{
mandate_payment: "new_mandate_txn",
}
```
Currently, this field will only be visible if it's a new mandate payment with the above mention addition in the payment_method_list API
- [x] This PR modifies the database schema
the following migration is done
```sql
ALTER TABLE payment_attempt ADD COLUMN mandate_details JSONB;
```
<!--
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
Customer critical
<!--
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?

This is the initial payment with `confirm: false`

This is the following confirm call, which creates the mandate

And this is the recurring payment, which provides a proof, that the mandate was successfully created
<!--
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(list): add mandate type in payment_method_list
- Merged: 2023-05-23T11:29:25Z
- Files changed: 3 files
- Commits: 2 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
This builds over #1188 , due to a change of requirement, the customer side mandate information must not only indicate that it's a mandate payment but also the information about the mandate.
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(list): add mandate type in payment_method_list (#1238)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
|
{"issue_number": 1188, "pr_number": 1238, "commits_count": 1, "files_changed": 3, "response_length": 1004, "file_count": 4, "needs_breakdown": false}
|
[BUG] Pass attempt id and payment id as reference in trustpay
### Bug Description
Currently we pass payment_id as reference in trust pay. Webhooks processing will fail because of this as webhooks require attempt id
### Expected Behavior
This needs to be fixed by passing both payment id and attempt id.
### Actual Behavior
Payment id is being passed
### Steps To Reproduce
NA
### Context For The Bug
_No response_
### Environment
Any env
### 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: fix(connector): use reference as payment_id in trustpay
- Merged: 2023-06-15T12:45:55Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Payment id will be passed as reference in trustpay. This is a temporary solution. Ideally attempt id needs to be passed for webhooks to be handled. issue created here - #1443
### Additional Changes
- [ ] This PR modifies the API contrac
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): use reference as payment_id in trustpay (#1444)
Files to modify:
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
**Commit 2:** fix(connector): use reference as payment_id in trustpay (#1444)
Files to modify:
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
|
{"issue_number": 1443, "pr_number": 1444, "commits_count": 2, "files_changed": 1, "response_length": 1128, "file_count": 5, "needs_breakdown": false}
|
[BUG] recurring mandate through bancontact card bank redirect via stripe fails
connector throws below error:
```
"The provided bancontact PaymentMethod cannot be used again. It was used in a previous PaymentIntent or SetupIntent to set up a sepa_debit PaymentMethod, which can be used for multiple payments. To find the ID of the sepa_debit PaymentMethod, list the sepa_debit PaymentMethods associated with the Customer used to set up this PaymentMethod."
```
this is because we're just passing bancontact card payment method id instead of sepa direct debit payment method id.
check:
- https://docs.stripe.com/payments/bancontact
- https://docs.stripe.com/payments/bancontact/save-during-payment?platform=web#web-charge-sepa-pm
|
<think>
PR Context:
- Title: fix(connector): [stripe] fix bank redirect (`bancontact_card`) recurring mandate
- Merged: 2025-05-13T07:07:45Z
- 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
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
this pr aims to fix the stripe bank redirect recurring mandate.
for context, `bancontact` recurring mandates happen via `sepa direct debit` and hence, stripe sends 2 connector mandate ids as shown below:
```json
{
"payment_method": "
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [stripe] fix bank redirect (`bancontact_card`) recurring mandate (#7990)
Files to modify:
**crates/router/src/connector/stripe/transformers.rs**
Add:
- function: pub::get_payment_method_id
|
{"issue_number": 7989, "pr_number": 7990, "commits_count": 1, "files_changed": 1, "response_length": 1025, "file_count": 3, "needs_breakdown": false}
|
chore(codeowners): add codeowners data for PR reviews
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Adding a CODEOWNERS file for facilitating PR reviews for teams
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
This leads to better ownership boundaries & increased efficiency for reviewers
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Doesn't need to be tested
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(core): add bulk tokenization flows
- Merged: 2025-03-07T13:24:06Z
- Files changed: 26 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
This PR introduces below changes
- Exposes two endpoints for
- Single card tokenization
- Tokenizing raw card details with the network
- Tokenizing an existing payment method in HS with the network (card only)
- Bulk tokenization
- Tokenizing us
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add bulk tokenization flows (#7066)
Co-authored-by: hyperswitch-bot[bot] <148525504+hype
Files to modify:
**crates/api_models/src/payment_methods.rs**
Add:
- function: private::from
- struct: pub::CardNetworkTokenizeRequest
- struct: pub::TokenizeCardRequest
- struct: pub::TokenizePaymentMethodRequest
- struct: pub::CardNetworkTokenizeResponse
- enum: pub::TokenizeDataRequest
- impl: impl common_utils::events::ApiEventMetric for CardNetworkTokenizeRequest
- impl: impl common_utils::events::ApiEventMetric for CardNetworkTokenizeResponse
- impl: impl From<&Card> for MigrateCardDetail
**crates/hyperswitch_domain_models/src/bulk_tokenization.rs**
Add:
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_try_from
- function: private::foreign_from
- function: private::foreign_try_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- struct: pub::CardNetworkTokenizeRequest
- struct: pub::TokenizeCardRequest
- struct: pub::TokenizePaymentMethodRequest
- struct: pub::CardNetworkTokenizeRecord
- enum: pub::TokenizeDataRequest
- impl: impl ForeignFrom<&CardNetworkTokenizeRecord> for payments_api::CustomerDetails
- impl: impl ForeignFrom<&CardNetworkTokenizeRecord> for payments_api::Address
- impl: impl ForeignTryFrom<CardNetworkTokenizeRecord> for payment_methods_api::CardNetworkTokenizeRequest
- impl: impl ForeignFrom<&TokenizeCardRequest> for payment_methods_api::MigrateCardDetail
- impl: impl ForeignTryFrom<CustomerDetails> for payments_api::CustomerDetails
- impl: impl ForeignFrom<payment_methods_api::CardNetworkTokenizeRequest> for CardNetworkTokenizeRequest
- impl: impl ForeignFrom<payment_methods_api::TokenizeDataRequest> for TokenizeDataRequest
- impl: impl ForeignFrom<payments_api::CustomerDetails> for CustomerDetails
- impl: impl ForeignFrom<payments_api::Address> for Address
- impl: impl ForeignFrom<payments_api::AddressDetails> for AddressDetails
- impl: impl ForeignFrom<payments_api::PhoneDetails> for PhoneDetails
**crates/hyperswitch_domain_models/src/lib.rs**
Add:
- mod: pub::bulk_tokenization
**crates/hyperswitch_domain_models/src/network_tokenization.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Add:
- function: private::from
- struct: pub::CardDetail
- impl: impl From<&Card> for CardDetail
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Add:
- function: pub::tokenize_card_api
- function: pub::tokenize_card_using_pm_api
**crates/router/src/core/errors.rs**
Add:
- enum: pub::BulkNetworkTokenizationError
**crates/router/src/core/payment_methods.rs**
Add:
- mod: pub::tokenize
**crates/router/src/core/payment_methods/cards.rs**
Add:
- function: pub::tokenize_card_flow
- function: pub::execute_card_tokenization
- function: pub::execute_payment_method_tokenization
**crates/router/src/core/payment_methods/network_tokenization.rs**
Modify existing code
**crates/router/src/core/payment_methods/tokenize.rs**
Add:
- function: pub::parse_csv
- function: pub::get_tokenize_card_form_records
- function: pub::tokenize_cards
- function: private::new
- function: private::encrypt_card
- function: private::encrypt_network_token
- function: private::fetch_bin_details_and_validate_card_network
- function: private::tokenize_card
- function: private::validate_card_network
- function: private::store_network_token_in_locker
- struct: pub::CardNetworkTokenizeForm
- struct: pub::StoreLockerResponse
- struct: pub::NetworkTokenizationBuilder
- struct: pub::CardNetworkTokenizeExecutor
- trait: pub::State
- trait: pub::TransitionTo
- trait: pub::NetworkTokenizationProcess
- impl: impl NetworkTokenizationProcess<'a, D> for CardNetworkTokenizeExecutor<'a, D>
- mod: pub::card_executor
- mod: pub::payment_method_executor
**crates/router/src/core/payment_methods/tokenize/card_executor.rs**
Add:
- function: private::default
- function: pub::new
- function: pub::set_validate_result
- function: pub::set_card_details
- function: pub::set_customer
- function: pub::get_optional_card_and_cvc
- function: pub::set_token_details
- function: pub::set_stored_card_response
- function: pub::set_stored_token_response
- function: pub::set_payment_method_response
- function: pub::build
- function: pub::validate_request_and_fetch_optional_customer
- function: pub::create_customer
- function: pub::store_card_and_token_in_locker
- function: pub::store_card_in_locker
- function: pub::create_payment_method
- struct: pub::TokenizeWithCard
- struct: pub::CardRequestValidated
- struct: pub::CardDetailsAssigned
- struct: pub::CustomerAssigned
- struct: pub::CardTokenized
- struct: pub::CardStored
- struct: pub::CardTokenStored
- struct: pub::PaymentMethodCreated
- impl: impl State for TokenizeWithCard
- impl: impl State for CustomerAssigned
- impl: impl State for CardRequestValidated
- impl: impl State for CardDetailsAssigned
- impl: impl State for CardTokenized
- impl: impl State for CardStored
- impl: impl State for CardTokenStored
- impl: impl State for PaymentMethodCreated
- impl: impl TransitionTo<CardRequestValidated> for TokenizeWithCard
- impl: impl TransitionTo<CardDetailsAssigned> for CardRequestValidated
- impl: impl TransitionTo<CustomerAssigned> for CardDetailsAssigned
- impl: impl TransitionTo<CardTokenized> for CustomerAssigned
- impl: impl TransitionTo<CardTokenStored> for CardTokenized
- impl: impl TransitionTo<PaymentMethodCreated> for CardTokenStored
- impl: impl Default for NetworkTokenizationBuilder<'_, TokenizeWithCard>
- impl: impl NetworkTokenizationBuilder<'a, TokenizeWithCard>
- impl: impl NetworkTokenizationBuilder<'a, CardRequestValidated>
- impl: impl NetworkTokenizationBuilder<'a, CardDetailsAssigned>
- impl: impl NetworkTokenizationBuilder<'a, CustomerAssigned>
- impl: impl NetworkTokenizationBuilder<'a, CardTokenized>
- impl: impl NetworkTokenizationBuilder<'a, CardStored>
- impl: impl NetworkTokenizationBuilder<'a, CardTokenStored>
- impl: impl NetworkTokenizationBuilder<'_, PaymentMethodCreated>
- impl: impl CardNetworkTokenizeExecutor<'_, domain::TokenizeCardRequest>
**crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs**
Add:
- function: private::default
- function: pub::new
- function: pub::set_payment_method
- function: pub::set_validate_result
- function: pub::set_card_details
- function: pub::get_optional_card_and_cvc
- function: pub::set_token_details
- function: pub::set_stored_token_response
- function: pub::set_payment_method
- function: pub::build
- function: pub::fetch_payment_method
- function: pub::validate_request_and_locker_reference_and_customer
- function: pub::update_payment_method
- struct: pub::TokenizeWithPmId
- struct: pub::PmValidated
- struct: pub::PmFetched
- struct: pub::PmAssigned
- struct: pub::PmTokenized
- struct: pub::PmTokenStored
- struct: pub::PmTokenUpdated
- impl: impl State for TokenizeWithPmId
- impl: impl State for PmValidated
- impl: impl State for PmFetched
- impl: impl State for PmAssigned
- impl: impl State for PmTokenized
- impl: impl State for PmTokenStored
- impl: impl State for PmTokenUpdated
- impl: impl TransitionTo<PmFetched> for TokenizeWithPmId
- impl: impl TransitionTo<PmValidated> for PmFetched
- impl: impl TransitionTo<PmAssigned> for PmValidated
- impl: impl TransitionTo<PmTokenized> for PmAssigned
- impl: impl TransitionTo<PmTokenStored> for PmTokenized
- impl: impl TransitionTo<PmTokenUpdated> for PmTokenStored
- impl: impl Default for NetworkTokenizationBuilder<'_, TokenizeWithPmId>
- impl: impl NetworkTokenizationBuilder<'a, TokenizeWithPmId>
- impl: impl NetworkTokenizationBuilder<'a, PmFetched>
- impl: impl NetworkTokenizationBuilder<'a, PmValidated>
- impl: impl NetworkTokenizationBuilder<'a, PmAssigned>
- impl: impl NetworkTokenizationBuilder<'a, PmTokenized>
- impl: impl NetworkTokenizationBuilder<'a, PmTokenStored>
- impl: impl NetworkTokenizationBuilder<'_, PmTokenUpdated>
- impl: impl CardNetworkTokenizeExecutor<'_, domain::TokenizePaymentMethodRequest>
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Add:
- function: pub::tokenize_card_api
- function: pub::tokenize_card_using_pm_api
- function: pub::tokenize_card_batch_api
**crates/router/src/types/api/payment_methods.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router/src/types/domain.rs**
Modify existing code
**crates/router/src/types/domain/payments.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 1, "pr_number": 7066, "commits_count": 1, "files_changed": 26, "response_length": 10421, "file_count": 26, "needs_breakdown": true}
|
[FEATURE]: [Multisafepay] 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): [Multisafepay] Use connector_request_reference_id as reference to the connector
- Merged: 2023-10-09T18:47:55Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
- Addressing Issue [#2305](https://github.com/juspay/hyperswitch/issues/2305): Use connector_request_reference_id as reference to the connector
- Modified two files in `hyperswitch/crates/router/src/connector/`
- `multisafepay.rs`
- `multisafepay/transformers.rs`
- Rebase with
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Multisafepay] Use connector_request_reference_id as reference to the connector (#2
Files to modify:
**crates/router/src/connector/multisafepay.rs**
Modify existing code
**crates/router/src/connector/multisafepay/transformers.rs**
Modify existing code
|
{"issue_number": 2305, "pr_number": 2503, "commits_count": 1, "files_changed": 2, "response_length": 1104, "file_count": 4, "needs_breakdown": false}
|
feat(analytics): add `sessionized_metrics` for disputes (backwards compatibility)
## Current Behaviour
- There is no `sessionized_metrics` module for disputes like there is for `payments` and `payment_intents`
## Proposed Changes
- create `sessionized_metrics` module for disputes
|
<think>
PR Context:
- Title: feat(analytics): add `sessionized_metrics` for disputes analytics
- Merged: 2024-11-26T13:58:33Z
- Files changed: 13 files
- Commits: 6 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
<!-- Describe your changes in detail -->
- Add sessionized metrics module and implement backwards compatibility.
- Add the `sessionizer_dispute` table support for Sessionized metrics.
### Fixes #6572
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): add `sessionized_metrics` for disputes analytics (#6573)
Co-authored-by: hyperswitc
Files to modify:
**crates/analytics/src/clickhouse.rs**
Modify existing code
**crates/analytics/src/disputes/accumulators.rs**
Modify existing code
**crates/analytics/src/disputes/core.rs**
Modify existing code
**crates/analytics/src/disputes/metrics.rs**
Add:
- mod: private::sessionized_metrics
**crates/analytics/src/disputes/metrics/sessionized_metrics/dispute_status_metric.rs**
Add:
- function: private::load_metrics
- struct: pub::DisputeStatusMetric
- impl: impl super::DisputeMetric<T> for DisputeStatusMetric
**crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rs**
Add:
- mod: private::dispute_status_metric
- mod: private::total_amount_disputed
- mod: private::total_dispute_lost_amount
**crates/analytics/src/disputes/metrics/sessionized_metrics/total_amount_disputed.rs**
Add:
- function: private::load_metrics
- struct: pub::TotalAmountDisputed
- impl: impl super::DisputeMetric<T> for TotalAmountDisputed
**crates/analytics/src/disputes/metrics/sessionized_metrics/total_dispute_lost_amount.rs**
Add:
- function: private::load_metrics
- struct: pub::TotalDisputeLostAmount
- impl: impl super::DisputeMetric<T> for TotalDisputeLostAmount
**crates/analytics/src/sqlx.rs**
Modify existing code
**crates/analytics/src/types.rs**
Modify existing code
**crates/api_models/src/analytics.rs**
Add:
- struct: pub::DisputesAnalyticsMetadata
- struct: pub::DisputesMetricsResponse
**crates/api_models/src/analytics/disputes.rs**
Modify existing code
**crates/api_models/src/events.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for DisputesMetricsResponse<T>
|
{"issue_number": 6572, "pr_number": 6573, "commits_count": 1, "files_changed": 13, "response_length": 2614, "file_count": 15, "needs_breakdown": false}
|
refactor: enable `logs` feature flag in router crate
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR includes changes for enabling `logs` feature flag in router crate for enabling logs for `connector_request_body`
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->

## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: refactor: enable `logs` feature flag in router crate (#2358)
- Merged: 2023-09-27T12:11:01Z
- Files changed: 1 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 -->
Hotfix PR - [#2358](https://github.com/juspay/hyperswitch/pull/2358)
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 2358, "pr_number": 2382, "commits_count": 0, "files_changed": 1, "response_length": 790, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] Add support for SMTP email server
### Feature Description
Add support for sending emails with a custom SMTP server. (Currently only AWS SES is supported)
### Possible Implementation
Could be implemented using `lettre` crate.
Steps to implement:
- Create the email building and sending logic
- Impl the EmailClient trait
- Add a new arm to the match statement in `create_email_client()` function
### 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(email): Add SMTP support to allow mails through self hosted/custom SMTP server
- Merged: 2024-11-20T14:48:30Z
- Files changed: 11 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 -->
Add SMTP support to allow mails through self-hosted/custom SMTP server
#5156
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(email): Add SMTP support to allow mails through self hosted/custom SMTP server (#6617)
Co-autho
Files to modify:
**crates/external_services/src/email.rs**
Remove:
- enum: pub::AvailableEmailClients
Add:
- enum: pub::EmailClientConfigs
- mod: pub::smtp
- mod: pub::no_email
**crates/external_services/src/email/no_email.rs**
Add:
- function: pub::create
- function: private::convert_to_rich_text
- function: private::send_email
- struct: pub::NoEmailClient
- impl: impl NoEmailClient
- impl: impl EmailClient for NoEmailClient
**crates/external_services/src/email/ses.rs**
Add:
- function: pub::validate
- impl: impl SESConfig
**crates/external_services/src/email/smtp.rs**
Add:
- function: pub::create_client
- function: pub::create
- function: private::to_mail_box
- function: pub::validate
- function: private::convert_to_rich_text
- function: private::send_email
- struct: pub::SmtpServer
- struct: pub::SmtpServerConfig
- enum: pub::SmtpConnection
- enum: pub::SmtpError
- impl: impl SmtpServer
- impl: impl SmtpServerConfig
- impl: impl EmailClient for SmtpServer
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
|
{"issue_number": 5156, "pr_number": 6617, "commits_count": 1, "files_changed": 11, "response_length": 2131, "file_count": 8, "needs_breakdown": false}
|
Adding Deep health check for Hyperswitch
Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy
- [x] Failure of health check should emit logs providing evidential data regarding the failure
The deep health will verify the following services
- [x] #3267
- [x] #3268
- [x] #3269
- [x] #3270
- [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
|
<think>
PR Context:
- Title: fix(payment-link): decode details before using them in secure links
- Merged: 2025-09-03T13:37:05Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR fixes the bug where the encoded payment link details were being read without decoding them first.
### 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": 3264, "pr_number": 9260, "commits_count": 0, "files_changed": 1, "response_length": 797, "file_count": 0, "needs_breakdown": false}
|
[BUG] WASM build fails on latest pull
### Bug Description
The workspace builds ok, but wasm-pack build
`wasm-pack build --target web --out-dir "${PWD}/wasm" --out-name euclid crates/euclid_wasm -- --features development,dummy_connector`
fails on compilation of mio-0.8.8
### Expected Behavior
build wasm folder correctly
### Actual Behavior
Compilation error on mio-0.8.8:
```
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
Compiling proc-macro2 v1.0.76
Compiling serde v1.0.195
Compiling once_cell v1.19.0
Compiling memchr v2.7.1
Compiling quote v1.0.35
Compiling syn v2.0.48
Compiling syn v1.0.109
Compiling serde_derive v1.0.195
Compiling itoa v1.0.10
Compiling wasm-bindgen-shared v0.2.89
Compiling futures-core v0.3.30
Compiling wasm-bindgen-backend v0.2.89
Compiling thiserror v1.0.56
Compiling wasm-bindgen-macro-support v0.2.89
Compiling wasm-bindgen v0.2.89
Compiling wasm-bindgen-macro v0.2.89
Compiling thiserror-impl v1.0.56
Compiling smallvec v1.11.2
Compiling futures-sink v0.3.30
Compiling js-sys v0.3.66
Compiling lock_api v0.4.11
Compiling parking_lot_core v0.9.9
Compiling tracing-core v0.1.32
Compiling serde_json v1.0.111
Compiling parking_lot v0.12.1
Compiling futures-channel v0.3.30
Compiling mio v0.8.10
error[E0432]: unresolved import `crate::sys::IoSourceState`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:12:5
|
12 | use crate::sys::IoSourceState;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`
error[E0432]: unresolved import `crate::sys::tcp`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:15:17
|
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
| ^^^ could not find `tcp` in `sys`
error[E0432]: unresolved import `crate::sys::tcp`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:13:17
|
13 | use crate::sys::tcp::{connect, new_for_addr};
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `Selector` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/poll.rs:312:18
|
312 | sys::Selector::new().map(|selector| Poll {
| ^^^^^^^^ could not find `Selector` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:24:14
|
24 | sys::event::token(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:38:14
|
38 | sys::event::is_readable(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:43:14
|
43 | sys::event::is_writable(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:68:14
|
68 | sys::event::is_error(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:99:14
|
99 | sys::event::is_read_closed(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:129:14
|
129 | sys::event::is_write_closed(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:151:14
|
151 | sys::event::is_priority(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:173:14
|
173 | sys::event::is_aio(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:183:14
|
183 | sys::event::is_lio(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:221:26
|
221 | sys::event::debug_details(f, self.0)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:103:18
|
103 | sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `udp` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/udp.rs:122:14
|
122 | sys::udp::bind(addr).map(UdpSocket::from_std)
| ^^^ could not find `udp` in `sys`
error[E0433]: failed to resolve: could not find `udp` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/udp.rs:544:14
|
544 | sys::udp::only_v6(&self.inner)
| ^^^ could not find `udp` in `sys`
error[E0412]: cannot find type `Selector` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/poll.rs:263:20
|
263 | selector: sys::Selector,
| ^^^^^^^^ not found in `sys`
error[E0412]: cannot find type `Selector` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/poll.rs:710:44
|
710 | pub(crate) fn selector(&self) -> &sys::Selector {
| ^^^^^^^^ not found in `sys`
error[E0412]: cannot find type `Waker` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/waker.rs:79:17
|
79 | inner: sys::Waker,
| ^^^^^ not found in `sys`
|
help: consider importing one of these items
|
1 + use core::task::Waker;
|
1 + use crate::Waker;
|
1 + use std::task::Waker;
|
help: if you import `Waker`, refer to it directly
|
79 - inner: sys::Waker,
79 + inner: Waker,
|
error[E0433]: failed to resolve: could not find `Waker` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/waker.rs:87:14
|
87 | sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
| ^^^^^ could not find `Waker` in `sys`
|
help: consider importing one of these items
|
1 + use core::task::Waker;
|
1 + use crate::Waker;
|
1 + use std::task::Waker;
|
help: if you import `Waker`, refer to it directly
|
87 - sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 + Waker::new(registry.selector(), token).map(|inner| Waker { inner })
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:18:17
|
18 | inner: sys::Event,
| ^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::event::Event;
|
help: if you import `Event`, refer to it directly
|
18 - inner: sys::Event,
18 + inner: Event,
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:187:55
|
187 | pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
| ^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::event::Event;
|
help: if you import `Event`, refer to it directly
|
187 - pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 + pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:191:41
|
191 | &*(sys_event as *const sys::Event as *const Event)
| ^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::event::Event;
|
help: if you import `Event`, refer to it directly
|
191 - &*(sys_event as *const sys::Event as *const Event)
191 + &*(sys_event as *const Event as *const Event)
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/event.rs:217:46
|
217 | struct EventDetails<'a>(&'a sys::Event);
| ^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::event::Event;
|
help: if you import `Event`, refer to it directly
|
217 - struct EventDetails<'a>(&'a sys::Event);
217 + struct EventDetails<'a>(&'a Event);
|
error[E0412]: cannot find type `Events` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/events.rs:43:17
|
43 | inner: sys::Events,
| ^^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::Events;
|
help: if you import `Events`, refer to it directly
|
43 - inner: sys::Events,
43 + inner: Events,
|
error[E0433]: failed to resolve: could not find `Events` in `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/events.rs:94:25
|
94 | inner: sys::Events::with_capacity(capacity),
| ^^^^^^ could not find `Events` in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::Events;
|
help: if you import `Events`, refer to it directly
|
94 - inner: sys::Events::with_capacity(capacity),
94 + inner: Events::with_capacity(capacity),
|
error[E0412]: cannot find type `Events` in module `sys`
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/events.rs:189:47
|
189 | pub(crate) fn sys(&mut self) -> &mut sys::Events {
| ^^^^^^ not found in `sys`
|
help: consider importing this struct through its public re-export
|
1 + use crate::Events;
|
help: if you import `Events`, refer to it directly
|
189 - pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 + pub(crate) fn sys(&mut self) -> &mut Events {
|
error[E0425]: cannot find value `listener` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:74:24
|
74 | set_reuseaddr(&listener.inner, true)?;
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `listener` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:76:15
|
76 | bind(&listener.inner, addr)?;
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `listener` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:77:17
|
77 | listen(&listener.inner, 1024)?;
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `listener` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:78:12
|
78 | Ok(listener)
| ^^^^^^^^ not found in this scope
error[E0425]: cannot find value `stream` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:90:18
|
90 | connect(&stream.inner, addr)?;
| ^^^^^^ not found in this scope
error[E0425]: cannot find value `stream` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:91:12
|
91 | Ok(stream)
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `set_reuseaddr` in this scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:74:9
|
74 | set_reuseaddr(&listener.inner, true)?;
| ^^^^^^^^^^^^^ not found in this scope
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:146:20
|
146 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<TcpListener>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:155:20
|
155 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<TcpListener>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/listener.rs:159:20
|
159 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<TcpListener>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:325:20
|
325 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<TcpStream>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:334:20
|
334 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<TcpStream>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/tcp/stream.rs:338:20
|
338 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<TcpStream>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/udp.rs:622:20
|
622 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/udp.rs:631:20
|
631 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/net/udp.rs:635:20
|
635 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
::: /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.10/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` (lib) due to 44 previous errors
warning: build failed, waiting for other jobs to finish...
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: cd "crates/euclid_wasm" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown" "--features" "development,dummy_connector"
```
### Steps To Reproduce
wasm-pack build --target web --out-dir "${PWD}/wasm" --out-name euclid crates/euclid_wasm -- --features development,dummy_connector
### Context For The Bug
_No response_
### Environment
Self-hosted sandbox
1. Operating system: Ubuntu 22.04
2. Rust version (output of `rustc --version`): `1.75`
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?
None
|
<think>
PR Context:
- Title: fix(wasm): fix failing `wasm-pack build` for `euclid_wasm`
- Merged: 2024-01-09T08:30:28Z
- Files changed: 2 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR fixes failing `wasm-pack build` for the `euclid_wasm` crate.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environmen
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(wasm): fix failing `wasm-pack build` for `euclid_wasm` (#3284)
Files to modify:
**crates/cards/src/validate.rs**
Modify existing code
|
{"issue_number": 3260, "pr_number": 3284, "commits_count": 1, "files_changed": 2, "response_length": 932, "file_count": 3, "needs_breakdown": false}
|
feat(core): add api for hypersense integration
# Hypersense
### Description:
#### An AI Ops tool build for Payments Cost Observability
- Monitor your overall transaction payment-related costs across multiple regions, PSPs, and businesses.
- Obtain actionable insights to optimise costs, track cost deviations, and effectively audit PSP invoices.
Learn more: [Hypersense site](https://www.hypersense.io/)
## Purpose of Change
To integrate hypersense with hyperswitch dashboard.
## Proposed Changes
- add endpoints for, get `token`, `verify_token` and `signout` for `hypersense` integration.
- limit the scope of the use of token by introducing a new type of token, `ExternalToken`
containing enum `ExternalServiceType`
## Additional Changes
#### `external_service_auth` module and `ExternalToken`
- `external_service_auth` is a generic service used to issue, verify and invalidate `ExternalToken`,
which can be associated with an external service using the enum field `external_service_type: ExternalServiceType` in the `ExternalToken`.
- Essentially a new service can be integrated by simply creating routes and handlers, and calling the same core functions
specified in `external_service_auth` modules.
|
<think>
PR Context:
- Title: feat(core): add hypersense integration api
- Merged: 2025-02-19T08:52:58Z
- Files changed: 14 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 -->
#### Endpoints
- GET `hypersense/token` (returns hypersense token).
- POST `hypersense/verify_token` (verifies the token passed as payload).
- POST `hypersense/signout` (invalidates the token).
### Additional Changes
- [x] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add hypersense integration api (#7218)
Co-authored-by: hyperswitch-bot[bot] <148525504+
Files to modify:
**crates/api_models/src/events.rs**
Add:
- mod: pub::external_service_auth
**crates/api_models/src/events/external_service_auth.rs**
Add:
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- impl: impl ApiEventMetric for ExternalTokenResponse
- impl: impl ApiEventMetric for ExternalVerifyTokenRequest
- impl: impl ApiEventMetric for ExternalVerifyTokenResponse
- impl: impl ApiEventMetric for ExternalSignoutTokenRequest
**crates/api_models/src/external_service_auth.rs**
Add:
- function: pub::get_user_id
- struct: pub::ExternalTokenResponse
- struct: pub::ExternalVerifyTokenRequest
- struct: pub::ExternalSignoutTokenRequest
- enum: pub::ExternalVerifyTokenResponse
- impl: impl ExternalVerifyTokenResponse
**crates/api_models/src/lib.rs**
Add:
- mod: pub::external_service_auth
**crates/common_utils/src/events.rs**
Modify existing code
**crates/router/src/core.rs**
Add:
- mod: pub::external_service_auth
**crates/router/src/core/external_service_auth.rs**
Add:
- function: pub::generate_external_token
- function: pub::signout_external_token
- function: pub::verify_external_token
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Add:
- mod: pub::hypersense
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- struct: pub::Hypersense
- impl: impl Hypersense
**crates/router/src/routes/hypersense.rs**
Add:
- function: pub::get_hypersense_token
- function: pub::signout_hypersense_token
- function: pub::verify_hypersense_token
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Add:
- function: pub::new_token
- function: pub::check_service_type
- struct: pub::ExternalToken
- enum: pub::ExternalServiceType
- impl: impl ExternalToken
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 7217, "pr_number": 7218, "commits_count": 1, "files_changed": 14, "response_length": 2990, "file_count": 16, "needs_breakdown": true}
|
[BUG] FATAL: role "root" does not exist
### Bug Description
Whenever hyperswitch-pg-1 sever running in docker-compose, it though an error " role "root" does not exist"
### Expected Behavior
Error should not come.
### Actual Behavior

### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Open Docker Desktop
2. Run hyperswitch-pg-1 server
3. After some time, you will see the error
### Context For The Bug
While setting hyperswitch on my local machine, I came across this error.
### 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: Ubuntu 24.04
2. Rust version (output of `rustc --version`): ``: rustc 1.82.0 (f6e511eec 2024-10-15)
3. App version (output of `cargo r --features vergen -- --version`): `` NA
### 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(docker-compose): address "role root does not exist" errors arising from postgres health check
- Merged: 2024-11-19T19:04:27Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- 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:
(No detailed commit information available)
|
{"issue_number": 6577, "pr_number": 6582, "commits_count": 0, "files_changed": 2, "response_length": 827, "file_count": 0, "needs_breakdown": false}
|
fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
## 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 -->
ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/7832
previously, when making a 3ds card transaction via noon connector, we would get `next_action` as `null` which is not intended. and that is because, paypal response would override the transaction data. this pr fixes this by unifying both of them.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
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).
-->
3ds transactions are expected to have an object in next action while at present, we are getting it as null for card payments and this is not intended.
closes #7831
## 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)?
-->
3ds card payment:
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \
--data-raw '{
"amount": 390,
"currency": "AED",
"confirm": true,
"capture_method": "automatic",
"customer_id": "sammantest2722",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4000000000002701",
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"card_cvc": "100"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AE",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (iPhone 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": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 390,
"account_name": "transaction_processing"
}
]
}'
```
```json
{
"payment_id": "pay_kgxQFsLwpvRE5DN7pOjF",
"merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def",
"status": "requires_customer_action",
"amount": 390,
"net_amount": 390,
"shipping_cost": null,
"amount_capturable": 390,
"amount_received": null,
"connector": "noon",
"client_secret": "pay_kgxQFsLwpvRE5DN7pOjF_secret_JwwEA4oIyoD2w8lyNkuw",
"created": "2025-04-16T12:07:18.695Z",
"currency": "AED",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "2701",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "INTL HDQTRS-CENTER OWNED",
"card_issuing_country": "UNITEDSTATES",
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AE",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_kgxQFsLwpvRE5DN7pOjF/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_kgxQFsLwpvRE5DN7pOjF_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "sammantest2722",
"created_at": 1744805238,
"expires": 1744808838,
"secret": "epk_77e21be22ea44e7cbc97ea1893092c71"
},
"manual_retry_allowed": null,
"connector_transaction_id": "783189382167",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_kgxQFsLwpvRE5DN7pOjF_1",
"payment_link": null,
"profile_id": "pro_x1xo34goINdpBDkYDEhK",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-16T12:22:18.695Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-16T12:07:21.111Z",
"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
}
```
paypal payment:
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"customer_id": "sammantest2722",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "wallet",
"payment_method_type": "paypal",
"payment_method_data": {
"wallet": {
"paypal_redirect": {}
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (iPhone 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": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 390,
"account_name": "transaction_processing"
}
]
}'
```
```json
{
"payment_id": "pay_ZMSscM4kmOOYEGrwuRoC",
"merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def",
"status": "requires_customer_action",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 1000,
"amount_received": null,
"connector": "noon",
"client_secret": "pay_ZMSscM4kmOOYEGrwuRoC_secret_I9V3GqB1X1emQncgY8Bt",
"created": "2025-04-16T12:02:55.230Z",
"currency": "USD",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "wallet",
"payment_method_data": {
"wallet": {},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_ZMSscM4kmOOYEGrwuRoC/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_ZMSscM4kmOOYEGrwuRoC_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "paypal",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "sammantest2722",
"created_at": 1744804975,
"expires": 1744808575,
"secret": "epk_2483fa5baf0a4b91b294a5a8df1da3d6"
},
"manual_retry_allowed": null,
"connector_transaction_id": "493715212829",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_ZMSscM4kmOOYEGrwuRoC_1",
"payment_link": null,
"profile_id": "pro_x1xo34goINdpBDkYDEhK",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-16T12:17:55.230Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-16T12:02:57.669Z",
"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
}
```
in 3ds card payment, we now get the next action url and it works as intended.
## 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
|
<think>
PR Context:
- Title: revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
- Merged: 2025-04-21T14:52:28Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
Reverts juspay/hyperswitch#7856
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#786
Files to modify:
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Add:
- function: private::try_from
- struct: pub::NoonPaypalResponse
- struct: pub::NoonPaypalResponseResult
- enum: pub::NoonAuthPaymentResponse
- impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
|
{"issue_number": 7856, "pr_number": 7860, "commits_count": 1, "files_changed": 2, "response_length": 928, "file_count": 4, "needs_breakdown": false}
|
feat(payments_v2): payment intent diesel and domain models changes v2
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Refactoring
## Description
<!-- Describe your changes in detail -->
This PR refactors the codebase to include all the payment related operations under the v1 feature flag.
This also includes changes to the payment intent diesel and domain models to add new fields that are relevant to the v2 version of application.
### 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 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
|
<think>
PR Context:
- Title: refactor(payment_intent_v2): payment intent fields refactoring
- Merged: 2024-09-20T11:46:27Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Refactoring
## Description
<!-- Describe your changes in detail -->
This PR addresses some comments that were left on #5783. Few fields have been mademandatory and renamed
- renamed `statement_descriptor_name` to `statement_descriptor`
- make `currecy`, `client_secret` and `profile_id` as a mandatory field in payment intent
- group amount related fields to a struct to be used in payment intent domain model
```rust
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(payment_intent_v2): payment intent fields refactoring (#5880)
Co-authored-by: hrithikesh026
Files to modify:
**crates/api_models/src/payments.rs**
Remove:
- function: pub::get_client_secret
- function: private::deserialize
- function: private::expecting
- function: private::visit_str
- function: private::serialize
- function: private::test_serialize_client_secret
- function: private::test_deserialize_client_secret
- struct: pub::ClientSecret
- struct: private::ClientSecretVisitor
- impl: impl ClientSecret
- impl: impl Deserialize<'de> for ClientSecret
- impl: impl Visitor<'de> for ClientSecretVisitor
- impl: impl Serialize for ClientSecret
- mod: private::client_secret_tests
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::External3dsAuthenticationRequest
- enum: pub::EnablePaymentLinkRequest
- enum: pub::MitExemptionRequest
- enum: pub::PresenceOfCustomerDuringPayment
**crates/common_enums/src/transformers.rs**
Add:
- function: private::from
- function: pub::as_bool
- function: pub::as_bool
- function: private::from
- function: private::from
- function: pub::as_bool
- function: private::from
- function: pub::as_bool
- impl: impl From<Option<bool>> for super::External3dsAuthenticationRequest
- impl: impl super::External3dsAuthenticationRequest
- impl: impl super::EnablePaymentLinkRequest
- impl: impl From<Option<bool>> for super::EnablePaymentLinkRequest
- impl: impl From<Option<bool>> for super::MitExemptionRequest
- impl: impl super::MitExemptionRequest
- impl: impl From<Option<bool>> for super::PresenceOfCustomerDuringPayment
- impl: impl super::PresenceOfCustomerDuringPayment
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/common_utils/src/id_type.rs**
Remove:
- mod: private::payment_methods
**crates/common_utils/src/id_type/global_id.rs**
Remove:
- struct: pub::CellId
Add:
- function: pub::get_string_repr
- struct: pub::CellId
- mod: pub::payment
- mod: pub::payment_methods
**crates/common_utils/src/id_type/global_id/payment.rs**
Add:
- function: pub::get_string_repr
- function: private::try_from
- function: private::to_sql
- function: private::from_sql
- struct: pub::GlobalPaymentId
- impl: impl GlobalPaymentId
- impl: impl TryFrom<std::borrow::Cow<'static, str>> for GlobalPaymentId
- impl: impl diesel::serialize::ToSql<diesel::sql_types::Text, DB> for GlobalPaymentId
- impl: impl diesel::deserialize::FromSql<diesel::sql_types::Text, DB> for GlobalPaymentId
**crates/common_utils/src/id_type/payment.rs**
Remove:
- struct: pub::PaymentGlobalId
**crates/common_utils/src/types.rs**
Remove:
- struct: pub::Description
Add:
- function: private::to_sql
- function: private::from_sql
- function: pub::get_string_repr
- function: private::deserialize
- function: private::expecting
- function: private::visit_str
- function: private::serialize
- function: private::to_sql
- function: private::from_sql
- function: private::build
- function: private::test_serialize_client_secret
- function: private::test_deserialize_client_secret
- function: pub::from
- function: pub::new_unchecked
- function: private::deserialize
- function: private::from_sql
- function: private::to_sql
- function: private::build
- function: private::from_sql
- struct: pub::Url
- struct: pub::ClientSecret
- struct: private::ClientSecretVisitor
- struct: pub::LengthString
- struct: pub::Description
- struct: pub::StatementDescriptor
- enum: pub::LengthStringError
- impl: impl ToSql<sql_types::Text, DB> for Url
- impl: impl FromSql<sql_types::Text, DB> for Url
- impl: impl ClientSecret
- impl: impl Deserialize<'de> for ClientSecret
- impl: impl Visitor<'de> for ClientSecretVisitor
- impl: impl Serialize for ClientSecret
- impl: impl ToSql<sql_types::Text, diesel::pg::Pg> for ClientSecret
- impl: impl FromSql<sql_types::Text, DB> for ClientSecret
- impl: impl Queryable<sql_types::Text, DB> for ClientSecret
- impl: impl LengthString<MAX_LENGTH, MIN_LENGTH>
- impl: impl Deserialize<'de> for LengthString<MAX_LENGTH, MIN_LENGTH>
- impl: impl FromSql<sql_types::Text, DB> for LengthString<MAX_DESCRIPTION_LENGTH, 1>
- impl: impl Queryable<sql_types::Text, DB> for StatementDescriptor
- impl: impl FromSql<sql_types::Text, DB> for StatementDescriptor
- mod: private::client_secret_type
- mod: private::client_secret_tests
**crates/diesel_models/src/payment_intent.rs**
Add:
- struct: pub::PaymentLinkConfigRequestForPayments
- struct: pub::PaymentLinkTransactionDetails
- struct: pub::TransactionDetailsUiConfiguration
**crates/diesel_models/src/query/payment_intent.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Add:
- function: private::from
- function: private::from
- function: private::get_surcharge_action_as_bool
- function: private::get_external_tax_action_as_bool
- struct: pub::AmountDetails
- enum: pub::TaxCalculationOverride
- enum: pub::SurchargeCalculationOverride
- impl: impl From<Option<bool>> for TaxCalculationOverride
- impl: impl From<Option<bool>> for SurchargeCalculationOverride
- impl: impl AmountDetails
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Remove:
- struct: pub::PaymentIntentNew
- struct: pub::PaymentIntentNew
**crates/router/src/core/customers.rs**
Modify existing code
**crates/router/src/core/fraud_check.rs**
Add:
- function: pub::call_frm_service
- function: pub::make_frm_data_and_fraud_check_operation
**crates/router/src/core/fraud_check/flows/fulfillment_flow.rs**
Add:
- function: pub::construct_fulfillment_router_data
**crates/router/src/core/fraud_check/operation/fraud_check_post.rs**
Add:
- function: private::get_trackers
**crates/router/src/core/fraud_check/operation/fraud_check_pre.rs**
Add:
- function: private::get_trackers
**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.rs**
Add:
- function: private::populate_surcharge_details
- function: pub::tokenize_in_router_when_confirm_false_or_external_authentication
- function: private::get_payment_intent_profile_id
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::store_payment_method_data_in_vault
- function: pub::authenticate_client_secret
- function: pub::verify_payment_intent_time_and_client_secret
**crates/router/src/core/payments/operations/payment_response.rs**
Add:
- struct: pub::PaymentResponse
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Add:
- function: private::try_from
- function: private::try_from
- function: private::try_from
- impl: impl TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCaptureData
- impl: impl TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsCancelData
- impl: impl TryFrom<PaymentAdditionalData<'_, F>> for types::SdkPaymentsSessionUpdateData
**crates/router/src/core/pm_auth.rs**
Add:
- function: pub::retrieve_payment_method_from_auth_service
**crates/router/src/core/utils.rs**
Add:
- function: pub::construct_refund_router_data
- function: pub::construct_payments_dynamic_tax_calculation_router_data
- function: private::get_profile_id
**crates/router/src/core/verification/utils.rs**
Add:
- function: pub::check_if_profile_id_is_present_in_payment_intent
**crates/router/src/db/kafka_store.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
**crates/router/src/types/storage.rs**
Modify existing code
**crates/router/src/utils.rs**
Modify existing code
**crates/storage_impl/src/lib.rs**
Add:
- function: private::unique_constraints
**crates/storage_impl/src/mock_db/payment_intent.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_intent.rs**
Add:
- function: private::insert_payment_intent
- function: private::update_payment_intent
|
{"issue_number": 5783, "pr_number": 5880, "commits_count": 1, "files_changed": 30, "response_length": 9554, "file_count": 41, "needs_breakdown": true}
|
feat: Add new auth type to allow both SPTs and Login Tokens for 2FA APIs
The following APIs are needed in both with Sign In and in the dashboard.
- `/2fa/totp/verify`
- `/2fa/recovery_code/verify`
- `/2fa/recovery_code/generate`
Currently these APIs use SPT as auth, which makes them unable to access using Login Tokens.
We need a new Auth type which allows us to do this.
|
<think>
PR Context:
- Title: feat(auth): Create and use `SinglePurposeOrLoginTokenAuth`
- Merged: 2024-06-04T11:27:55Z
- Files changed: 6 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 -->
This PR adds new auth type `SinglePurposeOrLoginTokenAuth`, which will allow both SPTs and Login Tokens to be used as auth token for APIs.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the databas
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(auth): Create and use `SinglePurposeOrLoginTokenAuth` (#4830)
Co-authored-by: hyperswitch-bot[b
Files to modify:
**crates/router/src/consts/user.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Remove:
- function: private::get_user_id
- function: private::authenticate_and_fetch
- impl: impl GetUserIdFromAuth for UserFromSinglePurposeToken
- impl: impl AuthenticateAndFetch<Box<dyn GetUserIdFromAuth>, A> for DashboardNoPermissionAuth
**crates/router/src/services/authentication/blacklist.rs**
Add:
- function: private::check_in_blacklist
- impl: impl BlackList for SinglePurposeOrLoginToken
|
{"issue_number": 4829, "pr_number": 4830, "commits_count": 1, "files_changed": 6, "response_length": 1629, "file_count": 8, "needs_breakdown": false}
|
[REFACTOR] Move Hardcoded Email Subjects to Constants Across the User Related Files
### Feature Description
In the current implementation, email subjects are hardcoded at multiple places across the codebase when constructing email content. To improve maintainability and avoid magic strings, each unique subject should be moved to its own constant. The goal of this issue is to identify all the places where email subjects are hardcoded, create a corresponding constant for each one, and replace the hardcoded values with the newly defined constants.
### Possible Implementation
- Search the codebase for all instances where email subjects are hardcoded.
Example: https://github.com/juspay/hyperswitch/blob/b2364414edab6d44e276f2133bc988610693f155/crates/router/src/core/user.rs#L707
- For each unique subject, create a new constant in `crates/router/src/consts/user.rs`.
- Refactor the code by replacing the hardcoded subjects with their respective constants.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### 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(users): Move hardcoded email subjects to constants
- Merged: 2024-10-16T07:12:30Z
- Files changed: 6 files
- Commits: 6 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Change the hardcoded email subject to constants
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## Motivation and Context
refactor based on th
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(users): Move hardcoded email subjects to constants (#6110)
Files to modify:
**crates/router/src/consts.rs**
Modify existing code
**crates/router/src/consts/user.rs**
Modify existing code
**crates/router/src/core/recon.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
**crates/router/src/workflows/api_key_expiry.rs**
Modify existing code
|
{"issue_number": 5940, "pr_number": 6110, "commits_count": 1, "files_changed": 6, "response_length": 1257, "file_count": 8, "needs_breakdown": false}
|
Use SignatureKey as auth_type for VGS connector
We need to collect a 3rd key (vault_id) apart from `username` and `password` in case of VGS for SDK use case
|
<think>
PR Context:
- Title: fix(connector): Use SignatureKey for VGS auth_type
- Merged: 2025-08-28T02:44:22Z
- Files changed: 1 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Change VGS auth type from BodyKey to SignatureKey
### 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:** fix(connector): Use SignatureKey for VGS auth_type (#9068)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/vgs/transformers.rs**
Modify existing code
|
{"issue_number": 9067, "pr_number": 9068, "commits_count": 1, "files_changed": 1, "response_length": 952, "file_count": 3, "needs_breakdown": false}
|
refactor(adyen): Use enums instead of strings for statuses
As of now, we use string literals for matching on status codes returned by Adyen. They need to be replaced by enums instead.
3 instances I could find are:
https://github.com/juspay/orca/blob/7348d76cad8f52548f84c6a606fb177e7ca3620e/crates/router/src/connector/adyen/transformers.rs#L431-L435
https://github.com/juspay/orca/blob/7348d76cad8f52548f84c6a606fb177e7ca3620e/crates/router/src/connector/adyen/transformers.rs#L470-L476
https://github.com/juspay/orca/blob/7348d76cad8f52548f84c6a606fb177e7ca3620e/crates/router/src/connector/adyen/transformers.rs#L684-L701
Maybe even this:
https://github.com/juspay/orca/blob/7348d76cad8f52548f84c6a606fb177e7ca3620e/crates/router/src/connector/adyen.rs#L601-L604
Any other similar usages of strings for status codes must be addressed.
If you're interested in picking it up, assign this issue to yourself, or if you don't have access, let me know and I'll assign it to you.
|
<think>
PR Context:
- Title: refactor(adyen): use enums instead of strings for statuses
- Merged: 2023-01-17T06:20:32Z
- Files changed: 1 files
- Commits: 9 commits
Implementation approach:
Fixes #262
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
## Description
Used enums instead of strings for statuses for Adyen.
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(adyen): use enums instead of strings for statuses (#320)
Files to modify:
**crates/router/src/connector/adyen/transformers.rs**
Add:
- function: private::from
- enum: pub::AdyenStatus
- impl: impl From<AdyenStatus> for storage_enums::AttemptStatus
|
{"issue_number": 262, "pr_number": 320, "commits_count": 1, "files_changed": 1, "response_length": 1063, "file_count": 3, "needs_breakdown": false}
|
[FEATURE]: [Airwallex] 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): [Airwallex] Currency Unit Conversion
- Merged: 2023-10-15T09:00:57Z
- Files changed: 2 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
- Addressing Issue: #2215
- Modified two files in `hyperswitch/crates/router/src/connector/`
- `airwallex.rs`
- Implement `get_currency_unit` function
- Modify `ConnectorIntegration` implementations for `Airwallex`
- `airwallex/transformers.rs`
- Implement `Airwa
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Airwallex] Currency Unit Conversion (#2571)
Files to modify:
**crates/router/src/connector/airwallex.rs**
Add:
- function: private::get_currency_unit
**crates/router/src/connector/airwallex/transformers.rs**
Add:
- function: private::try_from
- struct: pub::AirwallexRouterData
- impl: impl TryFrom<(
&types::api::CurrencyUnit,
types::storage::enums::Currency,
i64,
T,
)> for AirwallexRouterData<T>
|
{"issue_number": 2215, "pr_number": 2571, "commits_count": 1, "files_changed": 2, "response_length": 1262, "file_count": 4, "needs_breakdown": false}
|
feat: Add schema to store chat request response
- add schema for chat, to store request and response
- store chats to chat schema asynchronously
- encrypt the sensitive data
- have endpoint to list the chat data and decrypt it properly
|
<think>
PR Context:
- Title: feat: add hyperswitch ai chats table
- Merged: 2025-09-16T09:14:36Z
- Files changed: 30 files
- Commits: 27 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 -->
- Store the user query and response from the ai service for the analysis.
- Allow the api only for internal user
### Additional Changes
This pull request introduces support for encrypted chat conversations and adds database models and A
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add hyperswitch ai chats table (#8831)
Co-authored-by: Apoorv Dixit <[email protected]>
C
Files to modify:
**crates/api_models/src/chat.rs**
Add:
- struct: pub::ChatListRequest
- struct: pub::ChatConversation
- struct: pub::ChatListResponse
**crates/api_models/src/events/chat.rs**
Modify existing code
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/diesel_models/src/hyperswitch_ai_interaction.rs**
Add:
- struct: pub::HyperswitchAiInteraction
- struct: pub::HyperswitchAiInteractionNew
**crates/diesel_models/src/lib.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/diesel_models/src/query.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/diesel_models/src/query/hyperswitch_ai_interaction.rs**
Add:
- function: pub::insert
- function: pub::filter_by_optional_merchant_id
- impl: impl HyperswitchAiInteractionNew
- impl: impl HyperswitchAiInteraction
**crates/diesel_models/src/query/utils.rs**
Add:
- function: private::get_local_unique_key
- impl: impl CompositeKey for <schema::hyperswitch_ai_interaction::table as diesel::Table>::PrimaryKey
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/chat.rs**
Modify existing code
**crates/router/src/configs/secrets_transformers.rs**
Add:
- function: private::convert_to_raw_secret
- impl: impl SecretsHandler for settings::ChatSettings
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/core/chat.rs**
Modify existing code
**crates/router/src/core/errors/chat.rs**
Modify existing code
**crates/router/src/db.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/router/src/db/hyperswitch_ai_interaction.rs**
Add:
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- trait: pub::HyperswitchAiInteractionInterface
- impl: impl HyperswitchAiInteractionInterface for Store
- impl: impl HyperswitchAiInteractionInterface for MockDb
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- impl: impl HyperswitchAiInteractionInterface for KafkaStore
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/chat.rs**
Add:
- function: pub::get_all_conversations
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/types/storage.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/router/src/types/storage/hyperswitch_ai_interaction.rs**
Modify existing code
**crates/router/src/utils.rs**
Add:
- mod: pub::chat
**crates/router/src/utils/chat.rs**
Add:
- function: pub::construct_hyperswitch_ai_interaction
**crates/router_env/src/logger/types.rs**
Modify existing code
**crates/storage_impl/src/mock_db.rs**
Modify existing code
|
{"issue_number": 8847, "pr_number": 8831, "commits_count": 1, "files_changed": 30, "response_length": 3973, "file_count": 29, "needs_breakdown": true}
|
[FEATURE] add permissions for operations in recon module
### Feature Description
Reconciliation module in HyperSwitch provides various operations. Every operation needs to permitted for the end user to use it.
As of today, recon has a single permission - which gives access to the entire recon module, this is not granular. Recon module's permission suite needs to be extended to be able to assign granular access for different operations.
### Possible Implementation
Add permissions for below operations
- Upload files - RW
- Run recon - RW
- View and update recon configs - RW
- View and add file processing - RW
- View Reports - R
- View Analytics - R
These are to be included in JWT in the response of `/recon/verify_token`
### 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: add resources and granular permission groups for reconciliation
- Merged: 2024-12-04T09:55:05Z
- Files changed: 18 files
- Commits: 29 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
Described in #6524
This PR includes below changes
- Extending resources enum (for specifying the resource being consumed from the dashboard)
- Extending granular permission groups for recon
- Populating `acl` field in the recon token
### Additional Changes
- [ ] This PR m
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add resources and granular permission groups for reconciliation (#6591)
Co-authored-by: hypers
Files to modify:
**crates/api_models/src/enums.rs**
Add:
- function: private::from
- enum: pub::ReconPermissionScope
- impl: impl From<PermissionScope> for ReconPermissionScope
**crates/api_models/src/events/recon.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for VerifyTokenResponse
**crates/api_models/src/events/user.rs**
Remove:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for VerifyTokenResponse
**crates/api_models/src/recon.rs**
Add:
- struct: pub::VerifyTokenResponse
**crates/api_models/src/user.rs**
Remove:
- struct: pub::VerifyTokenResponse
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/recon.rs**
Add:
- function: pub::verify_recon_token
**crates/router/src/core/user.rs**
Remove:
- function: pub::verify_token
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/recon.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Remove:
- function: pub::verify_recon_token
**crates/router/src/services/authentication.rs**
Add:
- function: private::authenticate_and_fetch
- function: pub::new_token
- struct: pub::UserFromTokenWithRoleInfo
- struct: pub::ReconToken
- impl: impl AuthenticateAndFetch<UserFromTokenWithRoleInfo, A> for JWTAuth
- impl: impl ReconToken
**crates/router/src/services/authorization/info.rs**
Modify existing code
**crates/router/src/services/authorization/permission_groups.rs**
Modify existing code
**crates/router/src/services/authorization/permissions.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Add:
- function: pub::get_recon_acl
**crates/router/src/services/authorization/roles/predefined_roles.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
|
{"issue_number": 6524, "pr_number": 6591, "commits_count": 1, "files_changed": 18, "response_length": 2832, "file_count": 20, "needs_breakdown": true}
|
feat(connetcor): [PayMe] Add signature auth type
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
Adding signature key for payme as 3 keys are required for payme.
```
"connector_type": "payment_processor",
"connector_name": "payme",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_key": "",
"key1": "",
"api_secret": ""
}
```
### Additional Changes
- [x] This PR modifies the API contract
<!--
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).
-->
Support for three different keys
## 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. Added the connector_account_details while creating MCA.
```
"connector_type": "payment_processor",
"connector_name": "payme",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_key": "MPL16800-28904KEV-NQUBH8K3-S8V3U4KX",
"key1": "MPL16800-28904KEV-NQUBH8K3-S8V3U4KX",
"api_secret": "merchant.MPL123-123123-123123-123123"
},
```
2. make payment for apple pay:
We get this repsonse in next_action
```
"next_action": {
"type": "third_party_sdk_session_token",
"session_token": {
"wallet_name": "apple_pay",
"session_token_data": null,
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "Apple Pay",
"type": null,
"amount": "45.00"
},
"merchant_capabilities": null,
"supported_networks": null,
"merchant_identifier": null
},
"connector": "payme",
"delayed_session_token": true,
"sdk_next_action": {
"next_action": "sync"
},
"connector_reference_id": "sale_id from payme generate_sale call",
"connector_sdk_public_key": "key1 from mca",
"connector_merchant_id": "api_secret from mca"
}
}
```
## 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: build(deps): bump openssl from 0.10.54 to 0.10.55
- Merged: 2023-06-22T07:24:27Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.54 to 0.10.55.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sfackler/rust-openssl/releases">openssl's releases</a>.</em></p>
<blockquote>
<h2>openssl-v0.10.55</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix warnings from BoringSSL on Rust 1.70 by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/1948">sfackler/rust-
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 1952, "pr_number": 1503, "commits_count": 0, "files_changed": 1, "response_length": 779, "file_count": 0, "needs_breakdown": false}
|
feat(connector): [Globepay] Add Refund and Refund Sync flow
## 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 contains
1) Add Refund and Rsync for globepay
2) Api contract changes for alipay and wechatpay qrcode flow
**Wechatpay Display Qrcode flow**
````
"payment_method": "wallet",
"payment_method_type": "we_chat_pay",
"payment_experience" : "display_qr_code",
"payment_method_data": {
"wallet": {
"we_chat_pay_qr": {}
}
}
````
**Alipay Display QrCodeflow**
```
"payment_method": "wallet",
"payment_method_type": "ali_pay",
"payment_experience" : "display_qr_code",
"payment_method_data": {
"wallet": {
"ali_pay_qr": {}
}
}
```
### 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).
-->
Add Refund and Rsync for globepay
## 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)?
-->
This can't be tested as we can't make payment succesful in globepay scenario . However ,I've tested failed case manually through postman
<img width="1291" alt="Screenshot 2023-07-13 at 7 24 29 PM" src="https://github.com/juspay/hyperswitch/assets/121822803/4105187c-9885-45ee-855e-7ac3035478d6">
## 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): [Stripe] change payment_method name Wechatpay to wechatpayqr
- Merged: 2023-08-01T06:14:00Z
- Files changed: 4 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 -->
There was api contract change in #1706 for wechatpay qrcode flow . This pr have corresponding changes for Stripe
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR mo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [Stripe] change payment_method name Wechatpay to wechatpayqr (#1813)
Signed-off-by:
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/connector/dummyconnector/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
|
{"issue_number": 1706, "pr_number": 1813, "commits_count": 1, "files_changed": 4, "response_length": 1155, "file_count": 5, "needs_breakdown": false}
|
ci: use `sccache-action` for caching compilation artifacts
## 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 makes use of the sccache-action for caching compilation artifacts instead of the rust-cache action.
## 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).
-->
Improving our CI workflow times.
## 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)?
-->
I've opened this PR as a means to test the caching mechanism.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed 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: ci: use `sccache-action` for caching compilation artifacts
- Merged: 2023-08-07T07:16:21Z
- Files changed: 6 files
- Commits: 1 commits
Implementation approach:
This PR reverts juspay/hyperswitch#1857 since `sccache` is causing some problems. We might reconsider using it again on a later date.
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 1857, "pr_number": 1880, "commits_count": 0, "files_changed": 6, "response_length": 429, "file_count": 0, "needs_breakdown": false}
|
[ENHANCEMENT] Add `id` field in `MerchantConnectorAccountNotFound` error type
### Feature Description
A `MerchantConnectorAccountNotFound` will occur when using `merchant_id` and `merchant_connector_id` to select a row from the `merchant_connector_account` table if there is no row in the table that matches those details. 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 it is.
### Possible Implementation
Add a field `id` in the error message of `MerchantConnectorAccountNotFound`.
In cases where there is a context of `connector_label` send it.
In other cases send the `merchant_connector_id`.
### Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes I am willing to submit a PR!
|
<think>
PR Context:
- Title: refactor(router): add `id` field in `MerchantConnectorAccountNotFound`
- Merged: 2023-05-10T13:27:39Z
- Files changed: 4 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Add `id` field to `MerchantConnectorAccountNotFound`,
Send `connector_label` when possible,
Send `merchant_connector_id` otherwise,
Change `create_payment_connector` function to raise `InternalServerError` instead of `MerchantConnectorAccou
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(router): add `id` field in `MerchantConnectorAccountNotFound` (#1098)
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
**crates/router/src/core/payments/helpers.rs**
Modify existing code
|
{"issue_number": 1053, "pr_number": 1098, "commits_count": 1, "files_changed": 4, "response_length": 1187, "file_count": 6, "needs_breakdown": false}
|
[FEATURE] Create a dummy connector for internal and external testing of payments and refunds flows
### Feature Description
A dummy test connector needs to be created with the ability to process all the payment methods available on Hyperswitch. This dummy connector will be useful for internal and external testing and it will be used extensively by those trying to test or integrate Hyperswitch without setting up any active accounts with any of the processors.
The dummy test connector will be able to simulate most basic scenarios (success/failure/pending) for all the available payment methods by having separate test payment method data for each of these flows. Payment failure can include further breakdown in scenarios according to the payment methods.
For example, there should be separate test card numbers for simulating success, failure, pending statuses of 3DS and Non 3DS flows. Under failure, different test card numbers should enable simulating errors like invalid card info, insufficient funds, declined by gateway, declined by issuing bank, declines due to bad fraud score, etc.
### Possible Implementation
We would need to create a dummy connector to test all the payment flows, refund flows, webhooks, etc.
The two major tasks are:
1. Server implementation for dummy connector for the following endpoints
a. payments #980
b. refunds #1071
c. webhooks
2. Integrating Hyperswitch with the dummy connector for the following endpoints
a. payments #1084
b. refunds #1084
c. webhooks
3. Enable Dummy Connector and make it default
**Cards:**
Non- 3DS payments flow https://github.com/juspay/hyperswitch/issues/727
### Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else
|
<think>
PR Context:
- Title: feat(connector): add payment routes for dummy connector
- Merged: 2023-05-08T10:01:41Z
- Files changed: 11 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
Add payment routes for dummy connector.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding chan
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): add payment routes for dummy connector (#980)
Files to modify:
**crates/redis_interface/src/commands.rs**
Add:
- function: pub::serialize_and_set_key_with_expiry
**crates/router/src/configs/settings.rs**
Add:
- struct: pub::DummyConnector
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Add:
- mod: pub::dummy_connector
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- struct: pub::DummyConnector
- impl: impl DummyConnector
**crates/router/src/routes/dummy_connector.rs**
Add:
- function: pub::dummy_connector_payment
- mod: private::errors
- mod: private::types
- mod: private::utils
**crates/router/src/routes/dummy_connector/errors.rs**
Add:
- function: private::fmt
- function: private::switch
- enum: pub::ErrorType
- enum: pub::DummyConnectorErrors
- impl: impl core::fmt::Display for DummyConnectorErrors
- impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for DummyConnectorErrors
**crates/router/src/routes/dummy_connector/types.rs**
Add:
- function: pub::new
- function: private::fmt
- function: pub::new
- struct: pub::DummyConnectorPaymentRequest
- struct: pub::DummyConnectorCard
- struct: pub::DummyConnectorPaymentData
- struct: pub::DummyConnectorPaymentResponse
- enum: pub::Flow
- enum: pub::DummyConnectorPaymentMethodData
- enum: pub::DummyConnectorTransactionStatus
- impl: impl FlowMetric for Flow
- impl: impl DummyConnectorPaymentData
- impl: impl std::fmt::Display for DummyConnectorTransactionStatus
- impl: impl DummyConnectorPaymentResponse
**crates/router/src/routes/dummy_connector/utils.rs**
Add:
- function: pub::tokio_mock_sleep
- function: pub::payment
- function: private::store_payment_data
|
{"issue_number": 726, "pr_number": 980, "commits_count": 1, "files_changed": 11, "response_length": 2686, "file_count": 11, "needs_breakdown": false}
|
[FEATURE]: [Noon] 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): [Noon] Use connector_request_reference_id as Order reference
- Merged: 2023-10-06T07:07:29Z
- 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 -->
Closes #2308
Use `connector_request_reference_id` instead of `payment_id` as Order reference
### 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:** feat(connector): [Noon] Use connector_request_reference_id as Order reference (#2466)
Files to modify:
**crates/router/src/connector/noon/transformers.rs**
Modify existing code
|
{"issue_number": 2308, "pr_number": 2466, "commits_count": 1, "files_changed": 1, "response_length": 990, "file_count": 3, "needs_breakdown": false}
|
feat(analytics): adding dispute as uri param to analytics info api
|
<think>
PR Context:
- Title: feat(pm_list): add required fields for eps
- Merged: 2024-01-08T11:42:01Z
- Files changed: 10 files
- Commits: 21 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
resolves [#3694](https://github.com/juspay/hyperswitch-cloud/issues/3694)
### Test Cases
1. Create an eps payment with mollie without eps.billing_details. The payment should succeed.
```
{
"amount": 1000,
"currency": "EUR",
"confirm": true,
"capture_method": "a
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(pm_list): add required fields for eps (#3169)
Co-authored-by: hyperswitch-bot[bot] <148525504+h
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/adyen/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
|
{"issue_number": 3694, "pr_number": 3169, "commits_count": 1, "files_changed": 10, "response_length": 1335, "file_count": 8, "needs_breakdown": false}
|
feat(mca): Added recipient connector call for open banking connectors
## 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 connector call in payment connector create to facilitate merchant recipient creation at connector end.
- Added alternative locker call for creation of recipient at Hyperswitch's end in case the connector does not support it.
- Added validation for merchant bank account data
### Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [x] 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)?
-->
1. Create an MCA account with `connector_type` as `payment_processor` and an open banking connector
```
curl --location --request POST 'http://localhost:8080/account/merchant_1720607250/connectors' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--data-raw '{
"connector_type": "payment_processor",
"connector_name": "plaid",
"connector_label": "plaid3",
"connector_account_details": {
"auth_type": "BodyKey",
"api_key": "Some_key",
"key1": "Some_key"
},
"test_mode": false,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "eps",
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
}
},
{
"payment_method_type": "giropay",
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
}
},
{
"payment_method_type": "ideal",
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
}
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"recurring_enabled": true,
"installment_payment_enabled": true,
"minimum_amount": 0,
"maximum_amount": 10000
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"GBP",
"CAD",
"AUD",
"EUR"
]
}
}
]
}
],
"additional_merchant_data": {
"open_banking_recipient_data": {
"account_data": {
"bacs": {
"sort_code": "200000",
"account_number": "55779911",
"name": "merchant_name"
}
}
}
},
"metadata": {
"city": "NY",
"unit": "246"
}
}'
```
Successful Response should look like this -
```
{
"connector_type": "payment_processor",
"connector_name": "plaid",
"connector_label": "plaid3",
"merchant_connector_id": "mca_c0iTEayEJMViYwEhTCOG",
"profile_id": "pro_UgP3FfqWGhfPLuUqYtJF",
"connector_account_details": {
"auth_type": "BodyKey",
"api_key": "Some_key",
"key1": "Some_key"
},
"payment_methods_enabled": [
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "eps",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "giropay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "ideal",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 10000,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"GBP",
"CAD",
"AUD",
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"connector_webhook_details": null,
"metadata": {
"city": "NY",
"unit": "246"
},
"test_mode": false,
"disabled": false,
"frm_configs": null,
"business_country": null,
"business_label": null,
"business_sub_label": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": {
"open_banking_recipient_data": {
"account_data": {
"bacs": {
"account_number": "55779911",
"sort_code": "200000",
"name": "merchant_name",
"connector_recipient_id": "recipient-id-sandbox-45beb880-9e3d-4ae3-927b-052f5610fd74"
}
}
}
}
}
```
Response when the connector does not support recipient creation (locker call to be made in this)
```
{
"connector_type": "payment_processor",
"connector_name": "plaid",
"connector_label": "plaid3",
"merchant_connector_id": "mca_6bIUIrWNSbqssRO89Zxx",
"profile_id": "pro_UgP3FfqWGhfPLuUqYtJF",
"connector_account_details": {
"auth_type": "BodyKey",
"api_key": "Some_key",
"key1": "Some_key"
},
"payment_methods_enabled": [
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "eps",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "giropay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "ideal",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": null,
"maximum_amount": null,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 10000,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"GBP",
"CAD",
"AUD",
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"connector_webhook_details": null,
"metadata": {
"city": "NY",
"unit": "246"
},
"test_mode": false,
"disabled": false,
"frm_configs": null,
"business_country": null,
"business_label": null,
"business_sub_label": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": {
"open_banking_recipient_data": {
"account_data": {
"bacs": {
"account_number": "55779911",
"sort_code": "200000",
"name": "merchant_name"
}
}
}
}
}
```
## 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`
- [ ] 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(core): Payments core modification for open banking connectors
- Merged: 2024-07-17T09:53:18Z
- 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
<!-- Describe your changes in detail -->
- Added Post-Processing flows for Open banking connectors
- Traits and and type changes
- #3758 needs to go in first
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] Th
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Payments core modification for open banking connectors (#3947)
Co-authored-by: hyperswit
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- function: private::get_payment_method_type
- enum: pub::OpenBankingData
- impl: impl GetPaymentMethodType for OpenBankingData
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/common_enums/src/transformers.rs**
Modify existing code
**crates/connector_configs/src/response_modifier.rs**
Modify existing code
**crates/connector_configs/src/transformer.rs**
Modify existing code
**crates/euclid/src/dssa/graph.rs**
Modify existing code
**crates/euclid/src/frontend/ast/lowering.rs**
Modify existing code
**crates/euclid/src/frontend/dir.rs**
Modify existing code
**crates/euclid/src/frontend/dir/enums.rs**
Add:
- enum: pub::OpenBankingType
**crates/euclid/src/frontend/dir/lowering.rs**
Add:
- function: private::from
- impl: impl From<enums::OpenBankingType> for global_enums::PaymentMethodType
**crates/euclid/src/frontend/dir/transformers.rs**
Modify existing code
**crates/euclid_wasm/src/lib.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Add:
- enum: pub::OpenBankingData
**crates/hyperswitch_domain_models/src/router_flow_types/payments.rs**
Add:
- struct: pub::PostProcessing
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Add:
- function: private::try_from
- struct: pub::PaymentsPostProcessingData
- impl: impl TryFrom<RouterData<F, PaymentsAuthorizeData, response_types::PaymentsResponseData>> for PaymentsPostProcessingData
**crates/hyperswitch_domain_models/src/router_response_types.rs**
Modify existing code
**crates/kgraph_utils/src/mca.rs**
Modify existing code
**crates/kgraph_utils/src/transformers.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/connector/aci/transformers.rs**
Modify existing code
**crates/router/src/connector/adyen.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Modify existing code
**crates/router/src/connector/airwallex/transformers.rs**
Modify existing code
**crates/router/src/connector/authorizedotnet/transformers.rs**
Modify existing code
**crates/router/src/connector/bambora/transformers.rs**
Modify existing code
**crates/router/src/connector/bankofamerica/transformers.rs**
Modify existing code
**crates/router/src/connector/billwerk/transformers.rs**
Modify existing code
**crates/router/src/connector/bluesnap/transformers.rs**
Modify existing code
**crates/router/src/connector/boku/transformers.rs**
Modify existing code
**crates/router/src/connector/braintree/braintree_graphql_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/cryptopay/transformers.rs**
Modify existing code
**crates/router/src/connector/cybersource/transformers.rs**
Modify existing code
**crates/router/src/connector/datatrans/transformers.rs**
Modify existing code
**crates/router/src/connector/dlocal/transformers.rs**
Modify existing code
**crates/router/src/connector/fiserv/transformers.rs**
Modify existing code
**crates/router/src/connector/forte/transformers.rs**
Modify existing code
**crates/router/src/connector/globepay/transformers.rs**
Modify existing code
**crates/router/src/connector/gocardless/transformers.rs**
Modify existing code
**crates/router/src/connector/helcim/transformers.rs**
Modify existing code
**crates/router/src/connector/iatapay/transformers.rs**
Modify existing code
**crates/router/src/connector/klarna.rs**
Modify existing code
**crates/router/src/connector/mifinity/transformers.rs**
Modify existing code
**crates/router/src/connector/multisafepay/transformers.rs**
Modify existing code
**crates/router/src/connector/nexinets/transformers.rs**
Modify existing code
**crates/router/src/connector/nmi/transformers.rs**
Modify existing code
**crates/router/src/connector/noon/transformers.rs**
Modify existing code
**crates/router/src/connector/nuvei/transformers.rs**
Modify existing code
**crates/router/src/connector/opayo/transformers.rs**
Modify existing code
**crates/router/src/connector/payeezy/transformers.rs**
Modify existing code
**crates/router/src/connector/payme/transformers.rs**
Modify existing code
**crates/router/src/connector/paypal/transformers.rs**
Modify existing code
**crates/router/src/connector/placetopay/transformers.rs**
Modify existing code
**crates/router/src/connector/powertranz/transformers.rs**
Modify existing code
**crates/router/src/connector/razorpay/transformers.rs**
Modify existing code
**crates/router/src/connector/shift4/transformers.rs**
Modify existing code
**crates/router/src/connector/square/transformers.rs**
Modify existing code
**crates/router/src/connector/stax/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
**crates/router/src/connector/tsys/transformers.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Modify existing code
**crates/router/src/connector/volt/transformers.rs**
Modify existing code
**crates/router/src/connector/worldline/transformers.rs**
Modify existing code
**crates/router/src/connector/worldpay/transformers.rs**
Modify existing code
**crates/router/src/connector/zen/transformers.rs**
Modify existing code
**crates/router/src/connector/zsl/transformers.rs**
Modify existing code
**crates/router/src/core/fraud_check.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/checkout_flow.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/record_return.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/sale_flow.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/transaction_flow.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/connector_integration_v2_impls.rs**
Add:
- impl: impl api::PaymentsPostProcessingV2 for connector::DummyConnector<T>
- impl: impl services::ConnectorIntegrationV2<
api::PostProcessing,
types::PaymentFlowData,
types::PaymentsPostProcessingData,
types::PaymentsResponseData,
> for connector::DummyConnector<T>
- impl: impl api::PaymentsPostProcessingV2 for $connector
- impl: impl services::ConnectorIntegrationV2<
api::PostProcessing,
types::PaymentFlowData,
types::PaymentsPostProcessingData,
types::PaymentsResponseData,
> for $connector
**crates/router/src/core/payments/flows.rs**
Add:
- function: private::postprocessing_steps
- impl: impl api::PaymentsPostProcessing for connector::DummyConnector<T>
- impl: impl services::ConnectorIntegration<
api::PostProcessing,
types::PaymentsPostProcessingData,
types::PaymentsResponseData,
> for connector::DummyConnector<T>
**crates/router/src/core/payments/flows/approve_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/authorize_flow.rs**
Add:
- function: private::get_merchant_recipient_data
- function: private::postprocessing_steps
- function: pub::authorize_postprocessing_steps
**crates/router/src/core/payments/flows/cancel_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/capture_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/complete_authorize_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/incremental_authorization_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/psync_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/reject_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/session_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/flows/setup_mandate_flow.rs**
Add:
- function: private::get_merchant_recipient_data
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_additional_merchant_data
- function: pub::get_recipient_id_for_open_banking
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payout_link.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Add:
- trait: pub::PaymentsPostProcessing
**crates/router/src/types/api/payments_v2.rs**
Add:
- trait: pub::PaymentsPostProcessingV2
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/router/tests/connectors/cashtocode.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
|
{"issue_number": 3758, "pr_number": 3947, "commits_count": 1, "files_changed": 30, "response_length": 10691, "file_count": 102, "needs_breakdown": true}
|
feat(pm_list): add support for bank debits
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
This PR adds support for `bank_redirects` in payment methods list. The response will be of the form
```json
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "sepa",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"stripe",
"adyen"
]
}
},
{
"payment_method_type": "ach",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"adyen"
]
}
}
]
}
```
## 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)?
-->
- Create a payment connector with `sepa` and `ach` enabled.
- Create a payment with confirm set to false
- Call the pm list.
## 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: feat(pm_list): add pm list support for bank_debits
- Merged: 2023-05-11T10:54:01Z
- Files changed: 2 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
This PR was not merged to main in #927 because of github not automatically changing the base branch when parent branch is merged to main.
### Additional Changes
- [x] This PR modifies the API contract
Adds support for bank debits in the payment list, can be checked in #927
<!--
Provide links to the files with corresponding changes.
Follo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(pm_list): add pm list support for bank_debits (#1120)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Add:
- struct: pub::BankDebitTypes
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
|
{"issue_number": 927, "pr_number": 1120, "commits_count": 1, "files_changed": 2, "response_length": 1024, "file_count": 4, "needs_breakdown": false}
|
fix(dashboard_metadata): Fix prod intent emails
Currently prod intent emails are not going to biz email. Email are working on custom integ, integ main pod and custom sandbox pod with some code changes. Need to check if sandbox main pod is also able to send emails.
|
<think>
PR Context:
- Title: refactor(email): Add recipient emails in email config
- Merged: 2024-09-19T14:16:13Z
- Files changed: 13 files
- Commits: 6 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 -->
- This PR add recipient emails for recon and prod_intent under email config.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/env
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(email): Add recipient emails in email config (#5964)
Files to modify:
**crates/external_services/src/email.rs**
Modify existing code
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Remove:
- struct: pub::RecipientMails
**crates/router/src/consts/user.rs**
Modify existing code
**crates/router/src/core/recon.rs**
Modify existing code
**crates/router/src/core/user/dashboard_metadata.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
**crates/router/src/utils/user/dashboard_metadata.rs**
Modify existing code
|
{"issue_number": 5963, "pr_number": 5964, "commits_count": 1, "files_changed": 13, "response_length": 1445, "file_count": 10, "needs_breakdown": false}
|
[BUG]: 2-Letter State abbreviation is not accepted
### Bug Description
Currently 2-Letter State abbreviation is not accepted, in `billing.state` if you pass 2 letter valid state it should not throw an error
### Expected Behavior
Both 2 letter and full state name shall be accepted in `billing.state` and should be manipulated according to the requirements before sending it to the connector.
### Actual Behavior
Currently 2-Letter State abbreviation is not accepted, in `billing.state` if you pass 2 letter valid state it should not throw an error
### 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): accept state abbreviation in 2 letter
- Merged: 2024-05-15T11:24:00Z
- Files changed: 2 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [X] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Accept `billing.state` with 2-letter abbreviation for US and CA
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment vari
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): accept state abbreviation in 2 letter (#4646)
Co-authored-by: hyperswitch-bot[bot] <
Files to modify:
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Modify existing code
|
{"issue_number": 4647, "pr_number": 4646, "commits_count": 1, "files_changed": 2, "response_length": 1030, "file_count": 4, "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: feat(connector): add functionality for transforming QR image color
- Merged: 2025-03-04T11:14:11Z
- 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
This PR adds functionality to
- Create QR image data URI for a given hex color
- Send back the border color and display text message along with the QR data in `NextActionData` - which is consumed by SDK to take next action
Described in #7405
### Additional Changes
- [ ]
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): add functionality for transforming QR image color (#7414)
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_utils/src/errors.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/constants.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Add:
- function: pub::new_colored_from_data
- function: pub::parse_hex_color
**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/core/payments/transformers.rs**
Modify existing code
|
{"issue_number": 3264, "pr_number": 7414, "commits_count": 1, "files_changed": 9, "response_length": 1577, "file_count": 10, "needs_breakdown": false}
|
Get Plans
**Request to Subscription Povider to get plans**
/api/v2/items?limit=5&type[is]=plan&item_family_id[is]=cbdemo_omnisupport-solutions'
**Response from Subscription Provider**
```
{
"list": [
{
"item": {
"id": "cbdemo_enterprise-suite",
"name": "Enterprise Suite",
"external_name": "Enterprise Suite",
"description": "High-end customer support suite with enterprise-grade solutions.",
"status": "active",
"resource_version": 1754897340100,
"updated_at": 1754897340,
"item_family_id": "cbdemo_omnisupport-solutions",
"type": "plan",
"is_shippable": false,
"is_giftable": false,
"enabled_for_checkout": true,
"enabled_in_portal": true,
"item_applicability": "all",
"metered": false,
"channel": "web",
"bundle_items": [],
"deleted": false,
"object": "item"
}
},
{
"item": {
"id": "cbdemo_business-suite",
"name": "Business Suite",
"external_name": "Business Suite",
"description": "Advanced customer support plan with premium features.",
"status": "active",
"resource_version": 1754897339947,
"updated_at": 1754897339,
"item_family_id": "cbdemo_omnisupport-solutions",
"type": "plan",
"is_shippable": false,
"is_giftable": false,
"enabled_for_checkout": true,
"enabled_in_portal": true,
"item_applicability": "all",
"metered": false,
"channel": "web",
"bundle_items": [],
"deleted": false,
"object": "item"
}
},
{
"item": {
"id": "cbdemo_professional-suite",
"name": "Professional Suite",
"external_name": "Professional Suite",
"description": "Comprehensive customer support plan with extended capabilities.",
"status": "active",
"resource_version": 1754897339843,
"updated_at": 1754897339,
"item_family_id": "cbdemo_omnisupport-solutions",
"type": "plan",
"is_shippable": false,
"is_giftable": false,
"enabled_for_checkout": true,
"enabled_in_portal": true,
"item_applicability": "all",
"metered": false,
"channel": "web",
"bundle_items": [],
"deleted": false,
"object": "item"
}
},
{
"item": {
"id": "cbdemo_essential-support",
"name": "Essential Support",
"external_name": "Essential Support",
"description": "Basic customer support plan with core features.",
"status": "active",
"resource_version": 1754897339723,
"updated_at": 1754897339,
"item_family_id": "cbdemo_omnisupport-solutions",
"type": "plan",
"is_shippable": false,
"is_giftable": false,
"enabled_for_checkout": true,
"enabled_in_portal": true,
"item_applicability": "all",
"metered": false,
"channel": "web",
"bundle_items": [],
"deleted": false,
"object": "item"
}
}
]
}
```
|
<think>
PR Context:
- Title: feat(connector): Add support for get plans for Chargebee
- Merged: 2025-09-16T12:57:45Z
- Files changed: 21 files
- Commits: 27 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 support for the get plans endpoint for Chargebee
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variab
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add support for get plans for Chargebee (#9281)
Co-authored-by: hyperswitch-bot[bot
Files to modify:
**crates/hyperswitch_connectors/src/connectors/chargebee.rs**
Add:
- function: private::get_chargebee_plans_query_params
- function: private::get_headers
- function: private::get_url
- function: private::get_content_type
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- impl: impl api::subscriptions::Subscriptions for Chargebee
- impl: impl api::subscriptions::GetSubscriptionPlansFlow for Chargebee
- impl: impl ConnectorIntegration<
GetSubscriptionPlans,
GetSubscriptionPlansRequest,
GetSubscriptionPlansResponse,
> for Chargebee
- impl: impl GetSubscriptionPlansV2 for Chargebee
- impl: impl ConnectorIntegrationV2<
GetSubscriptionPlans,
hyperswitch_domain_models::router_data_v2::flow_common_types::GetSubscriptionPlansData,
GetSubscriptionPlansRequest,
GetSubscriptionPlansResponse,
> for Chargebee
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Add:
- function: private::try_from
- struct: pub::ChargebeeListPlansResponse
- struct: pub::ChargebeeItemList
- struct: pub::ChargebeeItem
- impl: impl TryFrom<ResponseRouterData<F, ChargebeeListPlansResponse, T, GetSubscriptionPlansResponse>> for RouterData<F, T, GetSubscriptionPlansResponse>
**crates/hyperswitch_connectors/src/connectors/recurly.rs**
Add:
- impl: impl api::subscriptions_v2::SubscriptionsV2 for Recurly
- impl: impl api::subscriptions_v2::GetSubscriptionPlansV2 for Recurly
- impl: impl ConnectorIntegrationV2<
GetSubscriptionPlans,
GetSubscriptionPlansData,
GetSubscriptionPlansRequest,
GetSubscriptionPlansResponse,
> for Recurly
**crates/hyperswitch_connectors/src/constants.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations.rs**
Add:
- impl: impl GetSubscriptionPlansFlow for connectors::DummyConnector<T>
- impl: impl ConnectorIntegration<
GetSubscriptionPlans,
GetSubscriptionPlansRequest,
GetSubscriptionPlansResponse,
> for connectors::DummyConnector<T>
- impl: impl Subscriptions for connectors::DummyConnector<T>
**crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs**
Add:
- struct: pub::GetSubscriptionPlansData
**crates/hyperswitch_domain_models/src/router_flow_types.rs**
Add:
- mod: pub::subscriptions
**crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlans
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Add:
- mod: pub::subscriptions
**crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlansRequest
**crates/hyperswitch_domain_models/src/router_response_types.rs**
Add:
- mod: pub::subscriptions
**crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlansResponse
- struct: pub::SubscriptionPlans
**crates/hyperswitch_domain_models/src/types.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Add:
- mod: pub::subscriptions
- mod: pub::subscriptions_v2
**crates/hyperswitch_interfaces/src/api/subscriptions.rs**
Add:
- trait: pub::GetSubscriptionPlansFlow
- trait: pub::Subscriptions
- trait: pub::Subscriptions
- trait: pub::GetSubscriptionPlansFlow
**crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs**
Add:
- trait: pub::SubscriptionsV2
- trait: pub::GetSubscriptionPlansV2
**crates/hyperswitch_interfaces/src/connector_integration_v2.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/conversion_impls.rs**
Add:
- function: private::from_old_router_data
- function: private::to_old_router_data
- impl: impl RouterDataConversion<T, Req, Resp> for GetSubscriptionPlansData
**crates/hyperswitch_interfaces/src/types.rs**
Modify existing code
**crates/router/src/core/connector_validation.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"issue_number": 9053, "pr_number": 9281, "commits_count": 1, "files_changed": 21, "response_length": 5123, "file_count": 23, "needs_breakdown": true}
|
fix: certificate decode failed when creating the session token for applepay
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
We used to have a lot of errors when creating applepay session tokens because of invalid certificates being sent when creating the merchant connector account.
This PR will not allow the merchant connector account to be created if the format of certificates are invalid. To do this, it will decode the certificates and then create the identity ( the same process is followed when we will be sending the request to applepay, so if this succeeds then we can be sure that the session token will not have any certificate decode errors ).
This will remove unnecessary 5xx being sent, such errors are bad request errors.
## 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).
-->
Fixes #1373
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
- Create mca with valid certificates -> session tokens are generated correctly
<img width="839" alt="Screenshot 2023-06-08 at 12 26 57 PM" src="https://github.com/juspay/hyperswitch/assets/48803246/4eab7519-4501-45fd-8475-7906216804aa">
- Create mca with invalid applepay certificates.
<img width="1257" alt="Screenshot 2023-06-08 at 12 28 48 PM" src="https://github.com/juspay/hyperswitch/assets/48803246/acfa1553-bb49-4387-be49-796b902773e1">
- Create mca with invalid format for metadata, will fail
<img width="1274" alt="Screenshot 2023-06-08 at 12 32 01 PM" src="https://github.com/juspay/hyperswitch/assets/48803246/a361d4c7-3085-44bf-96c1-d81e0a1d7f94">
## 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: refactor(mca): use separate struct for connector metadata
- Merged: 2023-06-17T15:28:11Z
- 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 -->
This PR will remove the parsing check for metadata that was added in #1385.
The reason the parsing check was added ( in addition to certificate validation ), is to ensure that mca cannot be created with malformed data.
But in https://github.com/juspay/hyperswitch/pull/1390, the connector is expecting the json value to be in specific format. This format
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(mca): use separate struct for connector metadata (#1465)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- struct: pub::ApplepayConnectorMetadataRequest
**crates/router/src/core/admin.rs**
Modify existing code
|
{"issue_number": 1385, "pr_number": 1465, "commits_count": 1, "files_changed": 2, "response_length": 1031, "file_count": 4, "needs_breakdown": false}
|
chore(ci): Add nix workflow
The builds will run on Juspay managed self-hosted runners (NixOS & nix-darwin machines in office).
## Motivation and Context
To make sure that `flake.nix` remains usable over time and works for users.
|
<think>
PR Context:
- Title: chore(nix): Unbreak `flake.nix`
- Merged: 2024-09-25T11:16:24Z
- Files changed: 4 files
- Commits: 5 commits
Implementation approach:
Resolves #5876
This PR makes sure that `flake.nix` builds, and checks it in CI (uses self-hosted runners) going forward. It removes no longer used Nix code (they don't build).
- [x] Add github workflow action to build flake outputs
- [x] Remove packages that no longer build (see #5017)
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 5017, "pr_number": 5867, "commits_count": 0, "files_changed": 4, "response_length": 555, "file_count": 0, "needs_breakdown": false}
|
feat: Adding support for multiple account creation for a merchant<>connector based on country
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Adding support so that merchant can have multiple account for a connector based on country
The unique identity will be `connector_label` for mca record
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
Create MCA
## 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: feat: multiple connector account support for the same `country`
- Merged: 2023-04-11T12:12:21Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
This PR adds support for multiple connector account support for the same country. The changes are built on top of #623.
In order to ensure backwards compatibility, default values are provided.
- Default value for `country` is `US`
- Default value for `business` is `default`.
The decision to pick a connector is based on `connector_label`. The form
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: multiple connector account support for the same `country` (#816)
Co-authored-by: Manoj Ghorela
Files to modify:
**crates/api_models/src/admin.rs**
Add:
- struct: pub::PrimaryBusinessDetails
- struct: pub::MerchantConnectorUpdate
**crates/api_models/src/payments.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
**crates/router/src/core/payments/helpers.rs**
Add:
- function: private::connector_needs_business_sub_label
- function: pub::get_connector_label
- function: pub::get_business_details
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/src/db/merchant_account.rs**
Modify existing code
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/router/src/db/payment_attempt.rs**
Modify existing code
**crates/router/src/db/payment_intent.rs**
Modify existing code
**crates/router/src/routes/admin.rs**
Modify existing code
**crates/router/src/types/api/admin.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/storage_models/src/merchant_account.rs**
Modify existing code
**crates/storage_models/src/merchant_connector_account.rs**
Modify existing code
**crates/storage_models/src/payment_attempt.rs**
Modify existing code
**crates/storage_models/src/payment_intent.rs**
Modify existing code
**crates/storage_models/src/query/merchant_connector_account.rs**
Modify existing code
**crates/storage_models/src/schema.rs**
Modify existing code
|
{"issue_number": 623, "pr_number": 816, "commits_count": 1, "files_changed": 30, "response_length": 2783, "file_count": 25, "needs_breakdown": true}
|
[REFACTOR]: [SHIFT4] Add amount conversion framework to Shift4
### :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://dev.shift4.com/docs/api#cards) 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): add amount conversion framework to Shift4
- Merged: 2024-10-24T12:06:57Z
- Files changed: 4 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
This PR adds amount conversion framework to Shift4, for sending to connector.
Resolves #6122
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): add amount conversion framework to Shift4 (#6250)
Files to modify:
**crates/router/src/connector/shift4.rs**
Remove:
- struct: pub::Shift4
Add:
- function: pub::new
- struct: pub::Shift4
- impl: impl Shift4
**crates/router/src/connector/shift4/transformers.rs**
Remove:
- function: private::get_amount_required
- function: private::get_amount_required
- impl: impl TryFrom<&types::RouterData<T, types::CompleteAuthorizeData, types::PaymentsResponseData>> for (item.request.connector_meta.clone())
Add:
- function: private::try_from
- struct: pub::Shift4RouterData
- impl: impl TryFrom<(MinorUnit, T)> for Shift4RouterData<T>
- impl: impl TryFrom<
&Shift4RouterData<
&types::RouterData<T, types::CompleteAuthorizeData, types::PaymentsResponseData>,
>,
> for (item.router_data.request.connector_meta.clone())
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/tests/connectors/shift4.rs**
Modify existing code
|
{"issue_number": 6122, "pr_number": 6250, "commits_count": 1, "files_changed": 4, "response_length": 1837, "file_count": 6, "needs_breakdown": false}
|
[Feature]: [Braintree] Sync with Hyperswitch Reference
### :memo: Feature Description
- In Hyperswitch, we retrieve transaction status in two ways:
1. Using `transaction_id` which is generated by Connectors
2. Using our `reference_id` which can be passed to Connectors during payment creation
- If supported, the request for retrieving Payments and Refunds should use the Hyperswitch's `reference_id`. This would assist in obtaining the payment/refund status in the event we failed to get it due to timeout, connection failure, etc.
### :hammer: Possible Implementation
- If the connector supports retrieving payments and refunds using our reference_id i.e `connector_request_reference_id` , we should utilize this functionality instead of exclusively relying on the connector_transaction_id.
- 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(Braintree): Sync with Hyperswitch Reference
- Merged: 2023-12-06T10:13:21Z
- Files changed: 1 files
- Commits: 9 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
fixes #3007
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(Braintree): Sync with Hyperswitch Reference (#3037)
Co-authored-by: Prasunna Soppa <70575890+pr
Files to modify:
**crates/router/src/connector/braintree/transformers.rs**
Modify existing code
|
{"issue_number": 3007, "pr_number": 3037, "commits_count": 1, "files_changed": 1, "response_length": 981, "file_count": 3, "needs_breakdown": false}
|
feat(core): add payments session endpoint
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
Add a new endpoint called session_tokens under payments. This will call the connectors and create sessions token.
## 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).
-->
Sessions token is used by wallets to initiate the wallet sdk.
## How did you test it?
NA
## 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: feat(core): add sessions api endpoint
- Merged: 2022-12-10T16:02:03Z
- 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
## Description
The PR's #100 and #95 should have been merged to main, but it was merged to [call_multiple_connectors](https://github.com/juspay/orca/tree/call_multiple_connectors) after it was merged to main.
## Motivation and Context
Please refer to #100 and #95
## How did you test it?
NA
## Checklist
<!-- Put an `x
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add sessions api endpoint (#104)
Files to modify:
**crates/router/src/configs/settings.rs**
Add:
- struct: pub::SupportedConnectors
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_connector_default
**crates/router/src/core/payments/operations.rs**
Add:
- function: private::get_connector
- function: private::get_connector
- function: private::get_connector
- function: private::get_connector
**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_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_method_validate.rs**
Add:
- function: private::get_connector
**crates/router/src/core/payments/operations/payment_response.rs**
Add:
- function: private::update_tracker
- impl: impl PostUpdateTracker<F, PaymentData<F>, types::PaymentsSessionData> for PaymentResponse
**crates/router/src/core/payments/operations/payment_session.rs**
Add:
- function: private::get_connector
**crates/router/src/core/payments/operations/payment_start.rs**
Add:
- function: private::get_connector
**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/transformers.rs**
Add:
- function: private::generate_response
- impl: impl ToResponse<Req, PaymentData<F>, Op> for api::PaymentsSessionResponse
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Add:
- function: pub::payments_connector_session
**crates/router/src/scheduler/workflows/payment_sync.rs**
Modify existing code
**crates/router/src/schema.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api.rs**
Remove:
- function: pub::construct
- impl: impl ConnectorData
Add:
- enum: pub::ConnectorCallType
- impl: impl ConnectorData
**crates/router/src/types/api/payments.rs**
Add:
- function: private::from
- function: private::from
- struct: pub::PaymentsSessionResponse
- impl: impl From<PaymentsSessionRequest> for PaymentsResponse
- impl: impl From<PaymentsSessionRequest> for PaymentsSessionResponse
**crates/router/src/types/storage/connector_response.rs**
Modify existing code
**crates/router/src/types/storage/payment_attempt.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": 100, "pr_number": 104, "commits_count": 1, "files_changed": 30, "response_length": 3774, "file_count": 29, "needs_breakdown": true}
|
Code reviewe
Thorough code review
|
<think>
PR Context:
- Title: refactor(masking): PII improvements
- Merged: 2022-12-13T07:50:21Z
- Files changed: 16 files
- Commits: 18 commits
Implementation approach:
## Type of Change
- [x] Refactoring
## Motivation and Context
Apply suggestions from code review #65
Closes #107
## Checklist
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(masking): PII improvements (#77)
Files to modify:
**crates/common_utils/src/pii.rs**
Modify existing code
**crates/masking/src/abs.rs**
Remove:
- function: private::peek_cloning
- trait: pub::PeekOptionInterface
- impl: impl PeekOptionInterface<Option<S>> for Option<Secret<S, I>>
Add:
- impl: impl ExposeOptionInterface<Option<S>> for Option<Secret<S, I>>
**crates/masking/src/bytes.rs**
Modify existing code
**crates/masking/src/lib.rs**
Modify existing code
**crates/masking/src/secret.rs**
Modify existing code
**crates/masking/src/serde.rs**
Modify existing code
**crates/masking/src/strategy.rs**
Remove:
- function: private::fmt
- struct: pub::NoMasking
- impl: impl Strategy<T> for NoMasking
**crates/masking/src/string.rs**
Modify existing code
**crates/masking/src/strong_secret.rs**
Remove:
- struct: pub::StrongSecret
Add:
- function: private::strong_eq
- struct: pub::StrongSecret
- trait: private::StrongEq
- impl: impl StrongEq for String
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"issue_number": 65, "pr_number": 77, "commits_count": 1, "files_changed": 16, "response_length": 1870, "file_count": 15, "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: fix(connector): adyen - propagate connector mandate details in incoming webhooks
- Merged: 2024-12-02T18:30:38Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Described in the linked #6719
### 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.
Fo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): adyen - propagate connector mandate details in incoming webhooks (#6720)
Files to modify:
**crates/router/src/connector/adyen.rs**
Add:
- function: private::get_mandate_details
**crates/router/src/connector/adyen/transformers.rs**
Modify existing code
|
{"issue_number": 6719, "pr_number": 6720, "commits_count": 1, "files_changed": 2, "response_length": 1091, "file_count": 4, "needs_breakdown": false}
|
feat(users): add endpoint to reset totp
Add support to reset TOTP from dashboard!
|
<think>
PR Context:
- Title: feat(users): add support to reset totp
- Merged: 2024-05-30T11:16:40Z
- Files changed: 5 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
Add support to reset TOTP
### 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.
Followi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): add support to reset totp (#4821)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Add:
- function: pub::totp_reset
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 4820, "pr_number": 4821, "commits_count": 1, "files_changed": 5, "response_length": 1164, "file_count": 7, "needs_breakdown": false}
|
Extend PR template to include config files directory paths
This is to educate PR authors to look for config files at different places if their changes affect them.
|
<think>
PR Context:
- Title: github(PULL_REQUEST_TEMPLATE): include paths to config files
- Merged: 2022-11-25T10:18:18Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Closes #16
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 16, "pr_number": 17, "commits_count": 0, "files_changed": 1, "response_length": 301, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] Add support for profile-specific default routing fallback
### Feature Description
Currently every merchant has a default fallback which is a list of all of their configured connectors. We now want to make this profile-specific, i.e. each profile will have an associated default fallback that is a list of all the connectors associated with that profile.
This issue also entails development of Read/Write APIs for profile specific default fallbacks, and integration with the payments core.
Further on , we can also later on add the `mca_id` as many connectors with the same name can be there under a single `profile_id`
### Possible Implementation
In interest of backwards compatibility, create two separate default fallback APIs for profiles (Read & Write). Additionally, implement profile-specific fallback usage in payments core routing with a feature flag.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else
|
<think>
PR Context:
- Title: refactor(connector): [Paypal] Add support for both BodyKey and SignatureKey
- Merged: 2023-11-21T14:33:00Z
- Files changed: 2 files
- Commits: 23 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 -->
- Make PayPal support `SignatureKey` `auth_type`.
- Add extra fields in `orders` request.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application con
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Paypal] Add support for both BodyKey and SignatureKey (#2633)
Co-authored-by:
Files to modify:
**crates/router/src/connector/paypal.rs**
Add:
- function: private::construct_auth_assertion_header
**crates/router/src/connector/paypal/transformers.rs**
Remove:
- struct: pub::PaypalAuthType
Add:
- function: private::from
- function: private::from
- function: private::try_from
- function: pub::get_client_secret
- function: pub::get_payer_id
- function: pub::generate_authorization_value
- function: pub::get_credentials
- struct: pub::OrderRequestAmount
- struct: pub::AmountBreakdown
- struct: pub::Payee
- struct: pub::ItemDetails
- struct: pub::ShippingAddress
- struct: pub::ShippingName
- struct: pub::StandardFlowCredentials
- struct: pub::PartnerFlowCredentials
- enum: pub::UserAction
- enum: pub::ShippingPreference
- enum: pub::PaypalAuthType
- enum: pub::PaypalConnectorCredentials
- impl: impl From<&PaypalRouterData<&types::PaymentsAuthorizeRouterData>> for OrderRequestAmount
- impl: impl From<&PaypalRouterData<&types::PaymentsAuthorizeRouterData>> for ItemDetails
- impl: impl TryFrom<&PaypalRouterData<&types::PaymentsAuthorizeRouterData>> for ShippingAddress
- impl: impl PaypalAuthType
- mod: pub::auth_headers
|
{"issue_number": 2833, "pr_number": 2633, "commits_count": 1, "files_changed": 2, "response_length": 2173, "file_count": 4, "needs_breakdown": false}
|
refactor: alter query for merchant scoped metadata
Remove `is_null` from `find_merchant_scoped_dashboard_metadata`
This is done to make DB changes and support backward compatibility in next deployment.
|
<think>
PR Context:
- Title: refactor(dashboard_metadata): alter query for merchant scoped metadata
- Merged: 2024-07-22T13:56:29Z
- Files changed: 2 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
Alter query in `find_merchant_scoped_dashboard_metadata`
For merchant scoped metadata it need not to be considered whether user_id column is `null` or not
### 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:** refactor(dashboard_metadata): alter query for merchant scoped metadata (#5397)
Files to modify:
**crates/diesel_models/src/query/dashboard_metadata.rs**
Modify existing code
**crates/router/src/db/dashboard_metadata.rs**
Modify existing code
|
{"issue_number": 5396, "pr_number": 5397, "commits_count": 1, "files_changed": 2, "response_length": 1051, "file_count": 4, "needs_breakdown": false}
|
bug(user_roles): Restrict updating user_roles to the same entity level
Currently update user role API allows updating a merchant level user role to profile level, which should not be possible.
This comes under upgrade/downgrade functionality, which is not available yet.
|
<think>
PR Context:
- Title: fix(user_role): Restrict updating user role to the same `EntityType`
- Merged: 2024-10-07T14:44:31Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Currently update user role API allows updating a merchant level user role to profile level, which should not be possible.
### 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:** fix(user_role): Restrict updating user role to the same `EntityType` (#6224)
Files to modify:
**crates/router/src/core/user_role.rs**
Modify existing code
|
{"issue_number": 6222, "pr_number": 6224, "commits_count": 1, "files_changed": 1, "response_length": 959, "file_count": 3, "needs_breakdown": false}
|
feat(connector): [paypal, trustpay] add in feature matrix
## 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 paypal, trustpay, nomupay connectors in feature matrix
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
```
curl --location 'http://localhost:8080/feature_matrix' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_jQNBYCfN5R0473yldj23Yl7HsGbCctexthWkELSAMAGpjCxKAspb2fcQDP1KmMJz'
```
Response:
```
{
"connector_count": 2,
"connectors": [
{
"name": "PAYPAL",
"display_name": "Paypal",
"description": "PayPal is a Slovakia-based company specializing in secure e-commerce payments, particularly within the EEA area.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"Mastercard",
"AmericanExpress",
"DinersClub",
"Discover",
"Interac",
"JCB",
"CartesBancaires"
],
"supported_countries": [
"TTO",
"HND",
"TWN",
"DEU",
"MCO",
"BDI",
"SLV",
"LCA",
"ESP",
"GUF",
"MUS",
"FRO",
"FIN",
"MKD",
"SPM",
"ETH",
"DNK",
"NGA",
"GMB",
"VCT",
"ROU",
"QAT",
"PER",
"MYT",
"TGO",
"NOR",
"TCD",
"KNA",
"DMA",
"FJI",
"POL",
"KOR",
"SLE",
"KIR",
"LAO",
"BFA",
"KWT",
"CRI",
"WSM",
"ABW",
"GBR",
"MWI",
"BHR",
"ZWE",
"BRB",
"MSR",
"BIH",
"SYC",
"TZA",
"NIU",
"COD",
"SMR",
"KAZ",
"NAM",
"BMU",
"CHL",
"ISL",
"LKA",
"NRU",
"BLZ",
"GTM",
"ZMB",
"SGP",
"ARE",
"GIB",
"LSO",
"SUR",
"GAB",
"JPN",
"PAN",
"CHE",
"NCL",
"USA",
"SVK",
"GRD",
"DOM",
"SAU",
"TKM",
"UGA",
"BLR",
"VNM",
"MDV",
"CYP",
"LTU",
"LIE",
"MAR",
"SWZ",
"MHL",
"ERI",
"NER",
"MLT",
"PNG",
"UKR",
"SVN",
"REU",
"NPL",
"PYF",
"FRA",
"NFK",
"SHN",
"CIV",
"ISR",
"COG",
"SJM",
"HKG",
"BWA",
"URY",
"SLB",
"BRA",
"CPV",
"SOM",
"GEO",
"AGO",
"KEN",
"MNE",
"MOZ",
"NIC",
"IND",
"AUS",
"IRL",
"CMR",
"GRL",
"GLP",
"LUX",
"MEX",
"NLD",
"THA",
"CAN",
"HUN",
"PCN",
"PHL",
"TUV",
"AIA",
"VGB",
"PRY",
"KHM",
"DZA",
"GUY",
"MNG",
"BEL",
"TON",
"JAM",
"TCA",
"GNB",
"OMN",
"ZAF",
"COM",
"NZL",
"MDG",
"BRN",
"SRB",
"IDN",
"MLI",
"KGZ",
"AZE",
"VEN",
"RWA",
"ECU",
"GRC",
"COK",
"DJI",
"PRT",
"BHS",
"EGY",
"BTN",
"AUT",
"RUS",
"TUN",
"BOL",
"MYS",
"COL",
"SEN",
"JOR",
"STP",
"HRV",
"ARG",
"FSM",
"GIN",
"ATG",
"MDA",
"SWE",
"ITA",
"LVA",
"EST",
"BEN",
"BGR",
"MRT",
"CZE",
"CYM",
"TJK"
],
"supported_currencies": [
"PLN",
"SEK",
"SGD",
"BRL",
"NZD",
"ILS",
"CHF",
"THB",
"PHP",
"USD",
"CZK",
"JPY",
"CAD",
"CNY",
"MXN",
"GBP",
"HUF",
"HKD",
"EUR",
"MYR",
"NOK",
"AUD",
"DKK",
"TWD"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"Mastercard",
"AmericanExpress",
"DinersClub",
"Discover",
"Interac",
"JCB",
"CartesBancaires"
],
"supported_countries": [
"NFK",
"URY",
"FIN",
"NER",
"CAN",
"GMB",
"COM",
"SMR",
"MCO",
"GUF",
"DOM",
"ECU",
"DNK",
"CMR",
"CRI",
"GEO",
"BGR",
"FRA",
"TUN",
"GTM",
"NLD",
"NAM",
"PAN",
"TCA",
"GNB",
"SEN",
"SVK",
"BLZ",
"NZL",
"AGO",
"ATG",
"ISR",
"MRT",
"TON",
"OMN",
"RUS",
"LIE",
"BEN",
"FJI",
"GAB",
"SHN",
"MLT",
"UKR",
"TUV",
"LTU",
"GIN",
"RWA",
"KHM",
"MYS",
"VNM",
"NGA",
"USA",
"TWN",
"DZA",
"MEX",
"AUS",
"MDV",
"SLB",
"CHL",
"MWI",
"ZMB",
"BRA",
"ZWE",
"PCN",
"NIU",
"GRD",
"NOR",
"GUY",
"BTN",
"NRU",
"SAU",
"SJM",
"AZE",
"LAO",
"GBR",
"BHR",
"MDG",
"IND",
"ARG",
"EGY",
"SGP",
"WSM",
"HRV",
"KAZ",
"GIB",
"SPM",
"GLP",
"MDA",
"TKM",
"STP",
"BFA",
"BWA",
"BEL",
"MNE",
"ITA",
"DJI",
"CYP",
"KOR",
"GRC",
"NCL",
"KEN",
"PER",
"VCT",
"CHE",
"FRO",
"KGZ",
"AIA",
"MYT",
"PYF",
"CYM",
"BRB",
"AUT",
"ISL",
"HKG",
"BOL",
"PRY",
"REU",
"IRL",
"JPN",
"COD",
"VGB",
"PHL",
"SWZ",
"EST",
"MAR",
"JOR",
"NIC",
"TZA",
"ETH",
"IDN",
"BMU",
"SUR",
"FSM",
"SLE",
"ROU",
"MNG",
"BHS",
"PNG",
"SOM",
"BRN",
"NPL",
"BDI",
"HND",
"ARE",
"LKA",
"MUS",
"SLV",
"BLR",
"POL",
"CPV",
"JAM",
"SYC",
"TTO",
"MLI",
"ZAF",
"BIH",
"QAT",
"LVA",
"CZE",
"SVN",
"KNA",
"DEU",
"MKD",
"DMA",
"LUX",
"HUN",
"ERI",
"COG",
"COK",
"PRT",
"THA",
"SRB",
"GRL",
"ABW",
"MHL",
"SWE",
"MOZ",
"COL",
"TGO",
"VEN",
"LSO",
"TCD",
"MSR",
"KWT",
"KIR",
"LCA",
"CIV",
"UGA",
"ESP",
"TJK"
],
"supported_currencies": [
"CNY",
"PHP",
"TWD",
"HKD",
"JPY",
"SEK",
"MXN",
"ILS",
"BRL",
"PLN",
"EUR",
"USD",
"DKK",
"HUF",
"AUD",
"CAD",
"CZK",
"NZD",
"MYR",
"NOK",
"GBP",
"SGD",
"CHF",
"THB"
]
},
{
"payment_method": "wallet",
"payment_method_type": "paypal",
"payment_method_type_display_name": "PayPal",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"NCL",
"MRT",
"DMA",
"MYS",
"GIN",
"STP",
"MKD",
"CAN",
"SLV",
"ISR",
"TTO",
"KOR",
"KIR",
"SMR",
"COG",
"MLT",
"MSR",
"KWT",
"ITA",
"COK",
"SLE",
"MNG",
"MOZ",
"FRO",
"GRL",
"TCD",
"DNK",
"MWI",
"URY",
"CPV",
"CMR",
"MDA",
"ESP",
"HND",
"UKR",
"MLI",
"AUT",
"SGP",
"TJK",
"DEU",
"POL",
"SWE",
"GUY",
"SRB",
"KNA",
"ETH",
"THA",
"NPL",
"MUS",
"PAN",
"NIU",
"LKA",
"VEN",
"GLP",
"BRB",
"OMN",
"SWZ",
"MDV",
"PRT",
"LIE",
"SUR",
"ISL",
"LTU",
"AZE",
"TGO",
"FIN",
"LSO",
"HRV",
"PYF",
"CHL",
"NGA",
"BRN",
"NZL",
"FSM",
"LAO",
"MYT",
"LCA",
"BFA",
"BTN",
"ATG",
"CYM",
"HKG",
"ZMB",
"CYP",
"SYC",
"COL",
"AGO",
"HUN",
"MAR",
"CIV",
"DOM",
"BHR",
"SJM",
"KGZ",
"SOM",
"DZA",
"EST",
"MHL",
"PNG",
"MCO",
"TZA",
"GNB",
"WSM",
"KAZ",
"MNE",
"QAT",
"NAM",
"KEN",
"COD",
"TON",
"AIA",
"PHL",
"TCA",
"SEN",
"ERI",
"JAM",
"SHN",
"BEN",
"GIB",
"RUS",
"EGY",
"BOL",
"REU",
"ABW",
"GMB",
"ARG",
"VNM",
"IND",
"LVA",
"NOR",
"MDG",
"GUF",
"TUV",
"GEO",
"TKM",
"ARE",
"JPN",
"VCT",
"SAU",
"FRA",
"GTM",
"SVN",
"TWN",
"LUX",
"NRU",
"KHM",
"BGR",
"BMU",
"BHS",
"ZAF",
"NER",
"TUN",
"PER",
"NIC",
"UGA",
"AUS",
"SPM",
"BIH",
"SLB",
"IRL",
"COM",
"NFK",
"BDI",
"GRD",
"VGB",
"GBR",
"BLR",
"BRA",
"PCN",
"MEX",
"FJI",
"GRC",
"CHE",
"BLZ",
"BEL",
"IDN",
"GAB",
"PRY",
"ROU",
"JOR",
"SVK",
"NLD",
"USA",
"DJI",
"CRI",
"CZE",
"BWA",
"RWA",
"ZWE",
"ECU"
],
"supported_currencies": [
"GBP",
"USD",
"ILS",
"MYR",
"DKK",
"CZK",
"MXN",
"HUF",
"SEK",
"JPY",
"EUR",
"HKD",
"TWD",
"PLN",
"SGD",
"AUD",
"BRL",
"PHP",
"NOK",
"NZD",
"CAD",
"CHF",
"THB",
"CNY"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "eps",
"payment_method_type_display_name": "EPS",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"MDV",
"VGB",
"COG",
"SUR",
"LTU",
"KGZ",
"USA",
"BOL",
"SRB",
"MLI",
"GMB",
"CAN",
"PAN",
"GRD",
"CYP",
"PNG",
"RUS",
"KWT",
"PHL",
"CYM",
"BTN",
"GAB",
"TKM",
"SVN",
"GIN",
"AGO",
"GUF",
"NGA",
"COK",
"LAO",
"BHR",
"SJM",
"TJK",
"BRB",
"BEL",
"FRO",
"SHN",
"TCA",
"TON",
"BLR",
"NIU",
"MNG",
"AIA",
"NAM",
"KNA",
"DOM",
"HND",
"KOR",
"KIR",
"MYT",
"JAM",
"TZA",
"ABW",
"CRI",
"DMA",
"PCN",
"CZE",
"DJI",
"IDN",
"HRV",
"DNK",
"IRL",
"AUS",
"GTM",
"ISL",
"NPL",
"GRC",
"THA",
"GIB",
"LCA",
"CHL",
"SLV",
"AUT",
"VEN",
"NOR",
"MKD",
"ZWE",
"ECU",
"MDA",
"GNB",
"SWE",
"KAZ",
"CIV",
"FSM",
"FRA",
"NER",
"GLP",
"TTO",
"ETH",
"VCT",
"EGY",
"NRU",
"SWZ",
"HUN",
"GUY",
"NLD",
"GRL",
"MWI",
"JPN",
"BGR",
"OMN",
"BRN",
"HKG",
"JOR",
"NCL",
"PER",
"DZA",
"CMR",
"PRY",
"MRT",
"SYC",
"BIH",
"BWA",
"ITA",
"ISR",
"SGP",
"TWN",
"COM",
"LIE",
"MLT",
"MAR",
"MEX",
"SLB",
"MOZ",
"NFK",
"NZL",
"MDG",
"FJI",
"DEU",
"ESP",
"KHM",
"MSR",
"CHE",
"GEO",
"ARG",
"SLE",
"ATG",
"EST",
"PYF",
"BRA",
"ERI",
"SOM",
"UGA",
"LSO",
"SMR",
"LKA",
"TUN",
"GBR",
"BHS",
"STP",
"BEN",
"PRT",
"IND",
"FIN",
"MCO",
"TGO",
"BDI",
"MNE",
"VNM",
"TUV",
"TCD",
"NIC",
"UKR",
"URY",
"LVA",
"QAT",
"POL",
"SEN",
"BMU",
"SVK",
"MYS",
"COD",
"RWA",
"MHL",
"MUS",
"ARE",
"ZAF",
"WSM",
"ZMB",
"AZE",
"BLZ",
"KEN",
"BFA",
"ROU",
"SPM",
"SAU",
"REU",
"CPV",
"COL",
"LUX"
],
"supported_currencies": [
"PHP",
"SEK",
"CAD",
"EUR",
"BRL",
"SGD",
"CNY",
"NOK",
"NZD",
"THB",
"TWD",
"CZK",
"GBP",
"CHF",
"MYR",
"JPY",
"ILS",
"AUD",
"MXN",
"HUF",
"PLN",
"USD",
"DKK",
"HKD"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "giropay",
"payment_method_type_display_name": "Giropay",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"STP",
"GRC",
"ZMB",
"MUS",
"CHE",
"BRB",
"KGZ",
"BFA",
"TCA",
"GMB",
"SUR",
"MSR",
"COL",
"DJI",
"JOR",
"NFK",
"WSM",
"GAB",
"PRY",
"GNB",
"IND",
"MAR",
"KEN",
"TON",
"MLI",
"GBR",
"LCA",
"SGP",
"MHL",
"MKD",
"COG",
"BTN",
"MDG",
"SMR",
"AUT",
"LIE",
"LAO",
"FRA",
"OMN",
"THA",
"BGR",
"KOR",
"REU",
"GLP",
"CMR",
"ABW",
"BOL",
"MOZ",
"HUN",
"SPM",
"CHL",
"TJK",
"BRA",
"NPL",
"COD",
"ETH",
"TCD",
"SVK",
"PHL",
"AUS",
"MDV",
"VGB",
"CRI",
"MDA",
"PER",
"COK",
"CYP",
"MEX",
"KAZ",
"MNG",
"RWA",
"SWE",
"GUF",
"BRN",
"ISL",
"SLE",
"TZA",
"NIC",
"SRB",
"RUS",
"BLR",
"MNE",
"MCO",
"GUY",
"TGO",
"NZL",
"TKM",
"QAT",
"SLV",
"FJI",
"NER",
"BIH",
"SAU",
"TTO",
"NOR",
"VEN",
"TUN",
"BEN",
"LVA",
"EGY",
"MRT",
"USA",
"NCL",
"FRO",
"IDN",
"TWN",
"GEO",
"SYC",
"SVN",
"ESP",
"VCT",
"CAN",
"BMU",
"ZWE",
"EST",
"SEN",
"ZAF",
"MYT",
"PAN",
"BHR",
"PRT",
"SJM",
"SHN",
"CIV",
"CYM",
"GIN",
"KNA",
"UGA",
"VNM",
"BEL",
"AGO",
"AZE",
"LKA",
"UKR",
"PYF",
"GTM",
"COM",
"JAM",
"DEU",
"ITA",
"MYS",
"DOM",
"HKG",
"ARG",
"ECU",
"CZE",
"DNK",
"KHM",
"ARE",
"GRD",
"IRL",
"SOM",
"CPV",
"MLT",
"TUV",
"MWI",
"ROU",
"BDI",
"ISR",
"NIU",
"ATG",
"FSM",
"NAM",
"BLZ",
"LSO",
"NLD",
"URY",
"BWA",
"PNG",
"NRU",
"KIR",
"SLB",
"ERI",
"FIN",
"KWT",
"POL",
"NGA",
"BHS",
"AIA",
"HRV",
"DZA",
"DMA",
"GIB",
"GRL",
"HND",
"SWZ",
"JPN",
"LTU",
"LUX",
"PCN"
],
"supported_currencies": [
"PHP",
"NZD",
"CNY",
"GBP",
"CHF",
"SGD",
"USD",
"ILS",
"BRL",
"AUD",
"TWD",
"PLN",
"CZK",
"DKK",
"EUR",
"MYR",
"MXN",
"CAD",
"THB",
"NOK",
"HKD",
"HUF",
"JPY",
"SEK"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "ideal",
"payment_method_type_display_name": "iDEAL",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"HRV",
"BTN",
"MDA",
"ESP",
"SWE",
"NAM",
"FRA",
"ARG",
"PCN",
"MNE",
"PHL",
"LCA",
"CMR",
"MNG",
"ISL",
"SAU",
"CHE",
"FIN",
"KIR",
"BMU",
"GUF",
"EGY",
"UGA",
"SLV",
"DJI",
"HUN",
"GNB",
"AZE",
"JOR",
"BRB",
"LKA",
"SGP",
"THA",
"CIV",
"TUV",
"COK",
"SWZ",
"SPM",
"VNM",
"NPL",
"CRI",
"LVA",
"ECU",
"GTM",
"CPV",
"BIH",
"COL",
"ITA",
"HND",
"ATG",
"RUS",
"ZWE",
"IRL",
"BLR",
"NIU",
"IND",
"MRT",
"SEN",
"BHS",
"TZA",
"MSR",
"DZA",
"PNG",
"BWA",
"GLP",
"ISR",
"DNK",
"SVK",
"TON",
"MUS",
"CYP",
"MEX",
"KHM",
"KOR",
"ERI",
"ZAF",
"QAT",
"BRA",
"LUX",
"COG",
"GBR",
"NCL",
"TKM",
"JPN",
"KWT",
"FSM",
"KEN",
"MCO",
"PRT",
"GRL",
"TJK",
"BRN",
"NOR",
"DEU",
"LSO",
"STP",
"GEO",
"GIN",
"SVN",
"VCT",
"VGB",
"NER",
"GRC",
"OMN",
"KGZ",
"COD",
"FRO",
"KAZ",
"FJI",
"KNA",
"BHR",
"EST",
"NLD",
"TGO",
"LAO",
"NFK",
"REU",
"NIC",
"UKR",
"SJM",
"JAM",
"GIB",
"TTO",
"PYF",
"BEL",
"IDN",
"CYM",
"BFA",
"PRY",
"ARE",
"BLZ",
"COM",
"ZMB",
"MOZ",
"RWA",
"SMR",
"BDI",
"TWN",
"CZE",
"SYC",
"TUN",
"MLI",
"MYS",
"TCA",
"MAR",
"CAN",
"AGO",
"SOM",
"URY",
"ETH",
"SHN",
"MHL",
"GMB",
"AUS",
"MDG",
"GRD",
"LTU",
"AUT",
"NRU",
"SLE",
"GUY",
"NGA",
"ROU",
"SRB",
"MYT",
"WSM",
"PAN",
"NZL",
"BOL",
"GAB",
"DMA",
"ABW",
"LIE",
"TCD",
"AIA",
"CHL",
"SUR",
"PER",
"BEN",
"SLB",
"MWI",
"MDV",
"MKD",
"BGR",
"VEN",
"USA",
"MLT",
"DOM",
"HKG",
"POL"
],
"supported_currencies": [
"TWD",
"USD",
"DKK",
"MYR",
"NOK",
"CNY",
"MXN",
"CZK",
"ILS",
"CAD",
"NZD",
"SEK",
"CHF",
"SGD",
"PLN",
"PHP",
"GBP",
"HUF",
"EUR",
"HKD",
"THB",
"AUD",
"JPY",
"BRL"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "sofort",
"payment_method_type_display_name": "Sofort",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"IRL",
"NGA",
"MDA",
"BRN",
"GUY",
"RUS",
"IND",
"BLR",
"BMU",
"NCL",
"MUS",
"NOR",
"MYT",
"KOR",
"GNB",
"GLP",
"GIB",
"NIC",
"PCN",
"SLE",
"GBR",
"SMR",
"COK",
"GIN",
"THA",
"LTU",
"TCA",
"ESP",
"VNM",
"TZA",
"AIA",
"BGR",
"COD",
"TUN",
"TJK",
"PYF",
"PAN",
"NFK",
"CHE",
"TWN",
"BRA",
"ISL",
"AUS",
"PRY",
"MWI",
"ARE",
"KWT",
"TUV",
"ATG",
"SLB",
"SLV",
"MNE",
"FRA",
"COM",
"CYP",
"LVA",
"KNA",
"HKG",
"HUN",
"EST",
"KGZ",
"NPL",
"PER",
"CYM",
"JOR",
"URY",
"MEX",
"SWZ",
"TCD",
"WSM",
"BFA",
"MKD",
"SOM",
"MAR",
"SWE",
"CZE",
"BDI",
"GAB",
"BIH",
"SJM",
"DJI",
"LUX",
"CAN",
"GTM",
"UKR",
"FJI",
"KEN",
"SUR",
"MRT",
"REU",
"PNG",
"ZAF",
"NAM",
"GUF",
"BWA",
"GMB",
"SVK",
"BHR",
"GRC",
"MNG",
"BOL",
"JPN",
"ECU",
"POL",
"IDN",
"CHL",
"SPM",
"USA",
"TTO",
"MHL",
"NER",
"QAT",
"TKM",
"VGB",
"BEL",
"CRI",
"KAZ",
"MYS",
"ABW",
"MSR",
"LCA",
"OMN",
"ERI",
"SGP",
"KIR",
"MDG",
"VCT",
"AGO",
"MCO",
"NIU",
"AUT",
"UGA",
"MLI",
"SYC",
"NZL",
"DOM",
"TON",
"DEU",
"COG",
"ISR",
"ZMB",
"FSM",
"DNK",
"STP",
"RWA",
"LIE",
"SAU",
"SVN",
"ROU",
"LSO",
"BHS",
"VEN",
"COL",
"TGO",
"KHM",
"BEN",
"NLD",
"LAO",
"GEO",
"AZE",
"NRU",
"SRB",
"CPV",
"GRL",
"FRO",
"SHN",
"HND",
"EGY",
"ZWE",
"PRT",
"BLZ",
"BTN",
"HRV",
"MLT",
"JAM",
"ITA",
"DZA",
"MOZ",
"FIN",
"CMR",
"DMA",
"PHL",
"MDV",
"LKA",
"SEN",
"ETH",
"BRB",
"GRD",
"CIV",
"ARG"
],
"supported_currencies": [
"BRL",
"ILS",
"PHP",
"THB",
"SGD",
"TWD",
"CZK",
"MXN",
"NZD",
"NOK",
"MYR",
"AUD",
"GBP",
"SEK",
"CHF",
"HUF",
"USD",
"DKK",
"CNY",
"PLN",
"HKD",
"CAD",
"EUR",
"JPY"
]
}
],
"supported_webhook_flows": [
"payments",
"refunds",
"disputes"
]
},
{
"name": "TRUSTPAY",
"display_name": "Trustpay",
"description": "TrustPay is a Slovakia-based company specializing in secure e-commerce payments, particularly within the EEA area.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"Mastercard",
"AmericanExpress",
"DinersClub",
"Discover",
"Interac",
"JCB",
"CartesBancaires",
"UnionPay"
],
"supported_countries": null,
"supported_currencies": [
"DKK",
"GBP",
"NOK",
"HUF",
"CHF",
"USD",
"CZK",
"AUD",
"SEK",
"EUR",
"CAD",
"PLN",
"NZD",
"RON"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"Mastercard",
"AmericanExpress",
"DinersClub",
"Discover",
"Interac",
"JCB",
"CartesBancaires",
"UnionPay"
],
"supported_countries": null,
"supported_currencies": [
"NOK",
"HUF",
"NZD",
"CHF",
"GBP",
"RON",
"AUD",
"USD",
"SEK",
"PLN",
"EUR",
"CAD",
"DKK",
"CZK"
]
},
{
"payment_method": "bank_transfer",
"payment_method_type": "instant_bank_transfer",
"payment_method_type_display_name": "Instant Bank Transfer",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": [
"SVK",
"AUT",
"DEU",
"GBR",
"ITA",
"CZE"
],
"supported_currencies": [
"GBP",
"EUR",
"CZK"
]
},
{
"payment_method": "bank_transfer",
"payment_method_type": "sepa_bank_transfer",
"payment_method_type_display_name": "SEPA Bank Transfer",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": null,
"supported_currencies": null
},
{
"payment_method": "bank_redirect",
"payment_method_type": "giropay",
"payment_method_type_display_name": "Giropay",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": null,
"supported_currencies": null
},
{
"payment_method": "bank_redirect",
"payment_method_type": "sofort",
"payment_method_type_display_name": "Sofort",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": [
"NLD"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "eps",
"payment_method_type_display_name": "EPS",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": [
"AUT"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "ideal",
"payment_method_type_display_name": "iDEAL",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": [
"AUT"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "blik",
"payment_method_type_display_name": "BLIK",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [],
"supported_countries": [
"POL"
],
"supported_currencies": [
"PLN"
]
}
],
"supported_webhook_flows": [
"payments",
"refunds",
"disputes"
]
},
]
}
```
## 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): revert [paypal, trustpay] add in feature matrix
- Merged: 2025-05-15T13:19:51Z
- Files changed: 9 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#7911
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): revert [paypal, trustpay] add in feature matrix (#8042)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/paypal.rs**
Remove:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Paypal
Add:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Paypal
**crates/hyperswitch_connectors/src/connectors/trustpay.rs**
Remove:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Trustpay
Add:
- impl: impl ConnectorSpecifications for Trustpay
|
{"issue_number": 7911, "pr_number": 8042, "commits_count": 1, "files_changed": 9, "response_length": 1160, "file_count": 4, "needs_breakdown": false}
|
chore(docker): prefix Hyperswitch Docker image URIs with `docker.juspay.io`
## 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 -->
This PR updates Hyperswitch Docker images to be prefixed by `docker.juspay.io`. I've just done a global search-replace to be honest.
## 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).
-->
N/A
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Tried the Docker Compose setup locally, didn't "test" out any of the other changes though.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: chore(docker): prefix Hyperswitch Docker image URIs with `docker.juspay.io`
- Merged: 2025-03-21T11:37:07Z
- Files changed: 4 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR updates Hyperswitch Docker images to be prefixed by `docker.juspay.io`. This includes the same changes as #7368, I've cherry picked the same commit.
## Motivation and Context
<!--
Why is this change required? What problem does i
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7368, "pr_number": 7592, "commits_count": 0, "files_changed": 4, "response_length": 805, "file_count": 0, "needs_breakdown": false}
|
fix(router): change the retrieve's payload to query
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Change the deserialisation method from Json to Query in the payments retrieve function
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
Based on the requirements for the payments retrieve API to accept parameters instead of fields in the body
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
Tested the endpoint by sending proper query parameters & by sending no query params
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(themes): Create user APIs for managing themes
- Merged: 2025-07-28T07:46:16Z
- Files changed: 18 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
This PR adds user APIs to manage themes. Earlier themes was being managed using Admin apis.
These are the following APIs
1. Create Theme
2. Delete Theme
3. Update Theme
4. Upload Asset
5. Find Theme by Theme ID
6. List themes by entity level
7. Get Theme by lineage
- A
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(themes): Create user APIs for managing themes (#8387)
Co-authored-by: hyperswitch-bot[bot] <148
Files to modify:
**crates/api_models/src/events/user.rs**
Modify existing code
**crates/api_models/src/user/theme.rs**
Add:
- struct: pub::CreateUserThemeRequest
- struct: pub::EntityTypeQueryParam
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/common_utils/src/id_type/profile.rs**
Modify existing code
**crates/common_utils/src/types/user/theme.rs**
Modify existing code
**crates/diesel_models/src/query/user/theme.rs**
Add:
- function: private::lineage_hierarchy_filter
- function: pub::delete_by_theme_id
- function: pub::find_all_by_lineage_hierarchy
**crates/router/src/core/user/theme.rs**
Add:
- function: pub::delete_theme
- function: pub::create_user_theme
- function: pub::update_user_theme
- function: pub::upload_file_to_user_theme_storage
- function: pub::list_all_themes_in_lineage
- function: pub::get_user_theme_using_theme_id
- function: pub::get_user_theme_using_lineage
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/user/theme.rs**
Add:
- function: private::check_theme_belongs_to_lineage_hierarchy
- function: private::delete_theme_by_theme_id
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user/theme.rs**
Add:
- function: pub::create_user_theme
- function: pub::get_user_theme_using_theme_id
- function: pub::update_user_theme
- function: pub::delete_user_theme
- function: pub::upload_file_to_user_theme_storage
- function: pub::list_all_themes_in_lineage
- function: pub::get_user_theme_using_lineage
**crates/router/src/services/authorization/info.rs**
Modify existing code
**crates/router/src/services/authorization/permission_groups.rs**
Modify existing code
**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/utils/user/theme.rs**
Add:
- function: pub::get_theme_lineage_from_user_token
- function: pub::can_user_access_theme
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 2, "pr_number": 8387, "commits_count": 1, "files_changed": 18, "response_length": 3151, "file_count": 20, "needs_breakdown": true}
|
[FEATURE] Payments and it's webhook response to contain non-card payment method details
### Feature Description
TLDR; Payments response and it's associated webhooks events to contain payment method data details.
As of today, only card's and paylater's payment method data is populated in our API responses and webhook events for payments. Populating details of other payment methods provides more context about the payment details.
### Possible Implementation
Below is the list of payment methods supported in HyperSwitch
- :white_check_mark: Card
- CardRedirect
- Wallet
- :white_check_mark: PayLater
- BankRedirect
- BankDebit
- BankTransfer
- RealTimePayment
- Crypto
- Upi
- Voucher
- GiftCard
- CardToken
- OpenBanking
### 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: populate payment method details in payments response
- Merged: 2024-08-26T16:56:18Z
- Files changed: 10 files
- Commits: 10 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Described in #5652
### 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 a
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: populate payment method details in payments response (#5661)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- mod: pub::additional_info
**crates/api_models/src/payments/additional_info.rs**
Add:
- struct: pub::AchBankDebitAdditionalData
- struct: pub::BacsBankDebitAdditionalData
- struct: pub::BecsBankDebitAdditionalData
- struct: pub::SepaBankDebitAdditionalData
- struct: pub::BankRedirectAdditionalData
- struct: pub::BancontactBankRedirectAdditionalData
- struct: pub::BlikBankRedirectAdditionalData
- struct: pub::GiropayBankRedirectAdditionalData
- struct: pub::PixBankTransferAdditionalData
- struct: pub::LocalBankTransferAdditionalData
- struct: pub::GivexGiftCardAdditionalData
- struct: pub::CardTokenAdditionalData
- struct: pub::UpiCollectAdditionalData
- enum: pub::BankDebitAdditionalData
- enum: pub::BankRedirectDetails
- enum: pub::BankTransferAdditionalData
- enum: pub::GiftCardAdditionalData
- enum: pub::UpiAdditionalData
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Add:
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- impl: impl From<CardRedirectData> for api_models::payments::CardRedirectData
- impl: impl From<CryptoData> for api_models::payments::CryptoData
- impl: impl From<UpiData> for api_models::payments::additional_info::UpiAdditionalData
- impl: impl From<Box<BoletoVoucherData>> for Box<api_models::payments::BoletoVoucherData>
- impl: impl From<Box<AlfamartVoucherData>> for Box<api_models::payments::AlfamartVoucherData>
- impl: impl From<Box<IndomaretVoucherData>> for Box<api_models::payments::IndomaretVoucherData>
- impl: impl From<Box<JCSVoucherData>> for Box<api_models::payments::JCSVoucherData>
- impl: impl From<VoucherData> for api_models::payments::VoucherData
- impl: impl From<GiftCardData> for payment_additional_types::GiftCardAdditionalData
- impl: impl From<CardToken> for payment_additional_types::CardTokenAdditionalData
- impl: impl From<BankDebitData> for api_models::payments::additional_info::BankDebitAdditionalData
- impl: impl From<BankTransferData> for api_models::payments::additional_info::BankTransferAdditionalData
- impl: impl From<RealTimePaymentData> for api_models::payments::RealTimePaymentData
- impl: impl From<OpenBankingData> for api_models::payments::OpenBankingData
**crates/masking/src/lib.rs**
Add:
- mod: pub::masked_string
**crates/masking/src/masked_string.rs**
Add:
- function: private::apply_mask
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- struct: pub::MaskedSortCode
- struct: pub::MaskedRoutingNumber
- struct: pub::MaskedBankAccount
- struct: pub::MaskedIban
- impl: impl SerializableSecret for MaskedSortCode
- impl: impl From<String> for MaskedSortCode
- impl: impl SerializableSecret for MaskedRoutingNumber
- impl: impl From<String> for MaskedRoutingNumber
- impl: impl SerializableSecret for MaskedBankAccount
- impl: impl From<String> for MaskedBankAccount
- impl: impl SerializableSecret for MaskedIban
- impl: impl From<String> for MaskedIban
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
|
{"issue_number": 5652, "pr_number": 5661, "commits_count": 1, "files_changed": 10, "response_length": 4621, "file_count": 10, "needs_breakdown": true}
|
[REFCTOR]: Move CustomerAcceptance type to `common_types`
`CustomerAcceptance` is currently defined separately in `api_models` and `hyperswitch_domain_models`. These types are exactly the same, so they can be moved to `common_types`.
Additionally, in V2, we can use this strict type in `diesel_models` as well, instead of having a `SecretSerdeValue`
|
<think>
PR Context:
- Title: refactor: Move CustomerAcceptance to common_types
- Merged: 2025-06-25T06:30:07Z
- Files changed: 30 files
- Commits: 11 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 -->
- Moved `CustomerAcceptance`, `AcceptanceType`, `OnlineMandate` to `common_types`
- Removed unnecessary conversions from the code
- Changed `payment_attempt` domain model and diesel model in v2 to use strict type
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: Move CustomerAcceptance to common_types (#8299)
Co-authored-by: hyperswitch-bot[bot] <1485
Files to modify:
**crates/api_models/src/mandates.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Remove:
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
**crates/common_types/src/payments.rs**
Add:
- function: pub::get_ip_address
- function: pub::get_user_agent
- function: pub::get_accepted_at
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
- impl: impl CustomerAcceptance
- impl: impl masking::SerializableSecret for CustomerAcceptance
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/mandates.rs**
Remove:
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: pub::get_ip_address
- function: pub::get_user_agent
- function: pub::get_accepted_at
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
- impl: impl From<ApiCustomerAcceptance> for CustomerAcceptance
- impl: impl From<CustomerAcceptance> for ApiCustomerAcceptance
- impl: impl From<ApiAcceptanceType> for AcceptanceType
- impl: impl From<AcceptanceType> for ApiAcceptanceType
- impl: impl From<ApiOnlineMandate> for OnlineMandate
- impl: impl From<OnlineMandate> for ApiOnlineMandate
- impl: impl CustomerAcceptance
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/compatibility/stripe/payment_intents/types.rs**
Modify existing code
**crates/router/src/core/mandate.rs**
Modify existing code
**crates/router/src/core/mandate/helpers.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/setup_mandate_flow.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/routing/transformers.rs**
Modify existing code
**crates/router/src/core/payments/session_operation.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payments/vault_session.rs**
Modify existing code
**crates/router/src/services/kafka/payment_attempt.rs**
Modify existing code
**crates/router/src/services/kafka/payment_attempt_event.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 8298, "pr_number": 8299, "commits_count": 1, "files_changed": 30, "response_length": 4477, "file_count": 33, "needs_breakdown": true}
|
fix(router): make customer id mandatory when address or setup future usage given
## Type of Change
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Make customer ID mandatory when addresses or setup_future_usage are given.
### Additional Changes
Nil
## Motivation and Context
Customer id is required when addresses are given for GDPR compliance. It's also required when setup future usage is given since the payment method needs to be saved and associated with the given customer.
## How did you test it?
Stripe payments.
- **PaymentCreate**: when confirm = true and setup_future_usage is given but not customer id.
<img width="959" alt="image" src="https://user-images.githubusercontent.com/47862918/210523840-9cd204c6-9725-4dd8-8ea7-d8e6482ee151.png">
- **PaymentUpdate**: confirm = true, but customer id not given. Note that neither address nor setup future usage is given in the request. However it was given in the PaymentCreate request, i.e. verification needs to be done against values present in the database as well.
<img width="959" alt="image" src="https://user-images.githubusercontent.com/47862918/210524379-2755df4f-8405-439f-bdb1-a8657549ae6e.png">
- **PaymentConfirm**: similar to **PaymentUpdate**
<img width="959" alt="image" src="https://user-images.githubusercontent.com/47862918/210524536-35f5f4ec-02bb-48e7-8765-591cbf93bbde.png">
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: fix(router): better positioning for mandatory customer id conditions
- Merged: 2023-01-12T19:50:19Z
- 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
- [ ] Refactoring
- [ ] Dependency updates
## Description
<!-- Describe your changes in detail -->
Customer ID is mandatory when an address or setup_future_usage is given. This was not being checked properly, leading to some edge cases. This PR fixes that.
### Additional Changes
None
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configu
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(router): better positioning for mandatory customer id conditions (#364)
Files to modify:
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
|
{"issue_number": 282, "pr_number": 364, "commits_count": 1, "files_changed": 4, "response_length": 1233, "file_count": 6, "needs_breakdown": false}
|
refactor: Separate out recovery codes from TOTP
Even though recovery codes is dependent entity on TOTP. But the new findings suggest that TOTP is a part of entity called 2FA and TOTP is depended on the 2FA entity not the TOTP entity.
This will be more clear when we add multiple 2FAs like SMS OTP.
So, we want to separate out recovery codes from the TOTP. This means `begin_totp` should not return the recovery codes anymore.
|
<think>
PR Context:
- Title: feat(users): Add redis in Begin and Verify TOTP and create a new API that updates TOTP
- Merged: 2024-05-29T10:23:42Z
- Files changed: 10 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 -->
- Begin TOTP will now insert the TOTP secret in redis instead of DB directly, which allows the old secret to stay if it exists and recovery codes are also removed from Begin TOTP.
- Verify TOTP will now send 200 OK and puts the timestamp in t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): Add redis in Begin and Verify TOTP and create a new API that updates TOTP (#4765)
Files to modify:
**crates/api_models/src/user.rs**
Modify existing code
**crates/router/src/consts/user.rs**
Modify existing code
**crates/router/src/core/errors/user.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Add:
- function: pub::totp_update
**crates/router/src/utils/user.rs**
Add:
- function: pub::get_redis_connection
**crates/router/src/utils/user/two_factor_auth.rs**
Add:
- function: pub::insert_totp_in_redis
- function: pub::insert_totp_secret_in_redis
- function: pub::get_totp_secret_from_redis
- function: pub::delete_totp_secret_from_redis
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 4707, "pr_number": 4765, "commits_count": 1, "files_changed": 10, "response_length": 1783, "file_count": 12, "needs_breakdown": false}
|
feat(core): implement `NameType` for name validation
## 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 -->
for card holder name in cards, validation is added before creation of request to flag invalid data in case it is present.
Reference is taken from Visa Documetation
<img width="889" alt="image" src="https://github.com/user-attachments/assets/02859794-8313-46fb-a2b2-33a009a03600">
### 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)?
-->
Tested through Postman:
- Create a MCA (Cybersource):
Case 1: Create a Payment with valid name:
```
{
"amount": 499,
"currency": "EUR",
"confirm": true,
"capture_method": "automatic",
"customer_id": "test_rec7",
"email": "[email protected]",
"customer_acceptance": {
"acceptance_type": "online"
},
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "Sakil Mostak",
"card_cvc": "737",
"card_network": "Visa"
}
},
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"authentication_type": "no_three_ds"
}
```
- The payment should succeed, below is an example:
```
{
"payment_id": "pay_7YANCrkBMUVJngRBg36l",
"merchant_id": "merchant_1737373987",
"status": "succeeded",
"amount": 499,
"net_amount": 499,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 499,
"connector": "cybersource",
"client_secret": "pay_7YANCrkBMUVJngRBg36l_secret_jp4t6pcoJTnMFrQsGd1R",
"created": "2025-01-20T17:52:24.651Z",
"currency": "EUR",
"customer_id": "test_rec7",
"customer": {
"id": "test_rec7",
"name": null,
"email": "[email protected]",
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "Sakil Mostak",
"payment_checks": {
"avs_response": {
"code": "X",
"codeRaw": "I1"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_7usZJrOsD3Qoy6kLGDnQ",
"shipping": null,
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"order_details": null,
"email": "[email protected]",
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "test_rec7",
"created_at": 1737395544,
"expires": 1737399144,
"secret": "epk_b4c0b9ee60c844dd88e6cbc9daa9e7cb"
},
"manual_retry_allowed": false,
"connector_transaction_id": "7373955459786405604807",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_7YANCrkBMUVJngRBg36l_1",
"payment_link": null,
"profile_id": "pro_VcDn0jWTcCmofCpz2CAH",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_KXO79qkYuOXsSZCYByGz",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-01-20T18:07:24.651Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-01-20T17:52:26.511Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Case 2: Create a Payment with invalid name:
```
{
"amount": 499,
"currency": "EUR",
"confirm": true,
"capture_method": "automatic",
"customer_id": "test_rec7",
"email": "[email protected]",
"customer_acceptance": {
"acceptance_type": "online"
},
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "S@k*l M0st@k",
"card_cvc": "737",
"card_network": "Visa"
}
},
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"authentication_type": "no_three_ds"
}
```
Response should contain 400 error with below response:
```
{
"error": {
"error_type": "invalid_request",
"message": "Json deserialize error: invalid character found in card holder name: @ at line 23 column 5",
"code": "IR_06"
}
}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [x] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: revert: implement `NameType` for name validation (#6734)
- Merged: 2025-04-03T13:50:46Z
- Files changed: 30 files
- Commits: 1 commits
Implementation approach:
This reverts commit 1100dcc6053990cf832c00cf29db700d77f78480.
## 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 -->
This PR revert #6734 in main
Reason: digit couldn't be added to nickname because nickname have the same validation as cardholder name.
### Additional Changes
- [ ] This P
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6734, "pr_number": 7717, "commits_count": 0, "files_changed": 30, "response_length": 787, "file_count": 0, "needs_breakdown": false}
|
[FEATURE]: [PayU] 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): [PayU] Use connector_request_reference_id
- Merged: 2024-10-25T11:31:30Z
- 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
Add connector_request_reference_id support for PayU
- Used `extOrderId` as the reference id based on the [PayU documentation](https://developers.payu.com/europe/api/#tag/Order/operation/create-an-order) reference:
: [PayU] Use connector_request_reference_id (#6360)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/payu/transformers.rs**
Modify existing code
|
{"issue_number": 2313, "pr_number": 6360, "commits_count": 1, "files_changed": 1, "response_length": 969, "file_count": 3, "needs_breakdown": false}
|
refactor(webhooks): Fix incoming webhooks failure
## 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 bug due to Webhooks PR [#9400](https://github.com/juspay/hyperswitch/pull/9400), causing all incoming webhooks to fail for merchant
### 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)?
-->
create mca
```
curl --location 'http://localhost:8080/account/merchant_1760636753/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JdLBPK2w3gB4bHchG31ybzh****GyJ4RFnMMcxJG8FAwhHLErlHqs5hl' \
--data '{
"connector_type": "payment_processor",
"connector_account_details": {
"auth_type": "CurrencyAuthKey",
"auth_key_map": {
"EUR": {
"password_classic": "a6p6EpRzQfP***kfFKmDf8LfV",
"username_classic": "1bc20b0a_user",
"merchant_id_classic": "1bc20b0a"
},
"USD": {
"password_evoucher": "mEb96Vg3HQC***jD8tYa9R8Zbgnmr",
"username_evoucher": "befb46ee_user",
"merchant_id_evoucher": "befb46ee"
}
}
},
"connector_name": "cashtocode",
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "reward",
"payment_method_types": [
{
"payment_method_type": "classic",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"EUR"
]
}
},
{
"payment_method_type": "evoucher",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"EUR"
]
}
}
]
}
],
"metadata": {
"terminal_id": "10000001"
},
"connector_webhook_details": {
"merchant_secret": "a87ff679a2f3e71***1a67b7542122c"
},
"business_country": "US",
"business_label": "default"
}'
```
Response
```
{
"connector_type": "payment_processor",
"connector_name": "cashtocode",
"connector_label": "cashtocode_US_default",
"merchant_connector_id": "mca_7rw65eSUR99zkKvb8v8u",
"profile_id": "pro_FGbp0C6hiVNYAdQv48g6",
"connector_account_details": {
"auth_type": "CurrencyAuthKey",
"auth_key_map": {
"EUR": {
"password_classic": "a6p6EpRzQfP***FKmDf8LfV",
"username_classic": "1bc20b0a_user",
"merchant_id_classic": "1bc20b0a"
},
"USD": {
"password_evoucher": "mEb96Vg3H******B3nWjD8tYa9R8Zbgnmr",
"username_evoucher": "befb46ee_user",
"merchant_id_evoucher": "befb46ee"
}
}
},
"payment_methods_enabled": [
{
"payment_method": "reward",
"payment_method_types": [
{
"payment_method_type": "classic",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "evoucher",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": {
"type": "enable_only",
"list": [
"USD",
"EUR"
]
},
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"connector_webhook_details": {
"merchant_secret": "a87ff679a2f3e718**181a67b7542122c",
"additional_secret": null
},
"metadata": {
"terminal_id": "10000001"
},
"test_mode": true,
"disabled": false,
"frm_configs": null,
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null
}
```
Payment Create
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JdLBPK2w3gB4bHch*****vwmGyJ4RFnMMcxJG8FAwhHLErlHqs5hl' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": true,
"payment_method_data": "reward",
"profile_id": "pro_FGbp0C6hiVNYAdQv48g6",
"payment_method_type": "evoucher",
"payment_method":"reward",
"capture_method": "automatic",
"browser_info": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"language": "en-US",
"color_depth": 24,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true
},
"customer_id": "cus_5ZiQdWmdv9efuLCPWeoN",
"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://www.google.com",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "sundari"
},
"phone": {
"number": "1233456789",
"country_code": "+1"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "sundari"
},
"phone": {
"number": "1233456789",
"country_code": "+1"
}
},
"business_country": "US",
"business_label": "default"
}'
```
Response
```
{
"payment_id": "pay_dJTZFuge6Ltm3kXOBCuf",
"merchant_id": "merchant_1760636753",
"status": "requires_customer_action",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 1000,
"amount_received": null,
"connector": "cashtocode",
"client_secret": "pay_dJTZFuge6Ltm3kXOBCuf_secret_eoFLdZp6DkR1NJx2Ompo",
"created": "2025-10-16T17:46:12.420Z",
"currency": "USD",
"customer_id": "cus_5ZiQdWmdv9efuLCPWeoN",
"customer": {
"id": "cus_5ZiQdWmdv9efuLCPWeoN",
"name": "John Doe",
"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": "automatic",
"payment_method": "reward",
"payment_method_data": "reward",
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "sundari",
"last_name": null,
"origin_zip": null
},
"phone": {
"number": "1233456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "sundari",
"last_name": null,
"origin_zip": null
},
"phone": {
"number": "1233456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://www.google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_dJTZFuge6Ltm3kXOBCuf/merchant_1760636753/pay_dJTZFuge6Ltm3kXOBCuf_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "evoucher",
"connector_label": "cashtocode_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cus_5ZiQdWmdv9efuLCPWeoN",
"created_at": 1760636772,
"expires": 1760640372,
"secret": "epk_4ad26e434d0d4350a5a985c74863082a"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pay_dJTZFuge6Ltm3kXOBCuf_1",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": null,
"payment_link": null,
"profile_id": "pro_FGbp0C6hiVNYAdQv48g6",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_7rw65eSUR99zkKvb8v8u",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-10-16T18:01:12.420Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-10-16T17:46:13.479Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"request_extended_authorization": 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,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null,
"is_stored_credential": null,
"mit_category": null
}
```
Incoming Webhook with connector name
```
curl --location 'http://localhost:8080/webhooks/merchant_1760636753/cashtocode' \
--header 'Content-Type: application/json' \
--header 'authorization: **************' \
--header 'api-key: dev_JdLBPK2w3gB4bHch*******wmGyJ4RFnMMcxJG8FAwhHLErlHqs5hl' \
--data '{
"amount": 10.00,
"currency": "eur",
"foreignTransactionId": "eidfuhiu",
"type": "sadbjjb",
"transactionId": "pay_dJTZFuge6Ltm3kXOBCuf_1"//added _1 in payment_id
}'
```
Response
```
{
"status": "EXECUTED",
"transactionId": "pay_dJTZFuge6Ltm3kXOBCuf_1"
}
```
Incoming Webhook with mac_id
```
curl --location 'http://localhost:8080/webhooks/merchant_1760636753/mca_7rw65eSUR99zkKvb8v8u' \
--header 'Content-Type: application/json' \
--header 'authorization: **************' \
--header 'api-key: dev_JdLBPK2w3gB4bH*******svwmGyJ4RFnMMcxJG8FAwhHLErlHqs5hl' \
--data '{
"amount": 10.00,
"currency": "eur",
"foreignTransactionId": "eidfuhiu",
"type": "sadbjjb",
"transactionId": "pay_3zDYFekDMNVugUbWOgoM_1"//added _1 in payment_id
}'
```
Response
```
{
"status": "EXECUTED",
"transactionId": "pay_3zDYFekDMNVugUbWOgoM_1"
}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: refactor(webhooks): Fix incoming webhooks failure
- Merged: 2025-10-16T20:17:27Z
- 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 -->
Main PR [#9894](https://github.com/juspay/hyperswitch/pull/9894)
This pr fixes bug due to Webhooks PR 9400, causing all incoming webhooks to fail for merchant
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 9894, "pr_number": 9897, "commits_count": 0, "files_changed": 1, "response_length": 779, "file_count": 0, "needs_breakdown": false}
|
Refactor(core): Inclusion of constraint graph for merchant Payment Method list
## 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 -->
Adds CGraphing for Merchant Pms with all the possible filters applicable as described below.
# Addressed in this PR:
## 1 Creation of Constraint Graph for Merchant Payment Method List:
Created a Constraint Graph with the following filters/Nodes:
From configs and MCA:
1. Countries Filter
2. Currency Filter
3. Supported for Mandates Filter
4. Allowed Payment Method Types
5. Supported for Update Mandates Filter
6. Capture Method Used
From Req:
1. Recurring Enabled
2. Installment Enabled
3. Amount Based
After Applying all these Filters and creating a Graph for a Merchant MCA with 2 PMT enabled (Credit and Debit) with one connector(Cybersource), We will get a graph equivalent to [this](https://dreampuf.github.io/GraphvizOnline/?compressed=M4FwTglgxiAEAmEDmYCGAHAFrKB7AdqGhPiAPoobYDeAULA7AHIAMA2gDaoBGAphwF4AROlQBPALa9SZKSEy54sATlRh4QgLr1GTAIyce-YaMnTyIMel7LYAV3TxUIXrNT4nLrToZMATIZ8gkIAwgT4vDC4YLAksGxQYnxgwLh2YFC8mt6MzADMgcZCAGTFOboALIXBAD6wNeW%2BAKzVJuJSMpbWthEA7m4ezryNzABsraHhkSDRsfjxEQAeJLwgwAA0sBJ2HCAQwKgAZrymm-gSEJuodvLREABevPC4IBEgm73RHPCnsEQQ1jOuAIm247gA1rhDqgpJAoKhNolkql0plNkgOLgwRxfqh4GJpNltLkmAB2CalEZMAAcE1MHQsVhsKnwBAGnmGxN0AE46e1zGQusy-qsHOyhlS9OwuEFhHUGlzfHoDDKivLJQFVcF4eoyG9PmBwXN4gA1fYI2AAWVQoF4GTU8CJPmYegKWuE3AgHA4JCQZDwdlIYDExrYACkMO5NgBVfAQFzwADKICGwAA8ocAIKw6CoJ0kvRVd1CT3e33%2BtJBkNxNgASQ8EAtsfjT2TqYz2btuc2mbsRFQPrzkpaxcpipd42LUHSYGkiVDtaYACV87o9OSpzO59X5nXl6ulbTR2Vx-peceqX5pUZtQ7BUzbPBeJ6QJeVTfhGF8BEojEa0i7RRDIskvTUPxKE9nX8N1wPVU8-CLcCvx-GY-13JYVjWTZtl2c1jl%2Bc5Llga5bkgR5nleVYPi%2BH5xERJJALSYD0UxbFcXxaRNn%2BQFYFZEFYDBfBIWhHN4QPZg-BHcCxygvxJ1g%2BpLw3BSFVko9wPhdAQHSVw5AUJQVAkdw7AHS9zw0u99WiI0azNA5NmtW17XUcSmDya9ZRLL0fXwP0AyrUMI1EfAYzjBM2xcdMs1EodTzyd9PNLHy-MrcAd3iIKo1gXt%2B0HUKWyTFNIo7GLNlrNAAEdXLyMDPJkkk8hgzzpzAWd8HnGtFxXKk8kQ5qt3a9K926uKpLqyCGvk8aeuU5q7yFWwoFnRBX20KCWFgABaAA%2BfJ4jUMBcF6TBeDxARWTAIyOAuq71jwTEwAEbgODsLIoL0Lbdrc-bWqOk6zpugdAY4O7cAep6Xrekk-E%2Bva2AOv7Tvgc7oiu4HQfB57Xri2GmAqH7DuOpGUcuoHUYHDHogh7GoKaXHSQJxGAfJ66Wcpx6sah3RRnpxmieZ0nWcF9nqa53xqVxqU%2Bf%2B5HgfR%2B6qc509uUljb4d%2B-nZZZ%2BWwcVyHT3xnaXQ%2B9XCZlkm0bZhWOf1qCGaN-QTYRzWLbJ4XrdF08pYd5VpeJuWrd1m2aYLPJJbp02ma1wWdcx22C0Nr69Aj53zYD92g8996eZ9iXI5d9Pbo9pX3vtpO89T-3tcDuOQ7XD6fZV-O0%2BrjPa7Fl0Ycbv2zoIGu9brpU6e75uq5j-vg47-QJZHyuBcttuB6nvQVYdq8e%2Bjhei8zkuSQ2teYdH%2Be3e39uvdxvxD7nzeT4p4v490PwG6%2By%2BN9doXT6X%2BCu5fsOj5vj%2Bd8d4P2aBfFOGsW7j0XpPeCicJLgLNmPLeQCz5QRni-Hm-936xy-lBVeGC36FxQbg6GYc14MywUQkG99B7wIvhQ6%2B2CJ5Z2hjnF%2BDCIFINvtQ4BtC3L7y%2BjVQhrdP4wKgvFXGQjKEiOIWIhqZDBEIKjkw6BLDdC9UkUoguMieGoOhmXfImDGFUJFrvR%2B6DDHCKgaIgQy14L4MsVgvuqizG%2BCEQ7PIRjOHH0Abokh6jh6CK8YgnxOC5HqLYfkDhISAFhKzgAX1oEAA#strict%20digraph%20constraint_graph%20%7B%0A%20%20%20%20N0%5Blabel%3D%22payment_method%20%3D%20card%22%5D%0A%20%20%20%20N1%5Blabel%3D%22payment_type%20%3D%20update_mandate%22%5D%0A%20%20%20%20N2%5Blabel%3D%22Connector%20in%20%5Bcybersource%5D%22%5D%0A%20%20%20%20N3%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N4%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N5%5Blabel%3D%22payment_type%20%3D%20new_mandate%22%5D%0A%20%20%20%20N6%5Blabel%3D%22Connector%20in%20%5Bnexinets%2C%20multisafepay%2C%20nmi%2C%20authorizedotnet%2C%20worldpay%2C%20stripe%2C%20noon%2C%20bankofamerica%2C%20cybersource%2C%20globalpay%2C%20adyen%5D%22%5D%0A%20%20%20%20N7%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N8%5Blabel%3D%22payment_type%20%3D%20non_mandate%22%5D%0A%20%20%20%20N9%5Blabel%3D%22payment_type%20%3D%20setup_mandate%22%5D%0A%20%20%20%20N10%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N11%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N12%5Blabel%3D%22card_network%20in%20%5BVisa%2C%20Mastercard%5D%22%5D%0A%20%20%20%20N13%5Blabel%3D%22billing_country%20in%20%5BJapan%2C%20UnitedStatesOfAmerica%5D%22%5D%0A%20%20%20%20N14%5Blabel%3D%22billing_country%20in%20%5BIndia%2C%20UnitedStatesOfAmerica%2C%20Australia%5D%22%5D%0A%20%20%20%20N15%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N16%5Blabel%3D%22currency%20in%20%5BINR%5D%22%5D%0A%20%20%20%20N17%5Blabel%3D%22currency%20in%20%5BINR%5D%22%5D%0A%20%20%20%20N18%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N19%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N20%5Blabel%3D%22card_type%20%3D%20debit%22%5D%0A%20%20%20%20N21%5Blabel%3D%22Connector%20in%20%5Bcybersource%5D%22%5D%0A%20%20%20%20N22%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N23%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N24%5Blabel%3D%22Connector%20in%20%5Bnexinets%2C%20multisafepay%2C%20nmi%2C%20authorizedotnet%2C%20worldpay%2C%20cybersource%2C%20globalpay%2C%20adyen%2C%20stripe%2C%20noon%2C%20bankofamerica%5D%22%5D%0A%20%20%20%20N25%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N26%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N27%5Blabel%3D%22%7C%20%7C%22%5D%0A%20%20%20%20N28%5Blabel%3D%22capture_method%20%3D%20manual%22%5D%0A%20%20%20%20N29%5Blabel%3D%22card_network%20in%20%5BVisa%2C%20Mastercard%5D%22%5D%0A%20%20%20%20N30%5Blabel%3D%22billing_country%20in%20%5BJapan%2C%20UnitedStatesOfAmerica%5D%22%5D%0A%20%20%20%20N31%5Blabel%3D%22billing_country%20in%20%5BJapan%2C%20Australia%2C%20UnitedStatesOfAmerica%2C%20Iraq%5D%22%5D%0A%20%20%20%20N32%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N33%5Blabel%3D%22currency%20in%20%5BINR%5D%22%5D%0A%20%20%20%20N34%5Blabel%3D%22currency%20in%20%5BINR%5D%22%5D%0A%20%20%20%20N35%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N36%5Blabel%3D%22%26%26%22%5D%0A%20%20%20%20N37%5Blabel%3D%22card_type%20%3D%20credit%22%5D%0A%0A%20%20%20%20N0%20-%3E%20N3%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N1%20-%3E%20N3%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N2%20-%3E%20N3%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N3%20-%3E%20N4%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N5%20-%3E%20N7%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N6%20-%3E%20N7%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N8%20-%3E%20N10%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N9%20-%3E%20N10%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N4%20-%3E%20N11%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N7%20-%3E%20N11%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N10%20-%3E%20N11%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N13%20-%3E%20N15%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N14%20-%3E%20N15%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N16%20-%3E%20N18%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N17%20-%3E%20N18%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N11%20-%3E%20N19%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N12%20-%3E%20N19%20%5Barrowhead%3Donormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N15%20-%3E%20N19%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N18%20-%3E%20N19%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N19%20-%3E%20N20%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N0%20-%3E%20N22%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N1%20-%3E%20N22%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N21%20-%3E%20N22%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N22%20-%3E%20N23%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N5%20-%3E%20N25%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N24%20-%3E%20N25%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N8%20-%3E%20N26%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N9%20-%3E%20N26%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N23%20-%3E%20N27%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N25%20-%3E%20N27%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N26%20-%3E%20N27%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N30%20-%3E%20N32%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N31%20-%3E%20N32%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N33%20-%3E%20N35%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N34%20-%3E%20N35%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N27%20-%3E%20N36%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N28%20-%3E%20N36%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dred%5D%0A%20%20%20%20N29%20-%3E%20N36%20%5Barrowhead%3Donormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N32%20-%3E%20N36%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N35%20-%3E%20N36%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%20%20%20%20N36%20-%3E%20N37%20%5Barrowhead%3Dnormalnormal%2Ccolor%3Dblue%5D%0A%7D%0A)

Henceforth, we will verify the constraints by constructing Context from our PaymentIntent and PaymentAttempt.
PM List for Merchant curl:
```
curl --location 'http://127.0.0.1:8080/account/payment_methods?client_secret=pay_RtUquUfJt9sSheQNpqdR_secret_6BOkQMk1fYNq5zCgOdYr' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_423ae8fdc10d4db0bf28eda1662f51a3' \
--data ''
```
## 2 Moka Caching of Pm Filter Graph:
We have even implemented Moka(In memory) Cashing mechanism for our CGraph to minimize the latency. So for every request first the cache value will be checked if present, derived and used else CGraph will be constructed and the cache will be refreshed.
<img width="1715" alt="Screenshot 2024-05-23 at 14 54 28" src="https://github.com/juspay/hyperswitch/assets/61520228/ff29e436-743f-43ca-92fb-93447d9a48e9">
### 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`
7. `crates/router/src/configs`
8. `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)?
-->
Testing requires creation/refactoring of our configs:
The configs followed are as follows:-
```
[pm_filters.stripe]
google_pay = { country = "CN" }
apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HU,IS,IE,IM,IT,KZ,JE,LV,LI,LT,LU,MT,MD,MC,ME,NL,NO,PL,PT,RO,SM,RS,SK,SI,ES,SE,CH,UA,GB,AR,CO,CR,BR,MX,PE,BH,IL,JO,KW,PS,QA,SA,AE,CA,UM,US,KR,VN,MA,ZA,VA,CL,SV,GT,HN,PA" }
[pm_filters.cybersource]
credit = { not_available_flows = { capture_method = "manual" }, country = "AU, JP, IQ, US", currency = "INR"}
google_pay = { country = "AU,US", currency = "INR" }
debit = { country = "AU,IN, US", currency = "INR" }
```
## Flow followed
### Request 1: mca create request (Cybersource)
```
curl --location 'http://127.0.0.1:8080/account/merchant_1716536756/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "fiz_operations",
"business_country": "US",
"business_label": "default",
"connector_name": "cybersource",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_key": "xxxx",
"api_secret": "xxxxx",
"key1": "juspay_us_sandbox"
},
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": {
"type": "enable_only",
"list": [
"INR"
]
},
"accepted_countries": {
"type": "enable_only",
"list": [
"JP",
"US"
]
},
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": {
"type": "all_accepted"
},
"accepted_countries": {
"type": "enable_only",
"list": [
"JP",
"US"
]
},
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"connector_webhook_details": {
"merchant_secret": "chethanaaaa"
}
}'
```
### Request 2: mca create request (Stripe)
```
curl --location 'http://127.0.0.1:8080/account/merchant_1716536756/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "fiz_operations",
"connector_name": "stripe",
"business_country": "US",
"business_label": "default",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "{{connector_api_key}}"
},
"test_mode": false,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "affirm"
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "klarna"
}
]
},
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "ideal",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "eps",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "sepa",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_transfer",
"payment_method_types": [
{
"payment_method_type": "sepa",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"card_networks": [
"AmericanExpress",
"Discover",
"Interac",
"JCB",
"Mastercard",
"Visa",
"DinersClub",
"UnionPay",
"RuPay"
]
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"card_networks": [
"AmericanExpress",
"Discover",
"Interac",
"JCB",
"Mastercard",
"Visa",
"DinersClub",
"UnionPay",
"RuPay"
]
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "google_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "we_chat_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"metadata": {
"google_pay": {
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
]
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "example",
"gateway_merchant_id": "{{gateway_merchant_id}}"
}
}
}
],
"merchant_info": {
"merchant_name": "PK"
}
}
}
}'
```
### Request 3: Payment Create Request (with `capture_method = manual`)
```
curl --location 'http://127.0.0.1:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_ee3RmaC8hkDWCibMrIk8AVzIzn1mK0yrQq5dJImuhr61np4mMHcRlGNFATZp0rcQ' \
--data-raw '
{
"amount": 6540,
"currency": "INR",
"confirm": false,
"capture_method": "manual",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "cus26",
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"routing": {
"type": "single",
"data": "stripe"
}
}
'
```
### Request 3: List Merchant Payment Methods
```
curl --location 'http://127.0.0.1:8080/account/payment_methods?client_secret=pay_pjPrnplx4iezrnZVq9OP_secret_G0Oc8N6SoTMKJpfYMEqZ' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_a5ea68aa142c4bb8ad07d0570166d26a' \
--data ''
```
**Response**
Google pay won't come as we have added in configs allowed country as CN
Payment Type Card(Credit) also won't come as the configs for credit has `not_available_flows = manual`
```
{
"redirect_url": "https://google.com/success",
"currency": "INR",
"payment_methods": [
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"stripe"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {},
"surcharge_details": null,
"pm_auth_connector": null
},
{
"payment_method_type": "we_chat_pay",
"payment_experience": [
{
"payment_experience_type": "invoke_sdk_client",
"eligible_connectors": [
"stripe"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "affirm",
"payment_experience": [
{
"payment_experience_type": "redirect_to_url",
"eligible_connectors": [
"stripe"
]
}
],
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
{
"card_network": "Visa",
"surcharge_details": null,
"eligible_connectors": [
"cybersource",
"stripe"
]
},
{
"card_network": "JCB",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "UnionPay",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "AmericanExpress",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "Discover",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "Interac",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "RuPay",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "DinersClub",
"surcharge_details": null,
"eligible_connectors": [
"stripe"
]
},
{
"card_network": "Mastercard",
"surcharge_details": null,
"eligible_connectors": [
"cybersource",
"stripe"
]
}
],
"bank_names": null,
"bank_debits": null,
"bank_transfers": null,
"required_fields": {
"billing.address.last_name": {
"required_field": "payment_method_data.billing.address.last_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": "Doe"
},
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "card_holder_name",
"field_type": "user_full_name",
"value": "joseph"
},
"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_number": {
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
"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.zip": {
"required_field": "payment_method_data.billing.address.zip",
"display_name": "zip",
"field_type": "user_address_pincode",
"value": "94122"
},
"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
},
"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
},
"email": {
"required_field": "email",
"display_name": "email",
"field_type": "user_email_address",
"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.state": {
"required_field": "payment_method_data.billing.address.state",
"display_name": "state",
"field_type": "user_address_state",
"value": "California"
},
"billing.address.country": {
"required_field": "payment_method_data.billing.address.country",
"display_name": "country",
"field_type": {
"user_address_country": {
"options": [
"ALL"
]
}
},
"value": "US"
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "sepa",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": {
"eligible_connectors": [
"stripe"
]
},
"bank_transfers": null,
"required_fields": {
"billing.address.first_name": {
"required_field": "payment_method_data.billing.address.first_name",
"display_name": "billing_first_name",
"field_type": "user_billing_name",
"value": "joseph"
}
},
"surcharge_details": null,
"pm_auth_connector": null
}
]
},
{
"payment_method": "bank_transfer",
"payment_method_types": [
{
"payment_method_type": "sepa",
"payment_experience": null,
"card_networks": null,
"bank_names": null,
"bank_debits": null,
"bank_transfers": {
"eligible_connectors": [
"stripe"
]
},
"required_fields": null,
"surcharge_details": null,
"pm_auth_connector": null
}
]
}
],
"mandate_payment": null,
"merchant_name": "Prajjwal",
"show_surcharge_breakup_screen": false,
"payment_type": "normal"
}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: Refactor(core): Reverts Inclusion of constraint graph for merchant Payment Method list
- Merged: 2024-05-31T13:16:22Z
- Files changed: 7 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#4626
This PR needs some more refactors as currently it is mapped to checking whether or not currency and country is present in MCA. If not ignore configs as well. Which shouldn't be the ideal scenario.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** Refactor(core): Reverts Inclusion of constraint graph for merchant Payment Method list (#4839)
Files to modify:
**crates/euclid/src/enums.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Remove:
- mod: pub::utils
**crates/router/src/core/payment_methods/cards.rs**
Add:
- function: private::filter_pm_based_on_supported_payments_for_mandate
- function: private::filter_pm_based_on_capture_method_used
- function: private::card_network_filter
- function: private::global_country_currency_filter
- function: private::filter_pm_card_network_based
- function: private::filter_pm_country_based
- function: private::filter_pm_currencies_based
- function: private::filter_accepted_enum_based
- function: private::filter_pm_based_on_allowed_types
- function: private::filter_payment_country_based
- function: private::filter_payment_currency_based
**crates/router/src/core/payment_methods/utils.rs**
Remove:
- function: pub::make_pm_graph
- function: pub::get_merchant_pm_filter_graph
- function: pub::refresh_pm_filters_cache
- function: private::compile_pm_graph
- function: private::construct_capture_method_node
- function: private::construct_supported_connectors_for_update_mandate_node
- function: private::construct_supported_connectors_for_mandate_node
- function: private::compile_accepted_countries_for_mca
- function: private::compile_accepted_currency_for_mca
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/storage_impl/src/redis/cache.rs**
Modify existing code
**crates/storage_impl/src/redis/pub_sub.rs**
Modify existing code
|
{"issue_number": 4626, "pr_number": 4839, "commits_count": 1, "files_changed": 7, "response_length": 2246, "file_count": 9, "needs_breakdown": false}
|
feat(api_client): add api client trait
## 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 -->
Currently we use a shared client via once cell to prevent the CPU overhead associated with creating a new `reqwest::Client`
Instead I'd propose to use a trait that can be used for defining this behavior associated with making API calls while re-using the reqwest::Client
There are 2 distinct components for this design
1. ApiClient (to be shared throughout the app & holds the underlying tcp sockets/connections etc)
2. RequestBuilder (Generated each time an request is to be made holds info specific to that request)
Both of the above components are represented as a trait ^
```rs
pub trait RequestBuilder: Send + Sync {
/// I'm constrained to not using generics anywhere in this trait as to make it still possible to build a vtable for dyn dispatch
/// fn json<T: Serialize>(&mut self, body: T); won't work since I won't be able to build a dyn dispatch trait out of this
/// fn json<T: Serialize>(&mut self, body: &T); Although using reference of the generic might work
/// ^^^will get to this once I verify that we don't need ownership of this struct
fn json(&mut self, body: serde_json::Value);
fn url_encoded_form(&mut self, body: serde_json::Value);
fn timeout(&mut self, timeout: Duration);
fn multipart(&mut self, form: Form);
fn header(&mut self, key: String, value: Maskable<String>) -> CustomResult<(), ApiClientError>;
/// Have avoided the usage of async_trait crate here for personal preference
fn send(
self,
) -> CustomResult<Box<(dyn core::future::Future<Output = Result<reqwest::Response, reqwest::Error>> + 'static)>, ApiClientError>;
}
pub trait ApiClient
where
Self: Sized + Send + Sync,
{
fn new(
proxy_config: Proxy,
whitelisted_urls: Vec<String>,
) -> CustomResult<Self, ApiClientError>;
/// Returning a Box<dyn> here to avoid any limitations introduced by generics (mostly ergonomics)
/// can be re-considered once the integration is done
fn request<U: IntoUrl>(&self, method: Method, url: U) -> Box<dyn RequestBuilder>;
}
```
This can be used to implement a mock `ApiClient` as well to test connectors.
### 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).
-->
There are a couple of existing limitations that can be solved via this:
1. limited control over initialization of the client since the initialization info needs to be passed at all points of usage
2. reduced ergonomics & abstraction since the proxy config, whitelisted URL's, certificate info needs to be passed everywhere
3. Limitations in terms of the logging & metrics we can offer since we don't have a control/abstraction over how requests are built
4. Currently unit tests can't be run on more than 1 thread due to lazy static initialization failure on multiple threads simultaneously, now we can have a separate reqwest::Client for each thread (Or also build a mock for it)
## 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)?
-->
- This only covers the initial spec for defining the trait, matching the spec for existing ApiClient & requesting comments on the overall trait definitions & functionality
- Integration for this would be taken up separately
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [ ] 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(api): use `ApiClient` trait in AppState
- Merged: 2023-09-01T10:14:02Z
- Files changed: 15 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
This is a micro PR for introducing `ApiClient` trait in `AppState`. This PR only adds the client but doesn't use it as of now.
It builds over: #1919
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(api): use `ApiClient` trait in AppState (#2067)
Files to modify:
**crates/router/src/bin/scheduler.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/services/api/client.rs**
Remove:
- function: private::request
Add:
- function: pub::new
- function: private::request
- function: private::request_with_certificate
- impl: impl ApiClient for MockApiClient
**crates/router/src/types/storage/payment_attempt.rs**
Modify existing code
**crates/router/tests/cache.rs**
Modify existing code
**crates/router/tests/connectors/aci.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
**crates/router/tests/payments.rs**
Modify existing code
**crates/router/tests/payments2.rs**
Modify existing code
**crates/router/tests/services.rs**
Modify existing code
**crates/router/tests/utils.rs**
Modify existing code
|
{"issue_number": 1919, "pr_number": 2067, "commits_count": 1, "files_changed": 15, "response_length": 1904, "file_count": 16, "needs_breakdown": true}
|
feat(analytics): analytics APIs
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Set of analytics APIs of payments and refunds querying Postgres DB
### 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`
-->
## Motivation and Context
To enhance hyperswitch feature set, analytics APIs are being added which will be hit from the dashboard and provide aggregated view of payment and refund transaction performance.
## 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)?
-->
This can be tested via the bundled dashboard or the postman API's
## 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(analytics): feat(analytics): analytics APIs
- Merged: 2023-11-03T11:59:33Z
- Files changed: 30 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#2676
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert: fix(analytics): feat(analytics): analytics APIs (#2777)
Files to modify:
**crates/api_models/src/analytics.rs**
Remove:
- struct: pub::NameDescription
- struct: pub::GetInfoResponse
- struct: pub::TimeRange
- struct: pub::TimeSeries
- struct: pub::GetPaymentMetricRequest
- struct: pub::GetRefundMetricRequest
- struct: pub::AnalyticsMetadata
- struct: pub::GetPaymentFiltersRequest
- struct: pub::PaymentFiltersResponse
- struct: pub::FilterValue
- struct: pub::GetRefundFilterRequest
- struct: pub::RefundFiltersResponse
- struct: pub::RefundFilterValue
- struct: pub::MetricsResponse
- enum: pub::Granularity
- mod: pub::payments
- mod: pub::refunds
**crates/api_models/src/analytics/payments.rs**
Remove:
- function: private::from
- function: private::from
- function: pub::new
- function: private::hash
- function: private::eq
- struct: pub::PaymentFilters
- struct: pub::PaymentSuccessRate
- struct: pub::PaymentCount
- struct: pub::PaymentSuccessCount
- struct: pub::PaymentProcessedAmount
- struct: pub::AvgTicketSize
- struct: pub::PaymentMetricsBucketIdentifier
- struct: pub::PaymentMetricsBucketValue
- struct: pub::MetricsBucketResponse
- enum: pub::PaymentDimensions
- enum: pub::PaymentMetrics
- impl: impl From<PaymentMetrics> for NameDescription
- impl: impl From<PaymentDimensions> for NameDescription
- impl: impl PaymentMetricsBucketIdentifier
- impl: impl Hash for PaymentMetricsBucketIdentifier
- impl: impl PartialEq for PaymentMetricsBucketIdentifier
- mod: pub::metric_behaviour
**crates/api_models/src/analytics/refunds.rs**
Remove:
- function: private::from
- function: private::from
- function: private::hash
- function: private::eq
- function: pub::new
- struct: pub::RefundFilters
- struct: pub::RefundSuccessRate
- struct: pub::RefundCount
- struct: pub::RefundSuccessCount
- struct: pub::RefundProcessedAmount
- struct: pub::RefundMetricsBucketIdentifier
- struct: pub::RefundMetricsBucketValue
- struct: pub::RefundMetricsBucketResponse
- enum: pub::RefundType
- enum: pub::RefundDimensions
- enum: pub::RefundMetrics
- impl: impl From<RefundMetrics> for NameDescription
- impl: impl From<RefundDimensions> for NameDescription
- impl: impl Hash for RefundMetricsBucketIdentifier
- impl: impl PartialEq for RefundMetricsBucketIdentifier
- impl: impl RefundMetricsBucketIdentifier
- mod: pub::metric_behaviour
**crates/api_models/src/lib.rs**
Remove:
- mod: pub::analytics
**crates/common_utils/src/custom_serde.rs**
Remove:
- function: pub::serialize
- function: pub::deserialize
- mod: pub::iso8601custom
**crates/router/src/analytics.rs**
Remove:
- function: pub::get_payment_metrics
- function: pub::get_refund_metrics
- function: pub::from_conf
- function: private::default
- enum: pub::AnalyticsProvider
- enum: pub::AnalyticsConfig
- impl: impl AnalyticsProvider
- impl: impl Default for AnalyticsConfig
- mod: private::core
- mod: private::errors
- mod: pub::metrics
- mod: private::payments
- mod: private::query
- mod: private::refunds
- mod: pub::routes
- mod: private::sqlx
- mod: private::types
- mod: private::utils
**crates/router/src/analytics/core.rs**
Remove:
- function: pub::get_domain_info
- function: pub::payment_filters_core
- function: pub::refund_filter_core
**crates/router/src/analytics/errors.rs**
Remove:
- function: private::switch
- enum: pub::AnalyticsError
- impl: impl ErrorSwitch<ApiErrorResponse> for AnalyticsError
**crates/router/src/analytics/metrics.rs**
Remove:
- mod: pub::request
**crates/router/src/analytics/metrics/request.rs**
Remove:
- function: pub::add_attributes
- function: pub::record_operation_time
- function: pub::time_future
**crates/router/src/analytics/payments.rs**
Remove:
- trait: pub::PaymentAnalytics
- mod: pub::accumulator
- mod: private::core
- mod: pub::filters
- mod: pub::metrics
- mod: pub::types
**crates/router/src/analytics/payments/accumulator.rs**
Remove:
- function: private::add_metrics_bucket
- function: private::collect
- function: private::add_metrics_bucket
- function: private::collect
- function: private::add_metrics_bucket
- function: private::collect
- function: private::add_metrics_bucket
- function: private::collect
- function: pub::collect
- struct: pub::PaymentMetricsAccumulator
- struct: pub::SuccessRateAccumulator
- struct: pub::CountAccumulator
- struct: pub::SumAccumulator
- struct: pub::AverageAccumulator
- trait: pub::PaymentMetricAccumulator
- impl: impl PaymentMetricAccumulator for SuccessRateAccumulator
- impl: impl PaymentMetricAccumulator for CountAccumulator
- impl: impl PaymentMetricAccumulator for SumAccumulator
- impl: impl PaymentMetricAccumulator for AverageAccumulator
- impl: impl PaymentMetricsAccumulator
**crates/router/src/analytics/payments/core.rs**
Remove:
- function: pub::get_metrics
**crates/router/src/analytics/payments/filters.rs**
Remove:
- function: pub::get_payment_filter_for_dimension
- struct: pub::FilterRow
- trait: pub::PaymentFilterAnalytics
**crates/router/src/analytics/payments/metrics.rs**
Remove:
- function: private::load_metrics
- struct: pub::PaymentMetricRow
- trait: pub::PaymentMetricAnalytics
- trait: pub::PaymentMetric
- impl: impl PaymentMetric<T> for PaymentMetrics
- mod: private::avg_ticket_size
- mod: private::payment_count
- mod: private::payment_processed_amount
- mod: private::payment_success_count
- mod: private::success_rate
**crates/router/src/analytics/payments/metrics/avg_ticket_size.rs**
Remove:
- function: private::load_metrics
- struct: pub::AvgTicketSize
- impl: impl PaymentMetric<T> for AvgTicketSize
**crates/router/src/analytics/payments/metrics/payment_count.rs**
Remove:
- function: private::load_metrics
- struct: pub::PaymentCount
- impl: impl super::PaymentMetric<T> for PaymentCount
**crates/router/src/analytics/payments/metrics/payment_processed_amount.rs**
Remove:
- function: private::load_metrics
- struct: pub::PaymentProcessedAmount
- impl: impl super::PaymentMetric<T> for PaymentProcessedAmount
**crates/router/src/analytics/payments/metrics/payment_success_count.rs**
Remove:
- function: private::load_metrics
- struct: pub::PaymentSuccessCount
- impl: impl super::PaymentMetric<T> for PaymentSuccessCount
**crates/router/src/analytics/payments/metrics/success_rate.rs**
Remove:
- function: private::load_metrics
- struct: pub::PaymentSuccessRate
- impl: impl super::PaymentMetric<T> for PaymentSuccessRate
**crates/router/src/analytics/payments/types.rs**
Remove:
- function: private::set_filter_clause
- impl: impl QueryFilter<T> for PaymentFilters
**crates/router/src/analytics/query.rs**
Remove:
- function: private::set_filter_clause
- function: private::set_group_by_clause
- function: private::get_lowest_common_granularity_level
- function: private::get_bucket_size
- function: private::clip_to_start
- function: private::clip_to_end
- function: pub::new
- function: pub::add_select_column
- function: pub::set_distinct
- function: pub::add_filter_clause
- function: pub::add_bool_filter_clause
- function: pub::add_custom_filter_clause
- function: pub::add_filter_in_range_clause
- function: pub::add_group_by_clause
- function: pub::add_granularity_in_mins
- function: private::get_filter_clause
- function: private::get_select_clause
- function: private::get_group_by_clause
- function: pub::add_having_clause
- function: pub::get_filter_type_clause
- function: pub::build_query
- function: pub::execute_query
- struct: pub::QueryBuilder
- enum: pub::TimeGranularityLevel
- enum: pub::QueryBuildingError
- enum: pub::PostProcessingError
- enum: pub::Aggregate
- enum: pub::FilterTypes
- trait: pub::QueryFilter
- trait: pub::GroupByClause
- trait: pub::SeriesBucket
- trait: pub::ToSql
- impl: impl QueryFilter<T> for analytics_api::TimeRange
- impl: impl GroupByClause<super::SqlxClient> for Granularity
- impl: impl SeriesBucket for Granularity
- impl: impl QueryBuilder<T>
**crates/router/src/analytics/refunds.rs**
Remove:
- trait: pub::RefundAnalytics
- mod: pub::accumulator
- mod: private::core
- mod: pub::filters
- mod: pub::metrics
- mod: pub::types
**crates/router/src/analytics/refunds/accumulator.rs**
Remove:
- function: private::add_metrics_bucket
- function: private::collect
- function: private::add_metrics_bucket
- function: private::collect
- function: private::add_metrics_bucket
- function: private::collect
- function: pub::collect
- struct: pub::RefundMetricsAccumulator
- struct: pub::SuccessRateAccumulator
- struct: pub::CountAccumulator
- struct: pub::SumAccumulator
- trait: pub::RefundMetricAccumulator
- impl: impl RefundMetricAccumulator for CountAccumulator
- impl: impl RefundMetricAccumulator for SumAccumulator
- impl: impl RefundMetricAccumulator for SuccessRateAccumulator
- impl: impl RefundMetricsAccumulator
**crates/router/src/analytics/refunds/core.rs**
Remove:
- function: pub::get_metrics
**crates/router/src/analytics/refunds/filters.rs**
Remove:
- function: pub::get_refund_filter_for_dimension
- struct: pub::RefundFilterRow
- trait: pub::RefundFilterAnalytics
**crates/router/src/analytics/refunds/metrics.rs**
Remove:
- function: private::load_metrics
- struct: pub::RefundMetricRow
- trait: pub::RefundMetricAnalytics
- trait: pub::RefundMetric
- impl: impl RefundMetric<T> for RefundMetrics
- mod: private::refund_count
- mod: private::refund_processed_amount
- mod: private::refund_success_count
- mod: private::refund_success_rate
**crates/router/src/analytics/refunds/metrics/refund_count.rs**
Remove:
- function: private::load_metrics
- struct: pub::RefundCount
- impl: impl super::RefundMetric<T> for RefundCount
**crates/router/src/analytics/refunds/metrics/refund_processed_amount.rs**
Remove:
- function: private::load_metrics
- struct: pub::RefundProcessedAmount
- impl: impl super::RefundMetric<T> for RefundProcessedAmount
**crates/router/src/analytics/refunds/metrics/refund_success_count.rs**
Remove:
- function: private::load_metrics
- struct: pub::RefundSuccessCount
- impl: impl super::RefundMetric<T> for RefundSuccessCount
**crates/router/src/analytics/refunds/metrics/refund_success_rate.rs**
Remove:
- function: private::load_metrics
- struct: pub::RefundSuccessRate
- impl: impl super::RefundMetric<T> for RefundSuccessRate
**crates/router/src/analytics/refunds/types.rs**
Remove:
- function: private::set_filter_clause
- impl: impl QueryFilter<T> for RefundFilters
**crates/router/src/analytics/routes.rs**
Remove:
- function: pub::server
- function: pub::get_info
- function: pub::get_payment_metrics
- function: pub::get_refunds_metrics
- function: pub::get_payment_filters
- function: pub::get_refund_filters
- struct: pub::Analytics
- impl: impl Analytics
**crates/router/src/analytics/sqlx.rs**
Remove:
- function: pub::from_conf
- function: private::encode_by_ref
- function: private::size_hint
- function: private::decode
- function: private::type_info
- function: private::load_row
- function: private::load_results
- function: private::from_row
- function: private::from_row
- function: private::from_row
- function: private::from_row
- function: private::to_sql
- function: private::to_sql
- function: private::to_sql
- struct: pub::SqlxClient
- trait: pub::DbType
- impl: impl SqlxClient
- impl: impl Encode<'q, Postgres> for DBEnumWrapper<Type>
- impl: impl Decode<'r, Postgres> for DBEnumWrapper<Type>
- impl: impl sqlx::Type<Postgres> for DBEnumWrapper<Type>
- impl: impl LoadRow<T> for SqlxClient
- impl: impl super::payments::filters::PaymentFilterAnalytics for SqlxClient
- impl: impl super::payments::metrics::PaymentMetricAnalytics for SqlxClient
- impl: impl super::refunds::metrics::RefundMetricAnalytics for SqlxClient
- impl: impl super::refunds::filters::RefundFilterAnalytics for SqlxClient
- impl: impl AnalyticsDataSource for SqlxClient
- impl: impl FromRow<'a, PgRow> for super::refunds::metrics::RefundMetricRow
- impl: impl FromRow<'a, PgRow> for super::payments::metrics::PaymentMetricRow
- impl: impl FromRow<'a, PgRow> for super::payments::filters::FilterRow
- impl: impl FromRow<'a, PgRow> for super::refunds::filters::RefundFilterRow
- impl: impl ToSql<SqlxClient> for PrimitiveDateTime
- impl: impl ToSql<SqlxClient> for AnalyticsCollection
- impl: impl ToSql<SqlxClient> for Aggregate<T>
**crates/router/src/analytics/types.rs**
Remove:
- function: private::as_ref
- function: private::from_str
- function: private::switch
- function: private::switch
- struct: pub::DBEnumWrapper
- enum: pub::AnalyticsDomain
- enum: pub::AnalyticsCollection
- enum: pub::MetricsError
- enum: pub::QueryExecutionError
- enum: pub::FiltersError
- trait: pub::RefundAnalytics
- trait: pub::AnalyticsDataSource
- trait: pub::LoadRow
- impl: impl AsRef<T> for DBEnumWrapper<T>
- impl: impl FromStr for DBEnumWrapper<T>
- impl: impl ErrorSwitch<MetricsError> for QueryBuildingError
- impl: impl ErrorSwitch<FiltersError> for QueryBuildingError
**crates/router/src/analytics/utils.rs**
Remove:
- function: pub::get_payment_dimensions
- function: pub::get_refund_dimensions
- function: pub::get_payment_metrics_info
- function: pub::get_refund_metrics_info
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/lib.rs**
Remove:
- mod: private::analytics
**crates/router/src/routes.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router_env/src/lib.rs**
Remove:
- enum: pub::AnalyticsFlow
- impl: impl FlowMetric for AnalyticsFlow
**crates/router_env/src/metrics.rs**
Modify existing code
|
{"issue_number": 2676, "pr_number": 2777, "commits_count": 1, "files_changed": 30, "response_length": 15045, "file_count": 44, "needs_breakdown": true}
|
fix(connector): [CASHTOCODE] Added supported countries and currencies
## 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 -->
Added supported countries and currencies for Cashtocode.
### 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
|
<think>
PR Context:
- Title: fix(connector): [CASHTOCODE] Added supported countries and currencies
- Merged: 2025-05-21T13:11:19Z
- Files changed: 5 files
- Commits: 1 commits
Implementation approach:
… (#8060)
## 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 supported countries and currencies for Cashtocode.
### Additional Changes
- [ ] 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:
(No detailed commit information available)
|
{"issue_number": 8060, "pr_number": 8101, "commits_count": 0, "files_changed": 5, "response_length": 799, "file_count": 0, "needs_breakdown": false}
|
feat(connector): add support for affirm and afterpay/clearpay through stripe
### Feature Description
Add support for creating payments through affirm and afterpay/clearpay through stripe. The api contract changes will be as follows
- afterpay/clearpay
```json
{
"payment_method": "pay_later",
"payment_method_data": {
"issuer_name": "afterpay_clearpay",
"afterpay_clearpay_redirect": {
"billing_email_address": "[email protected]"
}
}
}
```
- affirm
```json
{
"payment_method": "pay_later",
"payment_method_data": {
"issuer_name": "affirm",
"affirm_redirect": {
"billing_email_address": "[email protected]"
}
}
}
```
### Possible Implementation
Modify the payments request of stripe to include affirm and afterpay
### 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?
Yes I am willing to submit a PR!
- [X] Support for affirm #355
- [ ] Support for afterpay_clearpay
|
<think>
PR Context:
- Title: feat(stripe): add support for afterpay clearpay through stripe
- Merged: 2023-01-25T15:43:22Z
- Files changed: 6 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
This PR will support creating pay_later payments using `afterpay_clearpay` as the issuer through stripe. This is a redirection flow.
## 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
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(stripe): add support for afterpay clearpay through stripe (#441)
Files to modify:
**crates/api_models/src/payments.rs**
Remove:
- enum: pub::KlarnaRedirectIssuer
Add:
- enum: pub::KlarnaIssuer
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
|
{"issue_number": 347, "pr_number": 441, "commits_count": 1, "files_changed": 6, "response_length": 1298, "file_count": 7, "needs_breakdown": false}
|
feat(analytics): refactor and introduce analytics APIs to accommodate OrgLevel, MerchantLevel and ProfileLevel authentication
## 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
<!-- Describe your changes in detail -->
Introducing OrgLevel, MerchantLevel and ProfileLevel authentication for analytics, the following changes are done:
- refactored the existing MerchantLevel APIs
- introduced new OrgLevel APIs
- introduced new ProfileLevel APIs
The levels are described as:
```bash
OrgLevel {
org_id: id_type::OrganizationId,
},
MerchantLevel {
org_id: id_type::OrganizationId,
merchant_ids: Vec<id_type::MerchantId>,
},
ProfileLevel {
org_id: id_type::OrganizationId,
merchant_id: id_type::MerchantId,
profile_ids: Vec<id_type::ProfileId>,
}
```
- Introduced `ProfileId` as a dimension and filter for analytics:
- Payments v1
- Payments v2
- Refunds
- Changed the clickhouse query to search in `UTC timezone` by converting the timestamp into epoch
The API's added are as follows:
- Merchant Level
Merchant Level |
-- | --
Payment Metrics V1 | /analytics/v1/merchant/metrics/payments
Payment Filters V1 | /analytics/v1/merchant/filters/payments
Refund Metrics | /analytics/v1/merchant/metrics/refunds
Refund Filters | /analytics/v1/merchant/filters/refunds
Payment Report | /analytics/v1/merchant/report/payments
Refund Report | /analytics/v1/merchant/report/refunds
Dispute Report | /analytics/v1/merchant/report/dispute
API Event Metrics | /analytics/v1/merchant/metrics/api_events
API Event Filters | /analytics/v1/merchant/filters/api_events
Dispute Metrics | /analytics/v1/merchant/metrics/disputes
Dispute Filters | /analytics/v1/merchant/filters/disputes
Info | /analytics/v1/merchant/{domain}/info
Payment Metrics V2 | /analytics/v2/merchant/metrics/payments
- Org Level
Org Level |
-- | --
Payment Metrics V1 | /analytics/v1/org/metrics/payments
Payment Filters V1 | /analytics/v1/org/filters/payments
Refund Metrics | /analytics/v1/org/metrics/refunds
Refund Filters | /analytics/v1/org/filters/refunds
Payment Report | /analytics/v1/org/report/payments
Refund Report | /analytics/v1/org/report/refunds
Dispute Report | /analytics/v1/org/report/dispute
Dispute Metrics | /analytics/v1/org/metrics/disputes
Dispute Filters | /analytics/v1/org/filters/disputes
Info | /analytics/v1/org/{domain}/info
Payment Metrics V2 | /analytics/v2/org/metrics/payments
- Profile Level
Profile Level |
-- | --
Payment Metrics V1 | /analytics/v1/profile/metrics/payments
Payment Filters V1 | /analytics/v1/profile/filters/payments
Refund Metrics | /analytics/v1/profile/metrics/refunds
Refund Filters | /analytics/v1/profile/filters/refunds
Payment Report | /analytics/v1/profile/report/payments
Refund Report | /analytics/v1/profile/report/refunds
Dispute Report | /analytics/v1/profile/report/dispute
Dispute Metrics | /analytics/v1/profile/metrics/disputes
Dispute Filters | /analytics/v1/profile/filters/disputes
Info | /analytics/v1/profile/{domain}/info
Connector Logs | /analytics/v1/profile/connector_event_logs
Outgoing Webhook Event Logs | /analytics/v1/profile/outgoing_webhook_event_logs
API Event Logs | /analytics/v1/profile/api_event_logs
SDK Event Logs | /analytics/v1/profile/sdk_event_logs
Payment Metrics V2 | /analytics/v2/profile/metrics/payments
### 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).
-->
OrgLevel, MerchantLevel and ProfileLevel provide for enhanced analytics insights on metrics, filters etc of Payments, Refunds, Disputes etc.
## 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)?
-->
- Can be tested once Frontend support is added and the respective OrgLevel, MerchantLevel and ProfileLevel APIs are hit
- ProfileId is added as a filter for Payments and Refunds
<img width="1429" alt="Screenshot 2024-09-03 at 11 08 18 AM" src="https://github.com/user-attachments/assets/a7be2814-af4c-42cb-bd65-646100b49c74">
<img width="1428" alt="Screenshot 2024-09-03 at 11 08 28 AM" src="https://github.com/user-attachments/assets/7dc2089e-4cab-422c-8803-5c4e4088ad41">
<img width="1424" alt="Screenshot 2024-09-03 at 11 08 35 AM" src="https://github.com/user-attachments/assets/d4e26dbd-b5d5-465e-ba07-f71c95ab75ea">
## 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(analytics): refactor and introduce analytics APIs to accommodate OrgLevel, MerchantLevel and ProfileLevel authentication
- Merged: 2024-09-04T18:09:07Z
- Files changed: 30 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Cherry picked the commit for #5729
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): refactor and introduce analytics APIs to accommodate OrgLevel, MerchantLevel and Pr
Files to modify:
**crates/analytics/src/api_event/core.rs**
Modify existing code
**crates/analytics/src/api_event/filters.rs**
Modify existing code
**crates/analytics/src/api_event/metrics.rs**
Modify existing code
**crates/analytics/src/api_event/metrics/api_count.rs**
Modify existing code
**crates/analytics/src/api_event/metrics/latency.rs**
Modify existing code
**crates/analytics/src/api_event/metrics/status_code_count.rs**
Modify existing code
**crates/analytics/src/clickhouse.rs**
Modify existing code
**crates/analytics/src/disputes/core.rs**
Modify existing code
**crates/analytics/src/disputes/filters.rs**
Modify existing code
**crates/analytics/src/disputes/metrics.rs**
Modify existing code
**crates/analytics/src/disputes/metrics/dispute_status_metric.rs**
Modify existing code
**crates/analytics/src/disputes/metrics/total_amount_disputed.rs**
Modify existing code
**crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs**
Modify existing code
**crates/analytics/src/enums.rs**
Modify existing code
**crates/analytics/src/errors.rs**
Modify existing code
**crates/analytics/src/lib.rs**
Remove:
- mod: pub::active_payments
- mod: pub::api_event
- mod: pub::auth_events
- mod: pub::connector_events
- mod: pub::health_check
- mod: pub::opensearch
- mod: pub::outgoing_webhook_event
Add:
- mod: pub::active_payments
- mod: pub::api_event
- mod: pub::auth_events
- mod: pub::connector_events
- mod: pub::enums
- mod: pub::health_check
- mod: pub::opensearch
- mod: pub::outgoing_webhook_event
**crates/analytics/src/outgoing_webhook_event/events.rs**
Modify existing code
**crates/analytics/src/payment_intents/core.rs**
Modify existing code
**crates/analytics/src/payment_intents/filters.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/payment_intent_count.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/successful_smart_retries.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/total_smart_retries.rs**
Modify existing code
**crates/analytics/src/payment_intents/types.rs**
Modify existing code
**crates/analytics/src/payments/core.rs**
Modify existing code
**crates/analytics/src/payments/distribution.rs**
Modify existing code
**crates/analytics/src/payments/distribution/payment_error_message.rs**
Modify existing code
**crates/analytics/src/payments/filters.rs**
Remove:
- struct: private::FilterRow
- trait: pub::PaymentFilterAnalytics
Add:
- struct: private::PaymentFilterRow
- trait: pub::PaymentFilterAnalytics
**crates/analytics/src/payments/metrics.rs**
Modify existing code
**crates/analytics/src/payments/metrics/avg_ticket_size.rs**
Modify existing code
**crates/analytics/src/payments/metrics/connector_success_rate.rs**
Modify existing code
**crates/analytics/src/payments/metrics/payment_count.rs**
Modify existing code
**crates/analytics/src/payments/metrics/payment_processed_amount.rs**
Modify existing code
**crates/analytics/src/payments/metrics/payment_success_count.rs**
Modify existing code
**crates/analytics/src/payments/metrics/retries_count.rs**
Modify existing code
**crates/analytics/src/payments/metrics/success_rate.rs**
Modify existing code
**crates/analytics/src/payments/types.rs**
Modify existing code
**crates/analytics/src/query.rs**
Remove:
- impl: impl ToSql<T> for &common_utils::id_type::MerchantId
Add:
- function: private::to_sql
- function: private::to_sql
- function: private::to_sql
- function: private::set_filter_clause
- impl: impl ToSql<T> for &MerchantId
- impl: impl ToSql<T> for MerchantId
- impl: impl ToSql<T> for &OrganizationId
- impl: impl ToSql<T> for ProfileId
- impl: impl QueryFilter<T> for AuthInfo
**crates/analytics/src/refunds/core.rs**
Modify existing code
**crates/analytics/src/refunds/filters.rs**
Modify existing code
**crates/analytics/src/refunds/metrics.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/refund_count.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/refund_processed_amount.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/refund_success_count.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/refund_success_rate.rs**
Modify existing code
**crates/analytics/src/refunds/types.rs**
Modify existing code
**crates/analytics/src/sqlx.rs**
Add:
- impl: impl FromRow<'a, PgRow> for super::payments::filters::PaymentFilterRow
**crates/api_models/src/analytics.rs**
Modify existing code
**crates/api_models/src/analytics/payment_intents.rs**
Modify existing code
**crates/api_models/src/analytics/payments.rs**
Modify existing code
**crates/api_models/src/analytics/refunds.rs**
Modify existing code
**crates/common_utils/src/types.rs**
Add:
- mod: pub::authentication
**crates/common_utils/src/types/authentication.rs**
Add:
- enum: pub::AuthInfo
**crates/hyperswitch_domain_models/src/merchant_account.rs**
Add:
- function: pub::get_org_id
**crates/router/src/analytics.rs**
Add:
- function: pub::get_org_payment_metrics
- function: pub::get_org_payment_intent_metrics
- function: pub::get_profile_payment_intent_metrics
- function: pub::get_merchant_refund_metrics
- function: pub::get_org_refund_metrics
- function: pub::get_profile_refund_filters
- function: pub::get_profile_outgoing_webhook_events
- function: pub::generate_org_dispute_report
- function: pub::generate_profile_dispute_report
- function: pub::get_profile_api_events_metrics
- function: pub::get_merchant_api_event_filters
**crates/router/src/core/verification/utils.rs**
Add:
- function: pub::check_if_profile_id_is_present_in_payment_intent
**crates/router/src/types/domain/user.rs**
Modify existing code
|
{"issue_number": 5729, "pr_number": 5784, "commits_count": 1, "files_changed": 30, "response_length": 7116, "file_count": 60, "needs_breakdown": true}
|
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): nullify false positives
- Merged: 2024-07-17T10:42:30Z
- Files changed: 9 files
- Commits: 5 commits
Implementation approach:
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR partially reverts changes made to `commands.js` in #5128 while adding more stricter validations to catch tiny little changes.
Also, we now throw proper error in places where needed.
This also caught another mistake done in configs which is fixe
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 5128, "pr_number": 5303, "commits_count": 0, "files_changed": 9, "response_length": 772, "file_count": 0, "needs_breakdown": false}
|
[REFACTOR] : [Volt] Error Message For Connector Implementation
### :memo: Feature Description
- In terms of errors, we are currently throwing a 'not supported' message, which shouldn't be the case as we are yet to decide on the implementation.
### :hammer: Possible Implementation
- In order to manage payment methods that are not implemented by Hyperswitch or yet to be implemented, the connector transformers file should make use of the NotImplemented ConnectorError enum variant.
- By doing so, we will throw same error message for all the Connector Implementation
- You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2831
:bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/`
### :package: Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### :sparkles: Are you willing to submit a PR?
|
<think>
PR Context:
- Title: refactor(connector): [Volt] change error message from NotSupported to NotImplemented
- Merged: 2023-11-29T18:28:25Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- 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): [Volt] change error message from NotSupported to NotImplemented (#2878)
Files to modify:
**crates/router/src/connector/volt/transformers.rs**
Modify existing code
|
{"issue_number": 2864, "pr_number": 2878, "commits_count": 1, "files_changed": 1, "response_length": 1004, "file_count": 3, "needs_breakdown": false}
|
Blacking token after delete user role
Even after deleting the user role, the logged in user is able to perform the JWT operations. Hence these need to be prohibited by adding the token in blacklist.
|
<think>
PR Context:
- Title: fix(user): blacklist token after delete user role
- Merged: 2024-04-23T10:37:25Z
- Files changed: 4 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
The PR add support to blocklist JWT token of the deleted user/user role. After delete signined user won't be able to perform any operation as token is blocklisted.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] T
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(user): blacklist token after delete user role (#4428)
Files to modify:
**crates/diesel_models/src/query/user_role.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/user_role.rs**
Modify existing code
|
{"issue_number": 4427, "pr_number": 4428, "commits_count": 1, "files_changed": 4, "response_length": 1119, "file_count": 6, "needs_breakdown": false}
|
feat(payments_v2): implement create and confirm intent flow
## 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 a new endpoint that handles payments create intent v2 and confirm intent v2 steps. Note that the API contract is not finalized and is possibly subject to change.
Additionally, the endpoint can also call the setup intent flow, if the order amount is zero. This is done so as to allow the payment methods v2 endpoints to create multiple-use tokens for a specified customer's payment method.
### 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`
-->
This PR introduces a new endpoint for payments v2, that can handle create intent and confirm intent steps.
## 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 endpoint introduced in this PR would allow the creation of multiple-use tokens by the payments methods v2 endpoints.
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
1. Using the v2 endpoints, create an organization, merchant account, profile, API key and merchant connector account.
2. Call the setup intent endpoint:
- Since the request body is a union of the payment create intent v2 and payment confirm intent v2 request bodies, the required fields for this endpoint are `amount_details`, `payment_method_data`, `payment_method_type` and `payment_method_subtype`.
The request and response are included below:
```shell
$ curl --location 'http://localhost:8080/v2/payments' \
--header 'x-profile-id: pro_9UhMqBMEOooRIvJFFdeW' \
--header 'Content-Type: application/json' \
--header 'api-key: <API key>' \
--data '{
"amount_details": {
"order_amount": 0,
"currency": "USD"
},
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "01",
"card_exp_year": "25",
"card_holder_name": "John Doe",
"card_cvc": "100"
}
},
"payment_method_type": "card",
"payment_method_subtype": "credit"
}'
{
"id": "12345_pay_0194aedd2b087ec1a960242f3ad8f2c1",
"status": "succeeded",
"amount": {
"order_amount": 0,
"currency": "USD",
"shipping_cost": null,
"order_tax_amount": null,
"external_tax_calculation": "skip",
"surcharge_calculation": "skip",
"surcharge_amount": null,
"tax_on_surcharge": null,
"net_amount": 0,
"amount_to_capture": null,
"amount_capturable": 0,
"amount_captured": 0
},
"customer_id": null,
"connector": "stripe",
"client_secret": "12345_pay_0194aedd2b087ec1a960242f3ad8f2c1_secret_0194aedd2b127f6190e5090a1527ad3e",
"created": "2025-01-28T21:41:57.650Z",
"payment_method_data": {
"billing": null
},
"payment_method_type": "card",
"payment_method_subtype": "credit",
"next_action": null,
"connector_transaction_id": "seti_1QmMXiD5R7gDAGffKPUlM0HT",
"connector_reference_id": null,
"connector_token_details": {
"token": "pm_1QmMXiD5R7gDAGffCf03AULQ"
},
"merchant_connector_id": "mca_oC8RE28uRRcVKDjgwfzG",
"browser_info": null,
"error": null
}
```
- Note that the `order_amount` is zero in the above request. Also, note that the `connector_token_details.token` field is populated in the response, and the `connector_transaction_id` being `seti_*` indicates that Stripe's setup intent flow was called.
- Additional fields may be passed in the request, such as `customer_id`, etc. which would be reflected in the response and database entries.
- Passing in a non-zero value for the `order_amount` causes it to follow the regular create intent + confirm intent flow:
```shell
$ curl --location 'http://localhost:8080/v2/payments' \
--header 'x-profile-id: pro_9UhMqBMEOooRIvJFFdeW' \
--header 'Content-Type: application/json' \
--header 'api-key: <API key>' \
--data '{
"amount_details": {
"order_amount": 6540,
"currency": "USD"
},
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "01",
"card_exp_year": "25",
"card_holder_name": "John Doe",
"card_cvc": "100"
}
},
"payment_method_type": "card",
"payment_method_subtype": "credit"
}'
{
"id": "12345_pay_0194aedff4c57e008edc28cbd3881dee",
"status": "succeeded",
"amount": {
"order_amount": 6540,
"currency": "USD",
"shipping_cost": null,
"order_tax_amount": null,
"external_tax_calculation": "skip",
"surcharge_calculation": "skip",
"surcharge_amount": null,
"tax_on_surcharge": null,
"net_amount": 6540,
"amount_to_capture": null,
"amount_capturable": 0,
"amount_captured": 6540
},
"customer_id": null,
"connector": "stripe",
"client_secret": "12345_pay_0194aedff4c57e008edc28cbd3881dee_secret_0194aedff4cc719381629d4aacf19adb",
"created": "2025-01-28T21:45:00.364Z",
"payment_method_data": {
"billing": null
},
"payment_method_type": "card",
"payment_method_subtype": "credit",
"next_action": null,
"connector_transaction_id": "pi_3QmMaeD5R7gDAGff0GRZPicn",
"connector_reference_id": null,
"connector_token_details": {
"token": "pm_1QmMaeD5R7gDAGffZenIs1fg"
},
"merchant_connector_id": "mca_oC8RE28uRRcVKDjgwfzG",
"browser_info": null,
"error": null
}
```
In this case, the `connector_transaction_id` is `pi_*`, indicating that Stripe's authorize flow was called.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: refactor(payments_v2): create customer at connector end and populate connector customer ID
- Merged: 2025-02-14T10:19:09Z
- Files changed: 11 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 updates the payments v2 flows to create a customer at connector's end, where applicable, and populate the connector's customer ID in `RouterData`, so that the connector integrations which need the connector customer ID can access the
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(payments_v2): create customer at connector end and populate connector customer ID (#7246)
Files to modify:
**crates/diesel_models/src/customers.rs**
Add:
- function: private::deref
- function: private::deref_mut
- struct: pub::ConnectorCustomerMap
- impl: impl std::ops::Deref for ConnectorCustomerMap
- impl: impl std::ops::DerefMut for ConnectorCustomerMap
**crates/hyperswitch_domain_models/src/business_profile.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/customer.rs**
Add:
- function: pub::get_connector_customer_id
- function: pub::get_connector_customer_id
- struct: pub::CustomerGeneralUpdate
**crates/router/src/core/customers.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/customers.rs**
Add:
- function: pub::update_connector_customer_in_customers
**crates/router/src/core/payments/operations/payment_confirm_intent.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payouts.rs**
Add:
- function: pub::create_recipient
**crates/router/src/core/payouts/helpers.rs**
Modify existing code
**crates/router/src/types/storage/customers.rs**
Modify existing code
|
{"issue_number": 7106, "pr_number": 7246, "commits_count": 1, "files_changed": 11, "response_length": 2140, "file_count": 13, "needs_breakdown": false}
|
[FEATURE] Add more default tests to the connector template
### Feature Description
For card payment method default unit tests should be generated while adding a connector using add_connector script.
### Possible Implementation
Add more test cases in connector-template/test.rs file, So that default test cases will be generated every time while adding a connector. If connector does not support any flow or payment method, then test cases for such scenarios can be removed from the test file.
### 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-template): add more default tests for card payment method
- Merged: 2023-01-31T10:52:33Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
For card payment method default unit tests should be generated while adding a connector using add_connector script.
### Additional Changes
- [ ] 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(connector-template): add more default tests for card payment method (#471)
Files to modify:
**connector-template/test.rs**
Remove:
- impl: impl ConnectorActions for project
- impl: impl utils::Connector for project
Add:
- function: private::should_capture_authorized_payment
- function: private::should_void_authorized_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_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
- impl: impl ConnectorActions for project
- impl: impl utils::Connector for project
**crates/router/tests/connectors/utils.rs**
Add:
- function: private::capture_payment_and_refund
- function: private::get_connector_transaction_id_from_capture_data
|
{"issue_number": 467, "pr_number": 471, "commits_count": 1, "files_changed": 2, "response_length": 2420, "file_count": 4, "needs_breakdown": false}
|
feat(core): Add V2 Authentication to all available endpoints
## Type of Change
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This commit introduces V2 authentication mechanisms for various admin and client-side APIs :
- [x] Added V2AdminApiAuth and modified AdminApiAuthWithMerchantIdFromRoute for V2
- [x] Added V2ApiKeyAuth , V2AdminApiAuth and V2ClientAuth to the endpoints
- [x] Refactored functions to support V2 Auth as well as V1 Auth
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## Motivation and Context
## How did you test it?
For `/v2/merchant-accounts`
Request
```
curl --location 'http://localhost:8080/v2/merchant-accounts' \
--header 'x-organization-id: org_d2lZPiRPOGbIMmFcb59A' \
--header 'Content-Type: application/json' \
--header 'Authorization: admin-api-key=test_admin' \
--data '{
"merchant_name": "cloth_seller"
}'
```
Response
```
{
"id": "cloth_seller_KdjFPBxrxWyX09jri2VB",
"merchant_name": "cloth_seller",
"merchant_details": null,
"publishable_key": "pk_dev_735cafe5f43446e88d22bedec15b0139",
"metadata": null,
"organization_id": "org_d2lZPiRPOGbIMmFcb59A",
"recon_status": "not_requested",
"product_type": "orchestration"
}
```
For `/v2/organization`
Request
```
curl --location 'http://localhost:8080/v2/organization' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'Content-Type: application/json' \
--data '{
"organization_name": "random_org_1741776562"
}'
```
Response
```
{
"id": "org_m4fLYdEFb7PNHynIfmZO",
"organization_name": "random_org_1741776558",
"organization_details": null,
"metadata": null,
"modified_at": "2025-03-12 10:49:18.475431",
"created_at": "2025-03-12 10:49:18.475424"
}
```
This is how V2AdminApiAuth looks like
```
pub struct V2AdminApiAuth;
#[async_trait]
impl<A> AuthenticateAndFetch<(), A> for V2AdminApiAuth
where
A: SessionStateInfo + Sync,
{
async fn authenticate_and_fetch(
&self,
request_headers: &HeaderMap,
state: &A,
) -> RouterResult<((), AuthenticationType)> {
let header_map_struct = HeaderMapStruct::new(&request_headers);
let auth_string = header_map_struct.get_auth_string_from_header()?;
let request_admin_api_key = auth_string
.split(',')
.find_map(|part| part.trim().strip_prefix("admin-api-key="))
.ok_or_else(|| {
report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Unable to parse admin_api_key")
})?;
if request_admin_api_key.is_empty() {
return Err(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Api key is empty");
}
let conf = state.conf();
let admin_api_key = &conf.secrets.get_inner().admin_api_key;
if request_admin_api_key != admin_api_key.peek() {
Err(report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Authentication Failure"))?;
}
Ok(((), AuthenticationType::AdminApiKey))
}
}
```
### What changes are done in authorization header
How it was earlier?
```
api-key = {{api-key}}
client-secret={{client_secret}}
api-key = {{admin_api_key}}
```
Changed version
```
Authorization = api-key={{api-key}}
Authorization = admin-api-key={{admin_api_key}}
Authorization = publishable-key={{publishable_key}},client-secret={{client_secret}}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: refactor(cypress-v2): change `Authorization` and `payment_methods_enabled` for v2 cypress tests
- Merged: 2025-04-17T13:17:01Z
- Files changed: 2 files
- Commits: 6 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
<details>
<summary>Changes</summary>
- Changed the Authorization in the `commands.js` because Authorization changes had been made recently.
- Changed field names in `payment_methods_enabled` accordingly as accepted by v2 endpoints.
</det
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7487, "pr_number": 7805, "commits_count": 0, "files_changed": 2, "response_length": 825, "file_count": 0, "needs_breakdown": false}
|
[REFACTOR] : [Helcim] Error Message For Connector Implementation
### :memo: Feature Description
- In terms of errors, we are currently throwing a 'not supported' message, which shouldn't be the case as we are yet to decide on the implementation.
### :hammer: Possible Implementation
- In order to manage payment methods that are not implemented by Hyperswitch or yet to be implemented, the connector transformers file should make use of the NotImplemented ConnectorError enum variant.
- By doing so, we will throw same error message for all the Connector Implementation
- You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2831
:bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/`
### :package: Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### :sparkles: Are you willing to submit a PR?
|
<think>
PR Context:
- Title: refactor(connector): [Helcim] change error message from not supported to not implemented
- Merged: 2023-12-17T17:51:43Z
- Files changed: 1 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 -->
### 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): [Helcim] change error message from not supported to not implemented (#2850)
Files to modify:
**crates/router/src/connector/helcim/transformers.rs**
Modify existing code
|
{"issue_number": 2841, "pr_number": 2850, "commits_count": 1, "files_changed": 1, "response_length": 1014, "file_count": 3, "needs_breakdown": false}
|
fix(user_roles): Send only same and below Entity Level Users in List Users API
Currently in user list api, for merchants we show org admin.
This is happening because in V1 data, we have merchant_id in org level users as well, because of why the filtering is not correct.
|
<think>
PR Context:
- Title: fix(user_roles): Send only same and below Entity Level Users in List Users API
- Merged: 2024-09-29T13:15:30Z
- 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 -->
- Send only same and below Entity Level Users in List Users API.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment var
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(user_roles): Send only same and below Entity Level Users in List Users API (#6147)
Files to modify:
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"issue_number": 6146, "pr_number": 6147, "commits_count": 1, "files_changed": 2, "response_length": 1044, "file_count": 4, "needs_breakdown": false}
|
feat: add caching for roles
Currently in authorization, we look at the resource and the role in the JWT to check whether that particular call is valid or not.
Upon the introduction of custom roles, this has increased db calls in the authorization phase as we need to get the permissions associated to a particular role. This will have unnecessary load on db and hits the performance of every api call.
To fix this, redis needs to be used to cache the permissions for a custom role.
|
<think>
PR Context:
- Title: feat(roles): Add caching for custom roles
- Merged: 2024-03-05T13:40:13Z
- Files changed: 12 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 -->
This PR will add caching for custom roles to reduce db calls and improve efficiency.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configura
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(roles): Add caching for custom roles (#3946)
Files to modify:
**crates/api_models/src/user.rs**
Modify existing code
**crates/api_models/src/user_role.rs**
Modify existing code
**crates/router/src/consts.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/services/authentication/blacklist.rs**
Add:
- function: private::invalidate_role_cache
**crates/router/src/services/authorization.rs**
Add:
- function: private::get_permissions_from_cache
- function: pub::get_cache_key_from_role_id
- function: private::get_permissions_from_predefined_roles
- function: private::get_permissions_from_db
- function: private::get_redis_connection
**crates/router/src/services/authorization/info.rs**
Modify existing code
**crates/router/src/services/authorization/permissions.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Modify existing code
**crates/router/src/utils/user.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Add:
- function: pub::set_role_permissions_in_cache_by_user_role
- function: pub::set_role_permissions_in_cache_if_required
|
{"issue_number": 3944, "pr_number": 3946, "commits_count": 1, "files_changed": 12, "response_length": 2034, "file_count": 14, "needs_breakdown": false}
|
[REFACTOR]: [Bambora] 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/bambora/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(router): remove default case handling in bambora connector
- Merged: 2024-05-15T13:36:59Z
- 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 -->
As described in #4054, this pull request removes the default case handling in `crates/router/src/connector/bambora/transformers.rs`, handling each case explicitly.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] Thi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(router): remove default case handling in bambora connector (#4473)
Files to modify:
**crates/router/src/connector/bambora/transformers.rs**
Modify existing code
|
{"issue_number": 4054, "pr_number": 4473, "commits_count": 1, "files_changed": 1, "response_length": 973, "file_count": 3, "needs_breakdown": false}
|
enhance(router): change MAX_ID_LENGTH to 64
## 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 -->
Change MAX_ID_LENGTH to 64. This allows merchants to pass payment_id's of max length 64.
### 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.2
- Merged: 2023-03-24T14:07:31Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
# 0.5.2 (2023-03-24)
## Chores
* prepare for building production Docker images (#794) (6ddc30eb)
## Bug Fixes
* **connector:** [Airwallex] Change Session Token to Init Payment (#798) (a3c00339)
## Other Changes
* **router:** change MAX_ID_LENGTH to 64 (#792) (346bd954)
## Refactors
* extract kms module to `external_services` crate (#793) (029e3894)
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 792, "pr_number": 799, "commits_count": 0, "files_changed": 1, "response_length": 636, "file_count": 2, "needs_breakdown": false}
|
[BUG] payment_method_type for cards is null
### Bug Description
payment_method_type is a sub category of payment_method for defining the the payment_method's type. This is useful for PMs like banks and wallets to differentiate between SEPA / BACS / ACH banks or APay / GPay wallets, and helpful in similar way for other PMs.
This field is sent in the request when the consumer is requesting for initiating a payment.
However, the consumer might not be aware of what's the type of the card (credit vs debit), that's why this field is optional for cards.
This field is expected to be populated for cards for known card BINs.
### Expected Behavior
This field should be populated for known card BINs.
### Actual Behavior
This field is empty for cards if payment_method_type was not specified in the request.
### Steps To Reproduce
Make a card payment without passing `payment_method_type`
### 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): populate payment_method_type in payment_attempt for cards
- Merged: 2024-11-13T10:04:00Z
- Files changed: 3 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
Described in #6512
### 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
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payments): populate payment_method_type in payment_attempt for cards (#6519)
Files to modify:
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Add:
- function: private::foreign_from
- impl: impl ForeignFrom<(Self, Option<&api_models::payments::AdditionalPaymentData>)> for Option<enums::PaymentMethodType>
|
{"issue_number": 6512, "pr_number": 6519, "commits_count": 1, "files_changed": 3, "response_length": 1308, "file_count": 5, "needs_breakdown": false}
|
[BUG] Fix postman collections
- [x] NMI: Scenarios 10 and 11 are run before 1
- [x] Bluesnap: Inconsistency of payment method being saved in saved card flow
- [x] Checkout: Inconsistency of payment method being saved in saved card flow
- [x]Adyen: Inconsistency of payment method being saved in saved card flow
## Solution
- Remove `Copy` in Scenarios 10 and 11 form `.meta.json` to match with actual folder names
- Set `random_number` in `pre_request.js` for Bluesnap connector to make `customer_id` unique
|
<think>
PR Context:
- Title: ci(postman): adyen collection save card flow make `customer_id` properly dynamic
- Merged: 2024-03-14T07:45:44Z
- Files changed: 13 files
- Commits: 8 commits
Implementation approach:
<!-- 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 -->
This PR makes Adyen Saved card flow CI use dynamic `customer_id` properly. Similar to #4071.
Also, this PR fixes a minor inconsistency w.r.t #4071. The reason why #4071 worked as expected for Bluesnap and Checkout is that alphabetically `event.prereuqest.js
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 4070, "pr_number": 4086, "commits_count": 0, "files_changed": 13, "response_length": 811, "file_count": 0, "needs_breakdown": false}
|
[BUG] panic on RedisPoolConnection close.
### Bug Description
Currently the RedisPoolConnection close panics on [this line](https://github.com/juspay/hyperswitch/blob/ed99655ebc11d53f4b2ffcb8c0eb9ef6b56f32c4/crates/router/src/bin/router.rs#L47). The root cause of this issue is `Arc::get_mut` throws None when `Arc` has 2 or more strong immutable reference. Since we are creating async tasks with reference to `Arc<RedisConnectionPool>` [here](https://github.com/juspay/hyperswitch/blob/ed99655ebc11d53f4b2ffcb8c0eb9ef6b56f32c4/crates/router/src/services.rs#L110).
### Expected Behavior
Runs successfully and closes the connection to redis and db connection.
### Actual Behavior
```text
thread 'main' panicked at 'Redis connection pool cannot be closed', crates/router/src/db.rs:74:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
### Steps To Reproduce
1. Run `cargo r`
2. Stop it with `CTRL+C`
3. You will get:
```text
thread 'main' panicked at 'Redis connection pool cannot be closed', crates/router/src/db.rs:74:14
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
```
### Possible Resolution
Possible resolution would be removing `&mut self` from close function. Since `redis.quit_pool` doesn't really need mutable reference. Other one would be something like.
```rust
impl Drop for RedisConnectionPool {
fn drop(self) {
tokio_rt.block(async {
// call to the function that closes the connections
})
}
}
```
### Environment
Are you using hyperswitch hosted version? No
If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution: MacOS
2. Rust version (output of `rustc --version`): ``1.69
3. App version (output of `cargo r -- --version`): ``0.5.9
### Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
None
|
<think>
PR Context:
- Title: fix: impl `Drop` for `RedisConnectionPool`
- Merged: 2023-05-04T15:00:18Z
- Files changed: 8 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
This fixes #1035
## 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 conversa
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix: impl `Drop` for `RedisConnectionPool` (#1051)
Files to modify:
**crates/drainer/src/main.rs**
Modify existing code
**crates/drainer/src/services.rs**
Remove:
- function: pub::close
**crates/redis_interface/src/lib.rs**
Add:
- function: private::drop
- impl: impl Drop for RedisConnectionPool
**crates/router/src/bin/router.rs**
Modify existing code
**crates/router/src/bin/scheduler.rs**
Modify existing code
**crates/router/src/db.rs**
Remove:
- function: private::close
- function: private::close
- function: private::close
- impl: impl StorageInterface for Store
- impl: impl StorageInterface for MockDb
Add:
- impl: impl StorageInterface for Store
- impl: impl StorageInterface for MockDb
**crates/router/src/lib.rs**
Modify existing code
**crates/router/tests/utils.rs**
Modify existing code
|
{"issue_number": 1035, "pr_number": 1051, "commits_count": 1, "files_changed": 8, "response_length": 1643, "file_count": 10, "needs_breakdown": false}
|
bug(user): Wrong Internal user `org_id`
Currently when an internal user is being created, a new user will be created and a `user_role` with `merchant_id` as `juspay000` will also be inserted.
As the merchant `juspay000` already has a `org_id`, we should use that and insert that `org_id` in `user_role`, but currently a new `org_id` is being generated and inserted everytime when this API is hit.
|
<think>
PR Context:
- Title: fix(users): Populate correct `org_id` for Internal Signup
- Merged: 2024-06-05T13:08:00Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Internal signup will now use the `org_id` of `juspay000` and insert it in `user_roles`.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application config
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Populate correct `org_id` for Internal Signup (#4888)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Modify existing code
|
{"issue_number": 4887, "pr_number": 4888, "commits_count": 1, "files_changed": 2, "response_length": 999, "file_count": 4, "needs_breakdown": false}
|
feat(roles): edge cases for multi-tenancy - I
Add tenant_id in custom roles
Add generic query to search across all tenants
Close https://github.com/juspay/hyperswitch-cloud/issues/7998
Close https://github.com/juspay/hyperswitch-cloud/issues/7998
Close https://github.com/juspay/hyperswitch-cloud/issues/8026
|
<think>
PR Context:
- Title: feat(users): handle edge features for users in tenancy
- Merged: 2025-01-08T09:34:23Z
- Files changed: 18 files
- Commits: 9 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR
- add tenant_id in roles table
- add support for genenric query to serach user across all tenancies
- Fixes custom roles creates by tenant_level user
- List view for tenant level user
- Fix bug to search across envs for tenant admin
### Additional Changes
- [ ] This
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): handle edge features for users in tenancy (#6990)
Files to modify:
**crates/diesel_models/src/query/role.rs**
Modify existing code
**crates/diesel_models/src/query/user_role.rs**
Add:
- function: pub::list_user_roles_by_user_id_across_tenants
**crates/diesel_models/src/role.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/router/src/analytics.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/core/user_role/role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::list_user_roles_by_user_id_across_tenants
**crates/router/src/db/role.rs**
Modify existing code
**crates/router/src/db/user_role.rs**
Add:
- function: private::list_user_roles_by_user_id_across_tenants
- function: private::list_user_roles_by_user_id_across_tenants
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Modify existing code
**crates/router/src/utils/user.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"issue_number": 6999, "pr_number": 6990, "commits_count": 1, "files_changed": 18, "response_length": 2122, "file_count": 18, "needs_breakdown": true}
|
refactor(payment_methods): Fix db insert for payment method create
## 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 -->
Currently, payment method create API does not insert payment method record in the Db.
have added the db call to insert the record if not already present.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
<img width="1512" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/29b8d829-367f-4a6a-a84b-4a4e3b35fd6b">
<img width="1495" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/ff9e8311-eef7-4beb-9813-60534b216b60">
<img width="1507" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/70e42034-66b5-4a00-a703-7fafc8653cdf">
## 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(core): Address 500 when deleting payment method and add logs to postman collections
- Merged: 2023-07-24T12:50:55Z
- Files changed: 9 files
- Commits: 19 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
- When a payment is done through saved card flow, the details is stored in Vault. To delete this, we need to pass `payment_method_id`. Since the `payment_method_id` is **not** exposed, it is impossible to delete the payment data
- When a `PaymentMethod` is created without doing a payment, it is stored in the database (`payment_methods` table) and not in the
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(core): Address 500 when deleting payment method and add logs to postman collections (#1695)
Co-a
Files to modify:
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
|
{"issue_number": 1651, "pr_number": 1695, "commits_count": 1, "files_changed": 9, "response_length": 1015, "file_count": 4, "needs_breakdown": false}
|
[REFACTOR]: [Trustpay] 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): [trustpay] refactor trustpay and handled variants errors
- Merged: 2023-10-08T10:23:06Z
- 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 -->
Handling the unhandled variants for trustpay
Issue #2287
### 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:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [trustpay] refactor trustpay and handled variants errors (#2484)
Files to modify:
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
|
{"issue_number": 2287, "pr_number": 2484, "commits_count": 1, "files_changed": 2, "response_length": 994, "file_count": 3, "needs_breakdown": false}
|
[BUG] Missing required field `email` during payments_confirm
### Bug Description
It bugs out when a payment is created with the `email` field and then not passing it when confirming the payment.
### Expected Behavior
The confirm payment should succeed, it should take the email which was supplied during the payments create call.
### Actual Behavior
The email is not persisted anywhere, because of this, email is not available in subsequent calls
### Steps To Reproduce
1. Create a payment with email field present.
2. Confirm the payment without email id.
3. For zen connector, this payment should fail saying Missing required field `email`.
### Context For The Bug
_No response_
### Environment
Are you using hyperswitch hosted version? No
If yes, please provide the value of the `x-request-id` response header for helping us debug your issue.
### Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else
|
<think>
PR Context:
- Title: fix: update customer data if passed in payments
- Merged: 2023-06-09T14:00:12Z
- Files changed: 1 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 -->
This PR will update the customer details in payment, when sent in the payments request.
## 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 (unle
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix: update customer data if passed in payments (#1402)
Files to modify:
**crates/router/src/core/payments/helpers.rs**
Modify existing code
|
{"issue_number": 1325, "pr_number": 1402, "commits_count": 1, "files_changed": 1, "response_length": 924, "file_count": 3, "needs_breakdown": false}
|
[FEATURE]: [Dlocal] 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): [Dlocal] Implement feature to use connector_request_reference_id as reference to the connector
- Merged: 2023-10-27T12:24:12Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
…cal connector #2297
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Use connector_request_reference_id as reference to the connector #2297
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Dlocal] Implement feature to use connector_request_reference_id as reference to th
Files to modify:
**crates/router/src/connector/dlocal/transformers.rs**
Modify existing code
**Commit 2:** feat(connector): [Dlocal] Implement feature to use connector_request_reference_id as reference to th
Files to modify:
**crates/router/src/connector/dlocal/transformers.rs**
Modify existing code
|
{"issue_number": 2297, "pr_number": 2704, "commits_count": 2, "files_changed": 1, "response_length": 1254, "file_count": 5, "needs_breakdown": false}
|
feat: Create API for TOTP Verification
To complete the TOTP Flow, there needs to be an API which needs to verify the totp entered by the user and give the next token and flow that user should go to enter into the dashboard.
|
<think>
PR Context:
- Title: feat(users): Create API to Verify TOTP
- Merged: 2024-05-09T06:15:51Z
- Files changed: 9 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 allows users to complete the TOTP flow.
It adds a new api `/user/totp/verify`, which will verify the totp entered by the user and mark the user totp status as set if it is in `InProgress`.
### Additional Changes
- [x] This PR mo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): Create API to Verify TOTP (#4597)
Files to modify:
**crates/api_models/src/events/user.rs**
Modify existing code
**crates/api_models/src/user.rs**
Add:
- struct: pub::VerifyTotpRequest
**crates/router/src/core/errors/user.rs**
Modify existing code
**crates/router/src/core/user.rs**
Add:
- function: pub::verify_totp
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Add:
- function: pub::totp_verify
**crates/router/src/types/domain/user.rs**
Add:
- function: pub::decrypt_and_get_totp_secret
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 4596, "pr_number": 4597, "commits_count": 1, "files_changed": 9, "response_length": 1492, "file_count": 11, "needs_breakdown": false}
|
Improve UCS connector configuration format for better type safety and usability
## Problem Statement
The current unified connector service (UCS) configuration uses an array format for specifying connectors that should use UCS only. This approach has several limitations:
### Current Issues
1. **Type Safety**: The current `Vec<String>` approach allows invalid connector names to be specified without compile-time validation
2. **Configuration Verbosity**: Array format in TOML files is more verbose and harder to read/maintain
3. **Runtime Validation**: Invalid connector names are only caught at runtime when the configuration is parsed
4. **Inconsistent Format**: Different from other comma-separated configuration patterns used elsewhere in the codebase
### Current Configuration Format
```toml
[grpc_client.unified_connector_service]
ucs_only_connectors = [
"razorpay",
"phonepe",
"paytm",
"cashfree",
]
```
## Proposed Solution
Refactor the configuration to use a comma-separated string format with type-safe parsing:
### Benefits
- **Type Safety**: Use `HashSet<Connector>` with enum validation to prevent invalid connector names
- **Cleaner Configuration**: More concise and readable comma-separated format
- **Better Error Handling**: Custom deserializer with detailed error messages for invalid configurations
- **Consistency**: Aligns with other comma-separated configuration patterns in the codebase
- **Performance**: HashSet provides O(1) lookup time for connector validation
### Proposed Configuration Format
```toml
[grpc_client.unified_connector_service]
ucs_only_connectors = "paytm, phonepe, razorpay, cashfree"
```
## Implementation Requirements
1. **Custom Deserializer**: Implement a generic deserializer for comma-separated strings to typed HashSets
2. **Type Safety**: Use `Connector` enum instead of raw strings
3. **Backward Compatibility**: Ensure existing connector validation logic continues to work
4. **Configuration Updates**: Update all config files to use the new format
5. **Comprehensive Testing**: Add unit tests for the deserializer and configuration parsing
## Acceptance Criteria
- [x] Configuration uses comma-separated string format
- [x] Type-safe parsing with `Connector` enum validation
- [x] Custom deserializer handles edge cases (whitespace, duplicates, empty strings)
- [x] All configuration files updated consistently
- [x] Comprehensive unit tests for the deserializer
- [x] Existing connector validation logic works with new format
- [x] Detailed error messages for invalid configurations
## Labels
- Enhancement
- Configuration
- Type Safety
- Refactoring
|
<think>
PR Context:
- Title: refactor(config): change UCS connector list from array to comma-separated string
- Merged: 2025-08-13T15:11:30Z
- Files changed: 10 files
- Commits: 11 commits
Implementation approach:
# Refactor: Change UCS connector configuration from array to comma-separated string
## Summary
This PR refactors the unified connector service (UCS) configuration to use a comma-separated string format instead of an array for specifying connectors that should use UCS only. This change improves configuration management and parsing efficiency while maintaining type safety through a custom deserializer.
## Changes
- **Configuration Format Change**: Modified `ucs_only_connectors` from `Vec<Strin
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(config): change UCS connector list from array to comma-separated string (#8905)
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/external_services/src/lib.rs**
Add:
- mod: pub::utils
**crates/external_services/src/utils.rs**
Add:
- function: private::deserialize_hashset_inner
- function: pub::deserialize_hashset
- function: private::test_deserialize_hashset_inner_success
- function: private::test_deserialize_hashset_inner_with_whitespace
- function: private::test_deserialize_hashset_inner_empty_string
- function: private::test_deserialize_hashset_inner_single_value
- function: private::test_deserialize_hashset_inner_invalid_int
- function: private::test_deserialize_hashset_inner_duplicates
- mod: private::tests
**crates/router/src/core/unified_connector_service.rs**
Modify existing code
|
{"issue_number": 8906, "pr_number": 8905, "commits_count": 1, "files_changed": 10, "response_length": 1746, "file_count": 7, "needs_breakdown": false}
|
[FEATURE]: [ACI] 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): [Aci] Update connector_response_reference_id with merchant reference
- Merged: 2023-10-17T18:36:03Z
- Files changed: 2 files
- Commits: 9 commits
Implementation approach:
## Type of Change
- [x] New feature
## Description
The connector_response_reference_id parameter has been set for the ACIs Payment Solutions for uniform reference and transaction tracking.
## File Changes
This PR modifies the Aci Transformers file.
Location- router/src/connector/aci/transformers.rs
## Motivation and Context
The PR was raised so that it fixes #2205.
## How did you test it
- I ran the following command, and all the errors were addressed properly, and the build
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Aci] Update connector_response_reference_id with merchant reference (#2551)
Files to modify:
**crates/router/src/connector/aci/transformers.rs**
Modify existing code
|
{"issue_number": 2205, "pr_number": 2551, "commits_count": 1, "files_changed": 2, "response_length": 1005, "file_count": 3, "needs_breakdown": false}
|
[FEATURE] add a route that will invalidate cache
### Feature Description
Currently we don't have any way to manually invalidate cache that's stored in redis and in-memory, Add a route that given a key will invalidate both of redis and inmemory cache.
### Possible Implementation
So the in memory cache currently has `invalidate` function that will delete the entry in the cache, and in our redis interface we have `delete_key` function that will delete the entry from redis. You need to create a route in `app.rs` that will call this on `AdminApiKeyAuth`.
### 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(router): add route to invalidate cache entry
- Merged: 2023-06-21T08:03:24Z
- Files changed: 14 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
A new route to invalidate the in-memory cache and redis
### 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
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): add route to invalidate cache entry (#1100)
Co-authored-by: jeeva <jeeva.ramu@coduranc
Files to modify:
**crates/drainer/src/utils.rs**
Modify existing code
**crates/redis_interface/src/commands.rs**
Add:
- function: pub::delete_key
- function: private::test_delete_existing_key_success
**crates/redis_interface/src/errors.rs**
Modify existing code
**crates/redis_interface/src/types.rs**
Add:
- function: private::from_value
- enum: pub::DelReply
- impl: impl fred::types::FromRedis for DelReply
**crates/router/src/cache.rs**
Add:
- function: pub::remove
- function: private::invalidate_cache_for_key
**crates/router/src/core.rs**
Add:
- mod: pub::cache
**crates/router/src/core/cache.rs**
Add:
- function: pub::invalidate
**crates/router/src/db/queue.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Add:
- mod: pub::cache
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- struct: pub::Cache
- impl: impl Cache
**crates/router/src/routes/cache.rs**
Add:
- function: pub::invalidate
**crates/router/tests/cache.rs**
Add:
- function: private::invalidate_existing_cache_success
- function: private::invalidate_non_existing_cache_success
- mod: private::utils
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 995, "pr_number": 1100, "commits_count": 1, "files_changed": 14, "response_length": 2206, "file_count": 16, "needs_breakdown": true}
|
bug(authn): Throw 401 if cookies are not found
Currently BE is throwing 400 if cookies are not found and this is breaking FE if token is present in local storage but not in cookies.
If 401 is thrown, FE will remove the token from the local storage automatically.
|
<think>
PR Context:
- Title: refactor(users): Use domain email type in user DB functions
- Merged: 2024-11-29T13:37:38Z
- Files changed: 12 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR does 3 things.
1. Throw 401 if cookies are not found in request or if JWT is not found in cookies.
2. Cache role info only if the ttl is greater than or equal to 0.
3. Use `UserEmail` type in DB functions.
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(users): Use domain email type in user DB functions (#6699)
Files to modify:
**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
Modify existing code
**crates/router/src/compatibility/stripe/errors.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/user.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Modify existing code
**crates/router/src/services/authentication/cookies.rs**
Modify existing code
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Add:
- function: pub::get_inner
**crates/router/src/utils/user.rs**
Modify existing code
|
{"issue_number": 6696, "pr_number": 6699, "commits_count": 1, "files_changed": 12, "response_length": 1731, "file_count": 14, "needs_breakdown": false}
|
feat(router): added dispute accept api, file module apis and dispute evidence submission api
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Added support for following APIs
1. Dispute Accept API - To accept the dispute with connector.
2. File Upload API - Validate and Upload a file.
3. File Retrieve API - Download a file using file id.
4. File Delete API - Delete a file using file id.
5. Dispute Evidence Submission API - Submitting the evidences to connector using file ids.
### Additional Changes
- [x] This PR modifies the database schema
- [x] 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`
6. `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).
-->
## How did you test it?
Tested Manually
**Dispute Accept API - 2xx**

**Dispute Accept API - 4xx**

**File Upload API**

**File Retrieve API**

**File Delete API**

**File Metadata Schema in DB**
<img width="847" alt="image" src="https://user-images.githubusercontent.com/56996463/233167775-7d25042a-6349-4276-8314-b400e591f7b0.png">
**Submit Evidence API - 2xx**
<img width="1265" alt="image" src="https://user-images.githubusercontent.com/56996463/233171276-6ed4ff7c-7896-4f89-bd92-56a83df0a2fa.png">
**Submit Evidence API - 4xx**
<img width="1265" alt="image" src="https://user-images.githubusercontent.com/56996463/233170716-9f620d89-b954-45a5-a0c0-420140200b06.png">
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: Doc:Changelog for release v0.5.8
- Merged: 2023-05-03T10:17:47Z
- Files changed: 1 files
- Commits: 5 commits
Implementation approach:
# 0.5.8 (2023-04-25)
## Chores
* fix error message for deserialization ([#885](https://github.com/juspay/orca/pull/885)) ([e4d0dd0a](https://github.com/juspay/orca/commit/e4d0dd0a3885151a8e28a0246e67523f90f53076))
## Continuous Integration
* **connector-sanity-tests:** run tests on being queued for merge ([#960](https://github.com/juspay/orca/pull/960)) ([067dc709](https://github.com/juspay/orca/commit/067dc709360394b062c217ca3a27e011bfbac215))
* **manual-release:** fix `EXTRA_FE
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 900, "pr_number": 950, "commits_count": 0, "files_changed": 1, "response_length": 762, "file_count": 2, "needs_breakdown": false}
|
fix(core): save payment_method_type when creating a record in the payment_method table
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
When saving the payment method record to the payment_method table after a payment, only the PaymentMethod is saved but not the PaymentMethodType even if it is present in the request.
This PR fixes that.
<!--
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).
-->
I fixed a bug!
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Manually
<img width="1300" alt="Screenshot 2023-06-07 at 15 41 13" src="https://github.com/juspay/hyperswitch/assets/69745008/ef39a227-3db8-46dc-addd-0206ccc91b79">
<img width="1300" alt="Screenshot 2023-06-07 at 15 41 32" src="https://github.com/juspay/hyperswitch/assets/69745008/a32db4d9-be1f-45ce-add1-c42719097159">
<img width="1300" alt="Screenshot 2023-06-07 at 15 41 53" src="https://github.com/juspay/hyperswitch/assets/69745008/0cfe24ef-fd17-4113-8fa5-662b766bb5ea">
<img width="731" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/797e6478-0c56-4eb7-a871-daf579db7d8e">
## 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): `payment_method_type` not set in the payment attempt when making a recurring mandate payment
- Merged: 2023-06-20T14:29:36Z
- Files changed: 5 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
When doing a recurring mandate payment, the `payment_method` is set in the newly created payment attempt but the `payment_method_type` is not set. This PR aims to fix that.
**[#1378](https://github.com/juspay/hyperswitch/pull/1378) HAS TO BE MERGED BEFORE THIS PR IS MERGED AS THE CURRENT PR IS DEPENDENT ON THAT!**
**WHEN CREATING A MANDATE, MAKE SURE YOU
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(core): `payment_method_type` not set in the payment attempt when making a recurring mandate paym
Files to modify:
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
|
{"issue_number": 1378, "pr_number": 1415, "commits_count": 1, "files_changed": 5, "response_length": 1394, "file_count": 8, "needs_breakdown": false}
|
feat(user): get user information (home api)
Create new api to get user details.
|
<think>
PR Context:
- Title: feat(user): add route to get user details
- Merged: 2024-05-02T09:52:49Z
- Files changed: 7 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
Add support to get user details!
### 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.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(user): add route to get user details (#4510)
Co-authored-by: hyperswitch-bot[bot] <148525504+hy
Files to modify:
**crates/api_models/src/events/user.rs**
Modify existing code
**crates/api_models/src/user.rs**
Add:
- struct: pub::GetUserDetailsResponse
**crates/router/src/core/user.rs**
Add:
- function: pub::get_user_details
**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_details
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 4509, "pr_number": 4510, "commits_count": 1, "files_changed": 7, "response_length": 1398, "file_count": 9, "needs_breakdown": false}
|
fix(openapi): Standardise API naming scheme for V2
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Use kebab-case for all API endpoints in V2
### 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`
-->
## 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)?
-->
This is mostly a documentation PR, doesn't require any additional test cases.
Verified that existing cypress tests are passing
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: fix(openapi): Revert Standardise API naming scheme for V2 Dashboard Changes
- Merged: 2024-12-02T09:29:35Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Reverts part of juspay/hyperswitch#6510
This PR also changed the dashboard related APIs, which doesn't come under the V2 changes that team is doing. As this is not a backwards compatible change, dashboard is breaking. Revert the dashboard API related changes.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(openapi): Revert Standardise API naming scheme for V2 Dashboard Changes (#6712)
Files to modify:
**crates/router/src/routes/app.rs**
Modify existing code
|
{"issue_number": 6510, "pr_number": 6712, "commits_count": 1, "files_changed": 1, "response_length": 731, "file_count": 3, "needs_breakdown": false}
|
feat(payments): show aggregate count of refund status
|
<think>
PR Context:
- Title: feat(refunds): Refunds aggregate api
- Merged: 2024-09-12T13:57:33Z
- Files changed: 14 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
Added new api for refunds status aggregate
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(refunds): Refunds aggregate api (#5795)
Co-authored-by: hyperswitch-bot[bot] <148525504+hypersw
Files to modify:
**crates/api_models/src/events/refund.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for RefundAggregateResponse
**crates/api_models/src/refunds.rs**
Add:
- struct: pub::RefundAggregateResponse
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/core/refunds.rs**
Add:
- function: pub::get_aggregates_for_refunds
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::get_refund_status_with_count
**crates/router/src/db/refund.rs**
Add:
- function: private::get_refund_status_with_count
- function: private::get_refund_status_with_count
- function: private::get_refund_status_with_count
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/refunds.rs**
Add:
- function: pub::get_refunds_aggregates
**crates/router/src/types/storage/refund.rs**
Add:
- function: private::get_refund_status_with_count
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 5796, "pr_number": 5795, "commits_count": 1, "files_changed": 14, "response_length": 2045, "file_count": 14, "needs_breakdown": false}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.