prompt
stringlengths 24
63.1k
| response
stringlengths 180
101k
| metadata
stringlengths 143
152
|
|---|---|---|
reafactor(storage): Split storage & data models responsibilities
This will serve as a tracking issue for splitting out storage functionality from domain/data models
The objective is to bring more genericity for storage implementations & better representation for payment methods in general
This would end up creating a new crate for storage implementations where in all database layer code is abstracted from the router application & is abstracted over
|
<think>
PR Context:
- Title: refactor(storage): update crate name to diesel models
- Merged: 2023-07-12T13:27:59Z
- Files changed: 30 files
- Commits: 4 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- rename the storage models crate name to be more apt
- future steps would involve creating a separate crate for data/domain models & splitting the functionality one change at a time
### Additional Changes
- [ ] This PR modifies the API
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(storage): update crate name to diesel models (#1685)
Files to modify:
**crates/drainer/src/lib.rs**
Modify existing code
**crates/router/src/configs/settings.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/cashtocode/transformers.rs**
Modify existing code
**crates/router/src/connector/checkout.rs**
Modify existing code
**crates/router/src/connector/cybersource.rs**
Modify existing code
**crates/router/src/connector/dlocal/transformers.rs**
Modify existing code
**crates/router/src/connector/dummyconnector.rs**
Modify existing code
**crates/router/src/connector/dummyconnector/transformers.rs**
Modify existing code
**crates/router/src/connector/globalpay.rs**
Modify existing code
**crates/router/src/connector/mollie/transformers.rs**
Modify existing code
**crates/router/src/connector/multisafepay/transformers.rs**
Modify existing code
**crates/router/src/connector/nmi/transformers.rs**
Modify existing code
**crates/router/src/connector/noon/transformers.rs**
Modify existing code
**crates/router/src/connector/nuvei.rs**
Modify existing code
**crates/router/src/connector/nuvei/transformers.rs**
Modify existing code
**crates/router/src/connector/payeezy/transformers.rs**
Modify existing code
**crates/router/src/connector/paypal.rs**
Modify existing code
**crates/router/src/connector/rapyd/transformers.rs**
Modify existing code
**crates/router/src/connector/shift4.rs**
Modify existing code
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/connector/trustpay.rs**
Modify existing code
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Modify existing code
**crates/router/src/connector/worldline.rs**
Modify existing code
**crates/router/src/connector/worldpay.rs**
Modify existing code
**crates/router/src/connector/worldpay/transformers.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/api_keys.rs**
Modify existing code
**crates/router/src/core/configs.rs**
Modify existing code
**crates/router/src/core/disputes.rs**
Modify existing code
**crates/router/src/core/disputes/transformers.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Modify existing code
**crates/router/src/core/files.rs**
Modify existing code
**crates/router/src/core/files/helpers.rs**
Modify existing code
**crates/router/src/core/mandate.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/flows/authorize_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/verify_flow.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/core/refunds/validator.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/src/core/webhooks.rs**
Modify existing code
**crates/router/src/db/address.rs**
Modify existing code
**crates/router/src/db/configs.rs**
Modify existing code
**crates/router/src/db/dispute.rs**
Modify existing code
**crates/router/src/db/events.rs**
Modify existing code
**crates/router/src/db/mandate.rs**
Modify existing code
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/router/src/db/merchant_key_store.rs**
Modify existing code
**crates/router/src/db/payment_attempt.rs**
Modify existing code
**crates/router/src/db/payment_method.rs**
Modify existing code
**crates/router/src/db/refund.rs**
Modify existing code
**crates/router/src/scheduler/workflows/api_key_expiry.rs**
Modify existing code
**crates/router/src/services.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/domain/address.rs**
Modify existing code
**crates/router/src/types/domain/customer.rs**
Modify existing code
**crates/router/src/types/domain/merchant_account.rs**
Modify existing code
**crates/router/src/types/domain/merchant_connector_account.rs**
Modify existing code
**crates/router/src/types/domain/merchant_key_store.rs**
Modify existing code
**crates/router/src/types/domain/types.rs**
Modify existing code
**crates/router/src/types/storage/address.rs**
Modify existing code
**crates/router/src/types/storage/api_keys.rs**
Modify existing code
**crates/router/src/types/storage/cards_info.rs**
Modify existing code
**crates/router/src/types/storage/configs.rs**
Modify existing code
**crates/router/src/types/storage/connector_response.rs**
Modify existing code
**crates/router/src/types/storage/customers.rs**
Modify existing code
**crates/router/src/types/storage/dispute.rs**
Modify existing code
**crates/router/src/types/storage/enums.rs**
Modify existing code
**crates/router/src/types/storage/ephemeral_key.rs**
Modify existing code
**crates/router/src/types/storage/events.rs**
Modify existing code
**crates/router/src/types/storage/file.rs**
Modify existing code
**crates/router/src/types/storage/kv.rs**
Modify existing code
**crates/router/src/types/storage/locker_mock_up.rs**
Modify existing code
**crates/router/src/types/storage/mandate.rs**
Modify existing code
**crates/router/src/types/storage/merchant_account.rs**
Modify existing code
**crates/router/src/types/storage/merchant_connector_account.rs**
Modify existing code
**crates/router/src/types/storage/payment_attempt.rs**
Modify existing code
**crates/router/src/types/storage/payment_intent.rs**
Modify existing code
**crates/router/src/types/storage/payment_method.rs**
Modify existing code
**crates/router/src/types/storage/process_tracker.rs**
Modify existing code
**crates/router/src/types/storage/query.rs**
Modify existing code
**crates/router/src/types/storage/refund.rs**
Modify existing code
**crates/router/src/types/storage/reverse_lookup.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/router/src/utils.rs**
Modify existing code
**crates/router/tests/connectors/airwallex.rs**
Modify existing code
**crates/router/tests/connectors/authorizedotnet.rs**
Modify existing code
**crates/router/tests/connectors/bambora.rs**
Modify existing code
**crates/router/tests/connectors/fiserv.rs**
Modify existing code
**crates/router/tests/connectors/nexinets.rs**
Modify existing code
**crates/router/tests/connectors/payeezy.rs**
Modify existing code
**crates/router/tests/connectors/rapyd.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
|
{"issue_number": 1684, "pr_number": 1685, "commits_count": 1, "files_changed": 30, "response_length": 8140, "file_count": 104, "needs_breakdown": true}
|
feat(connector): [PowerTranz] Add cards 3ds support for PowerTranz connector
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
3DS support for cards payment through powertranz connector
### 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
To support 3ds cards through powertranz connector
## How did you test it?
<img width="1293" alt="Screen Shot 2023-07-16 at 11 29 43 PM" src="https://github.com/juspay/hyperswitch/assets/20727986/deec39b1-2f46-4211-8f26-5618493a1cc9">
<img width="1723" alt="Screen Shot 2023-07-16 at 11 33 10 PM" src="https://github.com/juspay/hyperswitch/assets/20727986/21526ae3-acae-4f7e-848e-3af041fc2a58">
<img width="1294" alt="Screen Shot 2023-07-16 at 11 29 58 PM" src="https://github.com/juspay/hyperswitch/assets/20727986/d0b05451-453c-4460-a0e4-22aa618b7735">
## 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): [PowerTranz] resolve pr comments and add comments
- Merged: 2023-07-18T12:40:36Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Description
resolve pr comments and add comments
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding change
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [PowerTranz] resolve pr comments and add comments (#1726)
Files to modify:
**crates/router/src/connector/powertranz.rs**
Modify existing code
**crates/router/src/connector/powertranz/transformers.rs**
Modify existing code
**Commit 2:** fix(connector): [PowerTranz] resolve pr comments and add comments (#1726)
Files to modify:
**crates/router/src/connector/powertranz.rs**
Modify existing code
**crates/router/src/connector/powertranz/transformers.rs**
Modify existing code
|
{"issue_number": 1722, "pr_number": 1726, "commits_count": 2, "files_changed": 2, "response_length": 1302, "file_count": 7, "needs_breakdown": false}
|
feat(single_use): add extra fields in `Mandate` table and `MandateData` [Blocked on #61]
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
This PR adds single use mandate support and a 2 new fields to the mandate table (i.e. singe_use_amount, single_use_currency)
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
The change includes the following files.
- migrations/2022-12-05-090521_single_use_mandate_fields/up.sql
- migrations/2022-12-05-090521_single_use_mandate_fields/down.sql
## Motivation and Context
Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to.
1. Create new types for the change #45
2. Introduce the Flow and Connector Integration #47
3. Add Stripe POC #50
4. Introduce the new operation and all the related components in the payments core #53 + #61
5. Changing the `MandateData` type
6. Move the mandate related behaviour to domain
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(payouts): add payout currency in wasm crate
- Merged: 2025-09-30T14:41:56Z
- Files changed: 4 files
- Commits: 1 commits
Implementation approach:
## Description
This PR adds two changes
1. Updates `Sepa` to `SepaBankTransfer` for dynamic required fields for payouts
2. Adds PayoutCurrency as a rule to be set while configuring payout routing on dashboard
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modif
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payouts): add payout currency in wasm crate (#9626)
Files to modify:
**crates/euclid/src/frontend/dir.rs**
Modify existing code
**crates/euclid/src/types.rs**
Modify existing code
**crates/euclid_wasm/src/lib.rs**
Modify existing code
**crates/router/src/configs/defaults/payout_required_fields.rs**
Modify existing code
|
{"issue_number": 66, "pr_number": 9626, "commits_count": 1, "files_changed": 4, "response_length": 1119, "file_count": 6, "needs_breakdown": false}
|
Add support to call decision engine Dynamic Routing from hyperswitch after API key authentication
|
<think>
PR Context:
- Title: feat(routing): Add API key auth for decision engine endpoints
- Merged: 2025-07-21T13:38:52Z
- Files changed: 8 files
- Commits: 10 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds API key auth to the decision engine endpoints for the decide gateway call and the update gateway score call.
### Additional Changes
- [x] 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:** feat(routing): Add API key auth for decision engine endpoints (#8640)
Co-authored-by: hyperswitch-bo
Files to modify:
**crates/api_models/src/events/routing.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 crate::open_router::DecideGatewayResponse
- impl: impl ApiEventMetric for crate::open_router::OpenRouterDecideGatewayRequest
- impl: impl ApiEventMetric for crate::open_router::UpdateScorePayload
- impl: impl ApiEventMetric for crate::open_router::UpdateScoreResponse
**crates/api_models/src/open_router.rs**
Add:
- struct: pub::DecideGatewayResponse
- struct: pub::PriorityLogicOutput
- struct: pub::PriorityLogicData
**crates/router/src/core/payments/routing/utils.rs**
Modify existing code
**crates/router/src/core/routing.rs**
Add:
- function: pub::decide_gateway_open_router
- function: pub::update_gateway_score_open_router
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/routing.rs**
Add:
- function: pub::call_decide_gateway_open_router
- function: pub::call_update_gateway_score_open_router
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 8613, "pr_number": 8640, "commits_count": 1, "files_changed": 8, "response_length": 2201, "file_count": 10, "needs_breakdown": false}
|
[Feature] Add a cargo binary for running diesel migrations locally
### Objective
Add a new binary in the `router` crate that would run migrations locally via cli i.e `cargo run migrations`.
### Context
Currently migrations are managed via the diesel_cli which rely on explicitly providing the database username/password & host,
This is a bit cumbersome when you have to provide the variables over & over again.
```bash
diesel migration --database-url postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME run
```
It would be somewhat easier if we could leverage [`diesel_migrations`](https://docs.rs/diesel_migrations/latest/diesel_migrations/) to read the credentials from config file / env & apply migrations.
(Open to alternative approaches as well for this)
### Outcomes
- A new rust binary that can be used for running local db migrations from file
- Updates to the local setup documentation outlining the usage of this cli tool
|
<think>
PR Context:
- Title: feat: add `hsdev` binary to run migrations
- Merged: 2024-07-08T17:32:18Z
- Files changed: 5 files
- Commits: 15 commits
Implementation approach:
## Description
This PR closes #4589
Created a new Rust binary in the `crates` directory which automates the Diesel migrations with Postgres. The new tool is a CLI tool that takes a path to a TOML file as an argument along with the name of a TOML table to extract Postgres database credentials from.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add `hsdev` binary to run migrations (#4877)
Co-authored-by: James Motherwell <motherwell.jame
Files to modify:
**crates/hsdev/src/input_file.rs**
Add:
- function: pub::read
- function: pub::postgres_url
- struct: pub::InputData
- impl: impl InputData
**crates/hsdev/src/main.rs**
Add:
- function: private::main
- function: pub::get_toml_table
- function: private::test_input_file
- function: private::test_given_toml
- struct: private::Args
- mod: private::input_file
- mod: private::tests
|
{"issue_number": 4589, "pr_number": 4877, "commits_count": 1, "files_changed": 5, "response_length": 1323, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] Implementing iDEAL and Giropay payment methods with Multisafe
### Feature Description
Add iDEAL and Giropay payment processors in [Multisafepay](https://docs.hyperswitch.io/hyperswitch-cloud/connectors/available-connectors/multisafepay) connector.
Whole description can be found in #4143 discussion.
### Possible Implementation
## Proposal: **Implementing iDEAL and Giropay payment methods with Multisafe** #4143
### Objective
Add iDEAL and Giropay payment processors in [Multisafepay](https://docs.hyperswitch.io/hyperswitch-cloud/connectors/available-connectors/multisafepay) connector.
### Background
Currently multisafepay provides various payment processors from Banking Methods, BNPL, Credit and Debit cards, Prepaid cards and Wallets segment. From these hyperswitch's multisafepay connector provides support for credit cards and debit cards, mendate payements, GooglePay, Paypal and Klarna only. iDEAL and Giropay are from "Banking Methods" category.
#### iDeal
iDeal has direct and re-directed flow which is showed below:

**direct**: given **iDEAL issuer code** user customer will be directly redirected to the bank’s
page
**redirect:** Redirect customer to payment’s page to select their bank.
#### Giropay
giropay has only redirect flow which is exactly same flow as iDEAL’s redirect flow.

### Approach
For iDeal deciding direct or re-direct payment type:
If bank name is provided in `PaymentMethodData` then direct path should be used otherwise redirect. If direct flow is selected then in `MultisafepayPaymentsRequest` ’s `gateway_info` must have **`issuer_id`** field.
List of iDEAL issuers and respective code is given below ([source](https://docs.multisafepay.com/reference/listidealissuers))
| Code | Description |
| ---- | --------------------- |
| 0031 | ABN AMRO |
| 0761 | ASN Bank |
| 4371 | bunq |
| 1235 | Handelsbanken |
| 9927 | Nationale Nederlanden |
| 9926 | N26 |
| 0721 | ING |
| 0801 | Knab |
| 0021 | Rabobank |
| 0771 | Regio Bank |
| 1099 | Revolut |
| 0751 | SNS Bank |
| 0511 | Triodos Bank |
| 0161 | Van Lanschot Bankiers |
| 0806 | Yoursafe |
Only these banks should be allowed in `PaymentMethodData` for iDEAL.
#### Implementation
All the changes will be in `connector/multisafepay.rs` file and in the enums and traits for request object
- Add `Ideal` and `Giropay` in `Gateway` enum
- changes in `impl TryFrom<&CheckoutRouterData<&T>> for MultisafepayPaymentsRequest`
- for `payment_type` : add pattern for redirect “giropay” and “iDeal” and direct “iDeal” payments
- for `gateway` : add `BankRedirectData::Ideal` and `BankRedirectData::Geropay` pattern
- for `gateway_info`: Only for direct “iDeal” payments,
- `issuer_id` : get issuer id from the table above
There are also optional `gateway_info` fields for modifying payment behaviours like **`allow_change_amount` , `min_amount` and `max_amount`** which are related to QR code payment in direct flop.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(connector): [Multisafepay] Add support for Ideal and Giropay
- Merged: 2024-06-11T13:59:42Z
- Files changed: 5 files
- Commits: 11 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add iDEAL and Giropay payment processors in [Multisafepay](https://docs.hyperswitch.io/hyperswitch-cloud/connectors/available-connectors/multisafepay) connector.
Whole description can be found in https://github.com/juspay/hyperswitch/disc
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Multisafepay] Add support for Ideal and Giropay (#4398)
Files to modify:
**crates/router/src/connector/multisafepay/transformers.rs**
Add:
- function: private::try_from
- struct: pub::IdealInfo
- enum: pub::BankRedirectInfo
- enum: pub::MultisafepayBankNames
- impl: impl TryFrom<&BankNames> for MultisafepayBankNames
|
{"issue_number": 4397, "pr_number": 4398, "commits_count": 1, "files_changed": 5, "response_length": 1160, "file_count": 3, "needs_breakdown": false}
|
[FEATURE]: [Dlocal] Currency Unit Conversion
### :memo: Feature Description
- Each currency can be described in terms of base or minor units.
- For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit.
- In Hyperswitch, the amount value is expected to be always provided in minor units.
- For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent)
- Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them.
- We have functions `to_currency_base_unit` and `to_currency_lower_unit` in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector.
### :hammer: Possible Implementation
- ConnectorCommon trait have been implemented for the connector.
- This trait contains `get_currency_unit` method. This method needs to be implemented.
- It will define what type of conversion needs to be done during `connector_router_data` creation. Concurrently handle the creation of `connector_router_data` to be passed for the connector request body creation.
- You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2196
:bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/`
### :package: Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### :sparkles: Are you willing to submit a PR?
|
<think>
PR Context:
- Title: refactor(connector): [Dlocal] Currency Unit Conversion
- Merged: 2023-10-19T07:19:41Z
- Files changed: 2 files
- Commits: 17 commits
Implementation approach:
## Description
- Addressing Issue: #2223
- Modified two files in `hyperswitch/crates/router/src/connector/`
- `dlocal.rs`
- Implement `get_currency_unit` function
- Modify `ConnectorIntegration` implementations for `Dlocal`
- `dlocal/transformers.rs`
- Implement `DlocalRouterD
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Dlocal] Currency Unit Conversion (#2615)
Co-authored-by: chikke srujan <121822
Files to modify:
**crates/router/src/connector/dlocal.rs**
Add:
- function: private::get_currency_unit
**crates/router/src/connector/dlocal/transformers.rs**
Add:
- function: private::try_from
- struct: pub::DlocalRouterData
- impl: impl TryFrom<(
&types::api::CurrencyUnit,
types::storage::enums::Currency,
i64,
T,
)> for DlocalRouterData<T>
|
{"issue_number": 2223, "pr_number": 2615, "commits_count": 1, "files_changed": 2, "response_length": 1290, "file_count": 4, "needs_breakdown": false}
|
fix(locker): remove delete_locker_payment_method_by_lookup_key from payments_operation_core
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
The function call responsible for deleting card details from payments_operations_core() has been removed in this PR. This modification ensures that the redundant deletion of already deleted card details no longer occurs, preventing the unnecessary error from being triggered.
### 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).
-->
Previously, there was a function call within payments_operations_core() that deleted card details stored in the Basilisk Locker V3. However, it was discovered that the process tracker was also attempting to delete the same card details, resulting in an unnecessary error when trying to delete an already deleted card.
## 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, compiler-guided
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: fix(payment_methods): delete token when a payment reaches terminal state
- Merged: 2023-08-10T12:56:04Z
- Files changed: 4 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
The function call responsible for deleting card details from payments_operations_core() was been removed in this PR #1636. This modification ensured that the redundant deletion of already deleted card details no longer occurs, preventing the u
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_methods): delete token when a payment reaches terminal state (#1818)
Files to modify:
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Add:
- function: pub::create_key_for_token
- function: pub::insert
- function: pub::should_delete_payment_method_token
- function: pub::delete
- struct: pub::ParentPaymentMethodToken
- impl: impl ParentPaymentMethodToken
|
{"issue_number": 1636, "pr_number": 1818, "commits_count": 1, "files_changed": 4, "response_length": 1409, "file_count": 6, "needs_breakdown": false}
|
[REFACTOR] Define the Mapping between `ConnectorError` and `ApiErrorResponse` using the `ErrorSwitch` trait
### Feature Description
Currently, we are mapping errors from `ConnectorError` to `ApiErrorResponse` using custom logic (can be found [here](https://github.com/juspay/hyperswitch/blob/cd0cf40fe29358700f92c1520475934752bb4b30/crates/router/src/core/webhooks/utils.rs#L52)).
We want to refactor this implementation to make use of the existing `ErrorSwitch` trait which satisfies the same usecase.
### Possible Implementation
We have a custom trait for conversion of error from `ConnectorError` to `ApiErrorResponse` as can be found using the link in the description above. The mapping has to be defined using the `ErrorSwitch` trait instead, and the custom trait can hence be deleted.
### Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else
|
<think>
PR Context:
- Title: refactor(router): remove `WebhookApiErrorSwitch ` and implement error mapping using `ErrorSwitch`
- Merged: 2023-07-17T17:57:01Z
- Files changed: 5 files
- Commits: 4 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(router): remove `WebhookApiErrorSwitch ` and implement error mapping using `ErrorSwitch` (#
Files to modify:
**crates/router/src/core/errors.rs**
Add:
- mod: pub::transformers
**crates/router/src/core/errors/api_error_response.rs**
Remove:
- function: private::switch
- impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ApiErrorResponse
**crates/router/src/core/errors/transformers.rs**
Add:
- function: private::switch
- function: private::switch
- impl: impl ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ApiErrorResponse
- impl: impl ErrorSwitch<ApiErrorResponse> for ConnectorError
**crates/router/src/core/webhooks.rs**
Modify existing code
**crates/router/src/core/webhooks/utils.rs**
Remove:
- function: private::switch
- trait: pub::WebhookApiErrorSwitch
- impl: impl WebhookApiErrorSwitch<T> for errors::CustomResult<T, errors::ConnectorError>
|
{"issue_number": 1326, "pr_number": 1660, "commits_count": 1, "files_changed": 5, "response_length": 1806, "file_count": 7, "needs_breakdown": false}
|
[BUG] Broken link to FAQs
### Bug Description
The link in this line:
https://github.com/juspay/hyperswitch/blob/19a8474d8731ed7149b541f02ad237e30c4c9f24/README.md?plain=1#L317
is broken.
### Expected Behavior
When I click the link I should be taken to some FAQ page.
### Actual Behavior
When I click that link I am taken to: https://docs.hyperswitch.io/
### Steps To Reproduce
1. Go to the [FAQ section](https://github.com/juspay/hyperswitch?tab=readme-ov-file#FAQs),
2. Click the link.
### Context For The Bug
Since https://hyperswitch.io/docs/devSupport does not exist anymore and each feature has its own FAQ, I would suggest to remove the entire FAQ section in the main README.md file.
### Environment
Not relevant.
### 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: docs(README): remove FAQs section
- Merged: 2024-10-15T08:34:46Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6294, "pr_number": 6297, "commits_count": 0, "files_changed": 1, "response_length": 763, "file_count": 0, "needs_breakdown": false}
|
feat(config): add fetch endpoint for config table
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
Added fetch endpoint for config table.
## 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 PR adds cached fetch to config table, for dynamically configuring application.
## 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="1300" alt="image" src="https://user-images.githubusercontent.com/43412619/215578409-3bbc50c1-47e2-46b8-86f4-23b44ac44db5.png">
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
|
<think>
PR Context:
- Title: feat(cache): add generic cache functions to populate and invalidate cache
- Merged: 2023-02-03T14:05:42Z
- Files changed: 2 files
- Commits: 6 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This adds generic helper functions which helps to populate cache and update cache.
## 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 i
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(cache): add generic cache functions to populate and invalidate cache (#483)
Files to modify:
**crates/router/src/db.rs**
Add:
- mod: pub::cache
**crates/router/src/db/cache.rs**
Add:
- function: pub::get_or_populate_cache
- function: pub::redact_cache
|
{"issue_number": 481, "pr_number": 483, "commits_count": 1, "files_changed": 2, "response_length": 1081, "file_count": 4, "needs_breakdown": false}
|
feat(connector): [BANKOFAMERICA] Add Required Fields for GPAY
## 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 -->
Following are the required fields for Google Pay Payments via Bank of America
1. Email
2. Billing Address(which contains the following fields)
- First Name
- Last Name
- City
- State
- Zip/Postal Code
- Country
- Address Line 1
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
3. `crates/router/src/configs`
4. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
https://github.com/juspay/hyperswitch-cloud/issues/3297
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Test cases - Make a confirm false call, and make "list pm for merchant" call, in required fields, updated fields such as Billing first name, last name, line1, city, zip, country should show up for Bankofamerica
<img width="1728" alt="Screenshot 2023-11-30 at 1 24 50 AM" src="https://github.com/juspay/hyperswitch/assets/41580413/080b1aab-a438-497a-a32a-befa6919ab1c">
<img width="1728" alt="Screenshot 2023-11-30 at 1 24 57 AM" src="https://github.com/juspay/hyperswitch/assets/41580413/d38fc112-77da-4238-b6f6-32a70346fcfb">
## 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(core): [Paypal] Add Preprocessing flow to CompleteAuthorize for Card 3DS Auth Verification
- Merged: 2023-11-28T11:29:23Z
- Files changed: 9 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- An auth verification call is made to paypal after 3ds challenge to get the status on whether to continue payment.
- Pre processing flow is being used for the call since we want to send the response in case of failure
- Pre processing is
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): [Paypal] Add Preprocessing flow to CompleteAuthorize for Card 3DS Auth Verification (#27
Files to modify:
**crates/router/src/connector/paypal.rs**
Add:
- function: private::get_headers
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- impl: impl api::PaymentsPreProcessing for Paypal
- impl: impl ConnectorIntegration<
api::PreProcessing,
types::PaymentsPreProcessingData,
types::PaymentsResponseData,
> for Paypal
**crates/router/src/connector/paypal/transformers.rs**
Add:
- struct: pub::PaypalPreProcessingResponse
- struct: pub::CardParams
- struct: pub::AuthResult
- struct: pub::PaypalThreeDsParams
- struct: pub::ThreeDsCheck
- enum: pub::LiabilityShift
- enum: pub::EnrollementStatus
- enum: pub::AuthenticationStatus
**crates/router/src/consts.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/complete_authorize_flow.rs**
Add:
- function: private::preprocessing_steps
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
|
{"issue_number": 3014, "pr_number": 2757, "commits_count": 1, "files_changed": 9, "response_length": 2279, "file_count": 11, "needs_breakdown": false}
|
fix(users): Check lineage across entities in invite
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
This PR fixes it.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] 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).
-->
Closes #6679.
## 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. Invite a user in a specific (org, merchant, profile) combination.
2. Create a new profile in the same merchant account and switch to it.
3. Invite the same user as merchant level user. This should be stopped by API.
## 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(users): Check lineage across entities in invite
- Merged: 2024-11-27T14:40:31Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
[
## Description
<!-- Describe your changes in detail -->
Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
This PR fixes it.
Main PR: #6677
### Additional Changes
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Check lineage across entities in invite (#6680)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 6677, "pr_number": 6680, "commits_count": 1, "files_changed": 1, "response_length": 920, "file_count": 3, "needs_breakdown": false}
|
feat(analytics): add `sessionized_metrics` for refunds (backwards compatibility) and `currency_conversion`
## Current Behaviour
- There is no `sessionized_metrics` module for refunds like there is for `payments` and `payment_intents`
- Update the existing metrics with `currency_conversion` usage.
## Proposed Changes
- create `sessionized_metrics` module for refunds
- implement `currency_conversion` for refunds analytics
|
<think>
PR Context:
- Title: feat(analytics): add `sessionized_metrics` and `currency_conversion` for refunds analytics
- Merged: 2024-11-14T09:13:34Z
- Files changed: 17 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Add sessionized metrics module and implement backwards compatibility.
- Implement currency conversion for refunds analytics
### Minor unrelated changes
- refactor inconsistent naming of fields in some places => [commit](https://github.c
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): add `sessionized_metrics` and `currency_conversion` for refunds analytics (#6419)
Files to modify:
**crates/analytics/src/payment_intents/core.rs**
Modify existing code
**crates/analytics/src/payments/accumulator.rs**
Modify existing code
**crates/analytics/src/payments/core.rs**
Modify existing code
**crates/analytics/src/refunds/accumulator.rs**
Modify existing code
**crates/analytics/src/refunds/core.rs**
Modify existing code
**crates/analytics/src/refunds/metrics.rs**
Add:
- mod: private::sessionized_metrics
**crates/analytics/src/refunds/metrics/refund_processed_amount.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rs**
Add:
- mod: private::refund_count
- mod: private::refund_processed_amount
- mod: private::refund_success_count
- mod: private::refund_success_rate
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_count.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundCount
- impl: impl super::RefundMetric<T> for RefundCount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_processed_amount.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundProcessedAmount
- impl: impl super::RefundMetric<T> for RefundProcessedAmount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_count.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundSuccessCount
- impl: impl super::RefundMetric<T> for RefundSuccessCount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_rate.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundSuccessRate
- impl: impl super::RefundMetric<T> for RefundSuccessRate
**crates/api_models/src/analytics.rs**
Add:
- struct: pub::RefundsAnalyticsMetadata
- struct: pub::RefundsMetricsResponse
**crates/api_models/src/analytics/payments.rs**
Modify existing code
**crates/api_models/src/analytics/refunds.rs**
Modify existing code
**crates/api_models/src/events.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for RefundsMetricsResponse<T>
**crates/router/src/analytics.rs**
Modify existing code
|
{"issue_number": 6417, "pr_number": 6419, "commits_count": 1, "files_changed": 17, "response_length": 3107, "file_count": 19, "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: feat(cypress): add iatapay connector
- Merged: 2024-06-28T10:51:59Z
- Files changed: 16 files
- Commits: 16 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds Iatapay connector
- Payment Method: UPI
- Payment Method Types:
- UPI Collect
- UPI Intent
Will consider adding `UPI Payments -- Hyperswitch Stripe Compatibility Layer` in future.
Notable changes:
- Removed `R
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 5128, "pr_number": 5093, "commits_count": 0, "files_changed": 16, "response_length": 768, "file_count": 0, "needs_breakdown": false}
|
fix(router): [Stripe/Itau/Paypal/Bambora] prevent partial submission of billing address and add required fields for all payment methods
## 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 -->
Prevent partial submission of billing address for Stripe, Itau, Paypal and Bambora
## 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 stripe, Itau, Paypal, Adyen, Braintree and Bambora connector accounts for a single merchant
1. Create a card payment with required fields only - Stripe
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
} ,
"email": "[email protected]"
},
"shipping": {
"address": {
"city": "San Fransico",
"state": "California"
}
},
"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": {
"connector": "stripe",
"merchant_connector_id": "mca_nKt0x0ccAOYLFM5OiH60"
}
}
}'
```
Response
```
{
"payment_id": "pay_aGHIhXV9ofU9JjOkXNDt",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 0,
"amount_received": 6540,
"connector": "stripe",
"client_secret": "pay_aGHIhXV9ofU9JjOkXNDt_secret_6Grt3YnrTmdEMW99lB0k",
"created": "2024-08-27T05:17:34.099Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"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": "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": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": {
"cvc_check": "pass",
"address_line1_check": "pass",
"address_postal_code_check": "pass"
},
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": null,
"line1": null,
"line2": null,
"line3": null,
"zip": null,
"state": "California",
"first_name": null,
"last_name": null
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "AU",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724735854,
"expires": 1724739454,
"secret": "epk_9d792f16f0d249f9bfa1876ce0c6ee63"
},
"manual_retry_allowed": false,
"connector_transaction_id": "pi_3PsHmdD5R7gDAGff0wct5mM2",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pi_3PsHmdD5R7gDAGff0wct5mM2",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_nKt0x0ccAOYLFM5OiH60",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T05:32:34.099Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-08-27T05:17:36.775Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
2. Create a Card payment with Braintree, required fields only
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
}
},
"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": {
"connector": "braintree"
}
}
}'
```
Response
```
{
"payment_id": "pay_tUVapFLHfbfIqQO2HfBN",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "processing",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 0,
"amount_received": null,
"connector": "braintree",
"client_secret": "pay_tUVapFLHfbfIqQO2HfBN_secret_BwId3YpHoEuBRUo9MFir",
"created": "2024-08-27T05:22:55.163Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"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": "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": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AU",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "[email protected]"
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724736175,
"expires": 1724739775,
"secret": "epk_0ded3a0a35af4f3cb866a2cc30cdd4d6"
},
"manual_retry_allowed": false,
"connector_transaction_id": "dHJhbnNhY3Rpb25fZThiM2t4Yno",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_PmKpkXPiG0BuO5n06R4X",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T05:37:55.163Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-08-27T05:22:58.558Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
3. Create a visa card payment with bambora
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4030000010001234",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
}
,"email": "[email protected]"
},
"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": {
"connector": "bambora"
}
}
}'
```
Response
```
{
"payment_id": "pay_9UusYlfiiz0tEArMMkhE",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 0,
"amount_received": 6540,
"connector": "bambora",
"client_secret": "pay_9UusYlfiiz0tEArMMkhE_secret_yRuc1MSo949B2CmPtgmQ",
"created": "2024-08-27T06:14:08.476Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"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": "card",
"payment_method_data": {
"card": {
"last4": "1234",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "403000",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AU",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "[email protected]"
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724739247,
"expires": 1724742847,
"secret": "epk_4607ece2004d4336ac18fae3f5db22e5"
},
"manual_retry_allowed": false,
"connector_transaction_id": "10005153",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_9UusYlfiiz0tEArMMkhE_1",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_JDDVitWZaqmGSqNJLi0e",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T06:29:08.476Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-08-27T06:14:15.876Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
4. Bancontact card - stripe MIT
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data-raw '{
"amount": 6540,
"currency": "EUR",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"setup_future_usage": "off_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "13.232.74.226",
"user_agent": "amet irure esse"
}
},
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "bank_redirect",
"payment_method_type": "bancontact_card",
"payment_method_data": {
"bank_redirect": {
"bancontact_card": {
}
}
},
"billing": {
"address": {
"first_name": "joseph",
"last_name": "Doe"
}
,"email": "[email protected]"
},
"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": {
"connector": "stripe"
}
}
}'
```
Response
```
{
"payment_id": "pay_6LGgZHa35ZaK6qqk2aeU",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 6540,
"amount_received": 0,
"connector": "stripe",
"client_secret": "pay_6LGgZHa35ZaK6qqk2aeU_secret_pSsuDvBGQMwmQwzf3dA0",
"created": "2024-08-27T06:18:28.353Z",
"currency": "EUR",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "off_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "bank_redirect",
"payment_method_data": {
"bank_redirect": {
"type": "BankRedirectAdditionalData",
"bank_name": null,
"BancontactCard": {
"last4": null,
"card_exp_month": null,
"card_exp_year": null,
"card_holder_name": null
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"line3": null,
"zip": null,
"state": null,
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "[email protected]"
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_6LGgZHa35ZaK6qqk2aeU/postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e/pay_6LGgZHa35ZaK6qqk2aeU_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "bancontact_card",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724739508,
"expires": 1724743108,
"secret": "epk_1c71bfbd498d4c0fa10137169a420e5f"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3PsIjYD5R7gDAGff19lBWJL8",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pi_3PsIjYD5R7gDAGff19lBWJL8",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_nKt0x0ccAOYLFM5OiH60",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T06:33:28.353Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": "pm_M0Ab9mNFHiZmw23oulRG",
"payment_method_status": null,
"updated": "2024-08-27T06:18:29.218Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
5. Card payment through Cybersource
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"setup_future_usage": "off_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "13.232.74.226",
"user_agent": "amet irure esse"
}
},
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
}
,"email": "[email protected]"
},
"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": {
"connector": "cybersource"
}
}
}'
```
Response
```
{
"payment_id": "pay_qPtUHKQc7HHeHOdnp4vw",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 0,
"amount_received": 6540,
"connector": "cybersource",
"client_secret": "pay_qPtUHKQc7HHeHOdnp4vw_secret_LxPGKELsYskmfQ2kolG5",
"created": "2024-08-27T06:26:56.490Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "off_session",
"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": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": {
"resultCode": "M",
"resultCodeRaw": "M"
}
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_8U3vwObd44Qpr99XCEAL",
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AU",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "[email protected]"
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724740016,
"expires": 1724743616,
"secret": "epk_ae0dcf97ed8a4344bd13176b8d4ec46a"
},
"manual_retry_allowed": false,
"connector_transaction_id": "7247400192796954304951",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_qPtUHKQc7HHeHOdnp4vw_1",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_36vHupa6i1zaVoXZYoXQ",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T06:41:56.490Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": "pm_1NSY5g2zMCK3w6C3Gg0j",
"payment_method_status": null,
"updated": "2024-08-27T06:27:00.101Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
6. Create a card payment with Paypal
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4032037954121956",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
}
,"email": "[email protected]"
},
"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": {
"connector": "paypal"
}
}
}'
```
Response
```
{
"payment_id": "pay_kxjSF8897pkygapvBzbj",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 0,
"amount_received": 6540,
"connector": "paypal",
"client_secret": "pay_kxjSF8897pkygapvBzbj_secret_36emzENRa4I8tI8bZlv0",
"created": "2024-08-27T06:40:20.968Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"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": "card",
"payment_method_data": {
"card": {
"last4": "1956",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "403203",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AU",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "[email protected]"
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724740820,
"expires": 1724744420,
"secret": "epk_d2b86ec563264beb9d3228a3d1f45270"
},
"manual_retry_allowed": false,
"connector_transaction_id": "3RK593803E361343V",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_kxjSF8897pkygapvBzbj_1",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_mNrMmzVSn9gugNzX3gxK",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T06:55:20.968Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-08-27T06:40:26.285Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
7. Create a Pix payment with Itau
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_REIUyZmn5feccgMQJBcv2pYTyvwMEIsztAvZQNT4DtVFvlUjnFBRte58q2R10ysu' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AU",
"first_name": "joseph",
"last_name": "Doe"
}
,
"email": "[email protected]"
},
"payment_method": "bank_transfer",
"payment_method_type": "pix",
"payment_method_data": {
"bank_transfer": {
"pix": {
"pix_key": "a1f4102e-a446-4a57-bcce-6fa48899c1d1",
"cnpj": "74469027417312",
"cpf": "10599054689"
}
}
},
"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": {
"connector": "paypal"
}
}
}'
```
Response
```
{
"payment_id": "pay_wl7ifyaWfMBW8RL9EdLf",
"merchant_id": "postman_merchant_GHAction_ad0a6c05-86ba-404c-9792-055845a1257e",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 6540,
"amount_received": null,
"connector": "itaubank",
"client_secret": "pay_wl7ifyaWfMBW8RL9EdLf_secret_AxmsALkIg786kXH38t4C",
"created": "2024-08-27T06:49:52.862Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": null,
"email": null,
"phone": null,
"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": "bank_transfer",
"payment_method_data": {
"bank_transfer": {
"pix": {
"pix_key": "a1f4****-****-****-****-********c1d1",
"cpf": "*******4689",
"cnpj": "7446******7312"
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"line3": null,
"zip": null,
"state": null,
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "qr_code_information",
"image_data_url": "data:image/png;base64,iVBORw0KGgoXXXXXXXXXXXX",
"display_to_timestamp": 1724827794000,
"qr_code_url": null
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "pix",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1724741392,
"expires": 1724744992,
"secret": "epk_7a0e0c34632d4522825e329580638466"
},
"manual_retry_allowed": null,
"connector_transaction_id": "bbba96adf0e442a0802761bb2758d9e5",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "bbba96adf0e442a0802761bb2758d9e5",
"payment_link": null,
"profile_id": "pro_gQ5MZl8M6KHuDfhL1Ps2",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_OoDgbovD0k3cUOShJEHX",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-27T07:04:52.862Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-08-27T06:49:55.130Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
Stripe
<img width="591" alt="Screenshot 2024-08-28 at 3 46 12 PM" src="https://github.com/user-attachments/assets/e27a6d6d-41ac-4f78-a875-ba62a0790caa">
Paypal
<img width="610" alt="Screenshot 2024-08-28 at 4 57 57 PM" src="https://github.com/user-attachments/assets/acba6f0d-a62c-42e5-94e0-f103dc1398b3">
## 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(router): revert [Stripe/Itau/Paypal/Bambora/Cybs] prevent partial submission of billing address and add required fields for all payment methods
- Merged: 2024-08-29T16:12:05Z
- Files changed: 7 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#5704
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(router): revert [Stripe/Itau/Paypal/Bambora/Cybs] prevent partial submission of billing add
Files to modify:
**crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs**
Modify existing code
**crates/router/src/configs/defaults.rs**
Modify existing code
**crates/router/src/connector/cybersource/transformers.rs**
Modify existing code
**crates/router/src/connector/paypal/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Remove:
- function: private::get_optional_country
|
{"issue_number": 5704, "pr_number": 5745, "commits_count": 1, "files_changed": 7, "response_length": 1103, "file_count": 9, "needs_breakdown": false}
|
Use `#[automatically_derived]` for all derivations
Consider to mark any new code/items, generated by procedural macros, with the `#[automatically_derived]` attribute. This makes code style linters to omit the generated code and doesn't report redundant warnings.
Example: https://github.com/cucumber-rs/cucumber/blob/v0.15.1/codegen/src/world.rs
|
<think>
PR Context:
- Title: fix(router_derive): Use `#[automatically_derived]` for all derivations
- Merged: 2022-12-13T13:53:19Z
- Files changed: 5 files
- Commits: 2 commits
Implementation approach:
## Motivation and Context
Closes #106
## How did you test it?
Manual, compiler-guided
## 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:** fix(router_derive): Use `#[automatically_derived]` for all derivations (#133)
Files to modify:
**crates/router_derive/src/lib.rs**
Modify existing code
**crates/router_derive/src/macros.rs**
Modify existing code
**crates/router_derive/src/macros/api_error.rs**
Modify existing code
**crates/router_derive/src/macros/diesel.rs**
Modify existing code
**crates/router_derive/src/macros/operation.rs**
Modify existing code
|
{"issue_number": 106, "pr_number": 133, "commits_count": 1, "files_changed": 5, "response_length": 978, "file_count": 7, "needs_breakdown": false}
|
[REFACTOR] API Key List and Update endpoints in Hyperswitch V2
Update API Key endpoint in V2, the URLs are registered in the `app.rs` but the necessary changes to it has not been made in `api_keys.rs`.
In addition to that, List API Key endpoint for V2 does not work as no such thing exist in `api_keys.rs`.
So at present, when that endpoint is hit, you'll receive a 404 as mentioned below:
```curl
curl --location --request PUT '{{baseUrl}}/v2/api_keys/{{api_key_id}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: {{mechant_id}}' \
--header 'api-key: {{admin_api_key}}' \
--data '{
"name": "My new Api Key"
}'
```
```json
wrong number of parameters: 1 expected 2
```
List end point:
```curl
curl --location '{{baseUrl}}/v2/api_keys/list' \
--header 'x-merchant-id: {{mechant_id}}' \
--header 'api-key: {{admin_api_key}}'
```
```json
wrong number of parameters: 0 expected 1
```
I'll be fixing this.
|
<think>
PR Context:
- Title: fix(api_key): fix api key `list` and `update` endpoints for v2
- Merged: 2024-09-25T11:17:57Z
- Files changed: 12 files
- Commits: 13 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR fixes `404` errors thrown by API Key List and Update endpoints.
Previously:
Update end point:
```curl
curl --location --request PUT '{{baseUrl}}/v2/api_keys/{{api_key_id}}' \
--header 'Content-Type: application/json' \
--
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(api_key): fix api key `list` and `update` endpoints for v2 (#5980)
Files to modify:
**crates/api_models/src/api_keys.rs**
Modify existing code
**crates/api_models/src/events.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/api_keys.rs**
Add:
- function: pub::api_key_list
- function: pub::api_key_list
**crates/router/src/routes/api_keys.rs**
Modify existing code
|
{"issue_number": 5979, "pr_number": 5980, "commits_count": 1, "files_changed": 12, "response_length": 1309, "file_count": 8, "needs_breakdown": false}
|
[FEATURE] Checkout.com support for Applepay, Googlepay and Webhooks
### Feature Description
Scope:
- [ ] Add support for Applepay, Googlepay digital wallets #875
- [ ] Enable tokenization for respective Googlepay/ Applepay endpoint to make wallet payment #875
- [ ] Webhook support for asynchronous payment status #875
- [ ] Webhook support for asynchronous refund status #875
- [ ] Webhook support for asynchronous dispute status #875
### Possible Implementation
In order to ensure that the payment flow is agnostic to the processor, this will need integration of pre-decrypted Applepay and Googlepay flow
Reference links:
https://www.checkout.com/docs/payments/payment-methods/google-pay/pay-with-a-pre-decrypted-google-pay-token
https://www.checkout.com/docs/payments/payment-methods/apple-pay/pay-with-a-pre-decrypted-apple-pay-token
### 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(connector): [Checkout] add GooglePay, ApplePay and Webhooks support
- Merged: 2023-04-20T21:47:04Z
- Files changed: 8 files
- Commits: 14 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Added Wallets ( GooglePay, ApplePay ) and Webhooks support for [checkout](https://www.checkout.com/docs)
- Introduced tokenization and then called the respective endpoint to make wallet payment [GooglePay](https://www.checkout.com/docs/payments/payment-methods/google-pay
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Checkout] add GooglePay, ApplePay and Webhooks support (#875)
Co-authored-by: Aru
Files to modify:
**crates/router/src/connector/checkout.rs**
Add:
- function: private::build_headers
- impl: impl ConnectorCommonExt<Flow, Request, Response> for Checkout
**crates/router/src/connector/checkout/transformers.rs**
Remove:
- enum: pub::Source
Add:
- function: private::try_from
- function: private::try_from
- function: pub::is_refund_event
- function: pub::is_chargeback_event
- function: private::from
- function: private::from
- struct: pub::CheckoutGooglePayData
- struct: pub::CheckoutApplePayData
- struct: pub::CheckoutApplePayHeader
- struct: pub::CheckoutTokenResponse
- struct: pub::WalletSource
- struct: pub::CheckoutWebhookData
- struct: pub::CheckoutWebhookBody
- struct: pub::CheckoutWebhookObjectResource
- enum: pub::TokenRequest
- enum: pub::CheckoutSourceTypes
- enum: pub::CheckoutTxnType
- impl: impl TryFrom<&types::TokenizationRouterData> for TokenRequest
- impl: impl TryFrom<types::ResponseRouterData<F, CheckoutTokenResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
- impl: impl From<CheckoutTxnType> for api::IncomingWebhookEvent
- impl: impl From<CheckoutTxnType> for api_models::enums::DisputeStage
**crates/router/src/connector/utils.rs**
Add:
- function: private::get_payment_method_token
**crates/router/tests/connectors/checkout.rs**
Add:
- function: private::get_data
- function: private::get_auth_token
- function: private::get_default_payment_info
- function: private::payment_method_details
- function: private::should_capture_authorized_payment
- function: private::should_partially_capture_authorized_payment
- function: private::should_sync_authorized_payment
- function: private::should_void_authorized_payment
- impl: impl ConnectorActions for CheckoutTest
**crates/router/tests/connectors/connector_auth.rs**
Modify existing code
|
{"issue_number": 916, "pr_number": 875, "commits_count": 1, "files_changed": 8, "response_length": 2897, "file_count": 7, "needs_breakdown": false}
|
fix(mandate): add mandate_id column in payment_attempt table
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
This change includes
- Adding a new column `mandate_id` in the table `payment_attempt`
- Similarly, adding `mandate_id` field in `PaymentAttempt` structs (which include `New`, `Update` variants)
- Storing `mandate_id`, if generated during payment creation, to the `PaymentAttempt` table (in `PostUpdateTracker`)
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
Originally, we didn't have any way to link a payment that is made to a specific mandate. Which makes it impossible to get the related mandate_id while performing a payment sync operation. This change will allow, the payments core to have access to the mandate that is related to the specific payment attempt while performing payment sync and further mandate related functionalities.
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(connector): [Bluesnap] add cards 3DS support
- Merged: 2023-05-08T13:59:01Z
- Files changed: 15 files
- Commits: 17 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Updating support for [Bluesnap](https://developers.bluesnap.com/v8976-JSON/reference/bluesnap-payment-api-json) payment gateway
Payment Method: card
Flow: [3DS](https://developers.bluesnap.com/reference/3-d-secure-for-api#3-d-secure-with-pla
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Bluesnap] add cards 3DS support (#1057)
Co-authored-by: Jagan Elavarasan <jaganel
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/compatibility/wrap.rs**
Modify existing code
**crates/router/src/connector/authorizedotnet.rs**
Modify existing code
**crates/router/src/connector/bluesnap.rs**
Add:
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::get_flow_type
- impl: impl api::ConnectorCustomer for Bluesnap
- impl: impl ConnectorIntegration<
api::CreateConnectorCustomer,
types::ConnectorCustomerData,
types::PaymentsResponseData,
> for Bluesnap
- impl: impl api::PaymentsCompleteAuthorize for Bluesnap
- impl: impl services::ConnectorRedirectResponse for Bluesnap
**crates/router/src/connector/bluesnap/transformers.rs**
Add:
- function: private::try_from
- struct: pub::BluesnapThreeDSecureInfo
- impl: impl TryFrom<&types::PaymentsCompleteAuthorizeRouterData> for BluesnapPaymentsRequest
**crates/router/src/connector/utils.rs**
Add:
- function: private::get_connector_customer_id
- function: pub::get_http_header
**crates/router/src/core/errors.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/operations/payment_start.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/utils.rs**
Add:
- function: pub::to_currency_base_unit
- function: pub::to_currency_base_unit_asf64
|
{"issue_number": 3, "pr_number": 1057, "commits_count": 1, "files_changed": 15, "response_length": 3048, "file_count": 16, "needs_breakdown": true}
|
todo: Optimise encode process for signature based requests
### Feature Description
For a connector call, `get_request_body` is being called twice, Once in `get_headers`, other in `build_request`.
This is an expensive operation to call the same encoding function twice.
### Possible Implementation
Need to optimise it to a state from where it can be further implemented into the methods.
### Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/contrib/CONTRIBUTING.md)
### Are you willing to submit a PR?
None
|
<think>
PR Context:
- Title: feat(connector): implement authorize and capture flows for Fiserv
- Merged: 2023-01-15T10:33:06Z
- Files changed: 18 files
- Commits: 16 commits
Implementation approach:
## Description
Authorize and capture flow
Todo: Issue for optimising the encoding process in header and body #370
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Follow
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): implement authorize and capture flows for Fiserv (#266)
Files to modify:
**crates/api_models/src/enums.rs**
Modify existing code
**crates/common_utils/src/lib.rs**
Add:
- function: pub::now_unix_timestamp
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/connector.rs**
Add:
- mod: pub::fiserv
**crates/router/src/connector/fiserv.rs**
Add:
- function: pub::generate_authorization_signature
- function: private::id
- function: private::common_get_content_type
- function: private::base_url
- function: private::get_headers
- function: private::get_content_type
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_url
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_webhook_object_reference_id
- function: private::get_webhook_event_type
- function: private::get_webhook_resource_object
- function: private::get_flow_type
- struct: pub::Fiserv
- impl: impl Fiserv
- impl: impl api::ConnectorCommon for Fiserv
- impl: impl api::Payment for Fiserv
- impl: impl api::PreVerify for Fiserv
- impl: impl services::ConnectorIntegration<
api::Verify,
types::VerifyRequestData,
types::PaymentsResponseData,
> for Fiserv
- impl: impl api::PaymentVoid for Fiserv
- impl: impl services::ConnectorIntegration<
api::Void,
types::PaymentsCancelData,
types::PaymentsResponseData,
> for Fiserv
- impl: impl api::PaymentSync for Fiserv
- impl: impl services::ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Fiserv
- impl: impl api::PaymentCapture for Fiserv
- impl: impl services::ConnectorIntegration<
api::Capture,
types::PaymentsCaptureData,
types::PaymentsResponseData,
> for Fiserv
- impl: impl api::PaymentSession for Fiserv
- impl: impl services::ConnectorIntegration<
api::Session,
types::PaymentsSessionData,
types::PaymentsResponseData,
> for Fiserv
- impl: impl api::PaymentAuthorize for Fiserv
- impl: impl services::ConnectorIntegration<
api::Authorize,
types::PaymentsAuthorizeData,
types::PaymentsResponseData,
> for Fiserv
- impl: impl api::Refund for Fiserv
- impl: impl api::RefundExecute for Fiserv
- impl: impl api::RefundSync for Fiserv
- impl: impl services::ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Fiserv
- impl: impl services::ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Fiserv
- impl: impl api::IncomingWebhook for Fiserv
- impl: impl services::ConnectorRedirectResponse for Fiserv
- mod: private::transformers
**crates/router/src/connector/fiserv/transformers.rs**
Add:
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::FiservPaymentsRequest
- struct: pub::Source
- struct: pub::CardData
- struct: pub::Amount
- struct: pub::TransactionDetails
- struct: pub::MerchantDetails
- struct: pub::TransactionInteraction
- struct: pub::FiservAuthType
- struct: pub::ErrorResponse
- struct: pub::ErrorDetails
- struct: pub::FiservPaymentsResponse
- struct: pub::GatewayResponse
- struct: pub::TransactionProcessingDetails
- struct: pub::FiservCaptureRequest
- struct: pub::ReferenceTransactionDetails
- struct: pub::SessionObject
- struct: pub::FiservRefundRequest
- struct: pub::RefundResponse
- enum: pub::FiservPaymentStatus
- enum: pub::RefundStatus
- impl: impl TryFrom<&types::PaymentsAuthorizeRouterData> for FiservPaymentsRequest
- impl: impl TryFrom<&types::ConnectorAuthType> for FiservAuthType
- impl: impl From<FiservPaymentStatus> for enums::AttemptStatus
- impl: impl TryFrom<types::ResponseRouterData<F, FiservPaymentsResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
- impl: impl TryFrom<&types::PaymentsCaptureRouterData> for FiservCaptureRequest
- impl: impl TryFrom<&types::RefundsRouterData<F>> for FiservRefundRequest
- impl: impl From<RefundStatus> for enums::RefundStatus
- impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>> for types::RefundsRouterData<api::Execute>
- impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>> for types::RefundsRouterData<api::RSync>
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/tests/connectors/connector_auth.rs**
Add:
- function: private::from
- struct: pub::SignatureKey
- impl: impl From<SignatureKey> for ConnectorAuthType
**crates/router/tests/connectors/fiserv.rs**
Add:
- function: private::get_data
- function: private::get_auth_token
- function: private::get_name
- function: private::get_connector_meta
- function: private::should_only_authorize_payment
- function: private::should_authorize_and_capture_payment
- struct: private::Fiserv
- impl: impl ConnectorActions for Fiserv
- impl: impl utils::Connector for Fiserv
**crates/router/tests/connectors/main.rs**
Add:
- mod: private::fiserv
**crates/router/tests/connectors/utils.rs**
Modify existing code
|
{"issue_number": 370, "pr_number": 266, "commits_count": 1, "files_changed": 18, "response_length": 6914, "file_count": 15, "needs_breakdown": true}
|
Rename `PaymentsRequestSyncData` struct to `PaymentsSyncData`.
Rename the struct `PaymentsRequestSyncData` to `PaymentsSyncData`.
Use this pattern `<Feature>Data`.
And rename PaymentsRouterSyncData struct to PaymentsSyncRouterData.
Pattern - `<Feature>RouterData`
And rename the field name called `request` to `data` in `RouterData` struct.
_Originally posted by @jarnura in https://github.com/juspay/orca/pull/7#discussion_r1032366000_
|
<think>
PR Context:
- Title: refactor: rename the payment request struct
- Merged: 2022-12-01T11:00:34Z
- Files changed: 29 files
- Commits: 10 commits
Implementation approach:
## Description
Rename the payment request router data with respective feature data, as suggesed [here](https://github.com/juspay/orca/pull/7#discussion_r1032366000)
### Additional Changes
N.A
## Motivation and Context
This PR closes #21
## How did you test it?
## Checklist
- [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 fo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: rename the payment request struct (#48)
Files to modify:
**connector-template/mod.rs**
Remove:
- function: private::get_url
- function: private::get_request_body
Add:
- function: private::get_url
- function: private::get_request_body
**connector-template/transformers.rs**
Remove:
- impl: impl TryFrom<&types::PaymentsRouterData> for project
Add:
- impl: impl TryFrom<&types::PaymentsAuthorizeRouterData> for project
**crates/router/src/compatibility/stripe/payment_intents.rs**
Modify existing code
**crates/router/src/connector/aci.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/authorizedotnet.rs**
Modify existing code
**crates/router/src/connector/authorizedotnet/transformers.rs**
Modify existing code
**crates/router/src/connector/checkout.rs**
Modify existing code
**crates/router/src/connector/checkout/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/core/payments/flows/authorize_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/cancel_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/capture_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/psync_flow.rs**
Remove:
- impl: impl ConstructFlowSpecificData<
api::PSync,
types::PaymentsRequestSyncData,
types::PaymentsResponseData,
> for impl Feature<api::PSync, types::PaymentsRequestSyncData>
Add:
- impl: impl ConstructFlowSpecificData<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for impl Feature<api::PSync, types::PaymentsSyncData>
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Remove:
- struct: pub::PCapture
Add:
- struct: pub::Capture
**crates/router/src/types/api/refunds.rs**
Modify existing code
**crates/router/tests/connectors/aci.rs**
Modify existing code
**crates/router/tests/connectors/authorizedotnet.rs**
Modify existing code
**crates/router/tests/connectors/checkout.rs**
Modify existing code
**crates/router_derive/src/macros/operation.rs**
Modify existing code
|
{"issue_number": 21, "pr_number": 48, "commits_count": 1, "files_changed": 29, "response_length": 3637, "file_count": 31, "needs_breakdown": true}
|
[FIX] Add Limit Parameter to User Role List for Org Function
### Feature Description
Description: The function [generic_user_roles_list_for_org_and_extra](https://github.com/juspay/hyperswitch/blob/a94cf25bb6eb40fafc5327aceffac8292b47b001/crates/diesel_models/src/query/user_role.rs#L270) currently fetches all roles for a give organisation and additional parameters. To improve performance and allow better control over data retrieval, we need to add a limit parameter to restrict the number of results returned.
```
pub async fn generic_user_roles_list_for_org_and_extra(
conn: &PgPooledConn,
user_id: Option<String>,
org_id: id_type::OrganizationId,
merchant_id: Option<id_type::MerchantId>,
profile_id: Option<id_type::ProfileId>,
version: Option<UserRoleVersion>,
) -> StorageResult<Vec<Self>>
```
Task:
- Modify the existing function generic_user_roles_list_for_org_and_extra to include an optional limit parameter (Option<u32>).
- Pass this limit parameter down to the database query to restrict the number of user roles returned.
- Ensure the limit parameter is optional, and when it's not provided, the function should return all results as it currently does.
### Possible Implementation
- Add an additional parameter limit: `Option<type>` to the function signature of `generic_user_roles_list_for_org_and_extra`
- Modify the query logic to apply the limit if it is provided.
- Ensure the modified function still works with existing code that doesn't use the limit parameter. ( For older implementations, where this function is getting called, pass limit as `None` so that it doesn't change expected behaviour)
Additional Context: This change is analogous to the `generic_user_roles_list_for_user` function, which already includes a limit parameter. You can refer to that function’s implementation for guidance.
### How to Test
For testing, we can check where this `generic_user_roles_list_for_user` is used, currently this function is invoked from db function `list_user_roles_by_user_id` and this function is getting called from many core function, like `list_merchants_for_user_in_org` , `list_orgs_for_user`.
We can hit `user/list/merchants` api to invoke this `list_merchants_for_user_in_org` core function:
Signup:
```
curl --location 'http://localhost:8080/user/signup' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data-raw '{
"email": "[email protected]",
"password": "Pass@123"
}'
```
Response:
```
{
"token": "JWT",
"token_type": "totp"
}
```
We will get intermediate token for setting up 2FA, it is skippable:
Skip 2FA, we will be getting a login token:
```
curl --location 'http://localhost:8080/user/2fa/terminate?skip_two_factor_auth=true' \
--header 'Authorization: Bearer Intermediate_Token'
```
```
{
"token": "JWT",
"token_type": "user_info"
}
```
It depicts successful signup, default one merchant_id has been created. (Baisically one org, with one merchant and one profile)
Now we can call `list/merchant`:
```
curl --location 'http://localhost:8080/user/list/merchant' \
--header 'Authorization: Bearer LOGIN_JWT'
```
Response:
```
[
{
"merchant_id": "merchant_test"
"merchant_name": null
}
]
```
We can create more merchant accounts:
```
curl --location 'http://localhost:8080/user/create_merchant' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer LoginJWT' \
--data '{
"company_name": "hyperswitch"
}'
```
And if we try got get list it now, it will show more merchant_ids in list. Limit parameter in the function that controls how much data we need for our use case, say, sometimes we only want to get first one from list, we can just pass limit one instead of fetching whole list.
Acceptance Criteria:
- The function should accept an optional limit parameter.
- When a limit is provided, the number of results returned by the query should not exceed the limit.
- Tests the behaviour with and without the limit parameter.
### 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: feat(user_role): add limit to `generic_user_roles_list_for_org_and_extra`
- Merged: 2024-10-16T07:09:02Z
- Files changed: 3 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds the `limit` parameter to the `generic_user_roles_list_for_org_and_extra` function.
### 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(user_role): add limit to `generic_user_roles_list_for_org_and_extra` (#6191)
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/user_role.rs**
Modify existing code
|
{"issue_number": 5917, "pr_number": 6191, "commits_count": 1, "files_changed": 3, "response_length": 1103, "file_count": 5, "needs_breakdown": false}
|
feat(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata
## 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 -->
When `disable_avs` is enabled, avs result will be ignored by Cybersource.
When `disable_cvn` is enabled, cvn result will be ignored by Cybersource.
```
"metadata": {
"disable_avs": true,
"disable_cvn": true,
}
```
> Note: These flags are not effective in sandbox
## 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't be tested as avs check is only done in production env
Sanity
1. Create a payment with cards
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_aQxPOtk3HOI1YMCSh71XowkHSKeKmfYLoakbfXuAMxlEIX93sCOenDWzBySirGhl' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "testCus_15",
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "Rayan",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "Rayan",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS"
,"setup_future_usage": "off_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "13.232.74.226",
"user_agent": "amet irure esse"
}
}
}'
```
Response
```
{
"payment_id": "pay_CTH8cvEA9uDUnxqkYI6R",
"merchant_id": "postman_merchant_GHAction_dc98950e-5985-4b6f-8ecf-2d848efb7c96",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_CTH8cvEA9uDUnxqkYI6R_secret_c68ZqG1gWbFqJ4P9do7F",
"created": "2024-08-22T10:28:13.027Z",
"currency": "USD",
"customer_id": "testCus_15",
"customer": {
"id": "testCus_15",
"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": "off_session",
"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": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_s2Wbe6sOlerqSYuKrxbG",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "Rayan",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "Rayan",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "credit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "testCus_15",
"created_at": 1724322492,
"expires": 1724326092,
"secret": "epk_0ef28df9d88e4c32bc08c3b9e60223bb"
},
"manual_retry_allowed": false,
"connector_transaction_id": "7243224942556544504953",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_CTH8cvEA9uDUnxqkYI6R_1",
"payment_link": null,
"profile_id": "pro_Ligu65tAS9PRvV6cl8jY",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_3DSxDdq9eyzOw3X6xF9S",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-08-22T10:43:13.027Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": "pm_dhvsNUBwSqlD9W6dpj10",
"payment_method_status": null,
"updated": "2024-08-22T10:28:16.613Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null
}
```
## 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(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata
- Merged: 2024-08-22T19:17:25Z
- Files changed: 5 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
When `disable_avs` is enabled, avs result will be ignored by Cybersource.
When `disable_cvn` is enabled, cvn result will be ignored by Cybersource.
```
"metadata": {
"disable_avs": true,
"disable_cvn": true,
}
```
> N
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata (#5677)
Co-a
Files to modify:
**crates/router/src/connector/cybersource/transformers.rs**
Add:
- function: private::try_from
- struct: pub::CybersourceConnectorMetadataObject
- impl: impl TryFrom<&Option<pii::SecretSerdeValue>> for CybersourceConnectorMetadataObject
**crates/router/src/core/admin.rs**
Modify existing code
|
{"issue_number": 5667, "pr_number": 5677, "commits_count": 1, "files_changed": 5, "response_length": 1250, "file_count": 4, "needs_breakdown": false}
|
[FEATURE]: [Fiserv] 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): [Fiserv] update connector_response_reference_id in transformers
- Merged: 2023-10-09T08:05:57Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Update connector_response_reference_id to use gateway_resp.transaction_processing_details.order_id in fiserv transformers.
Fixes #2329
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the datab
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Fiserv] update connector_response_reference_id in transformers (#2489)
Files to modify:
**crates/router/src/connector/fiserv/transformers.rs**
Modify existing code
|
{"issue_number": 2329, "pr_number": 2489, "commits_count": 1, "files_changed": 1, "response_length": 998, "file_count": 3, "needs_breakdown": false}
|
refactor(permissions): Give access to connector view group in operation groups
Currently `connector_label` is not visible in payments page of control-center. This is because, the payment retrieve API doesn't send the `connector_label`. As it is a big change in the payments flow, we are providing access to connector list API, so that control-center can fetch the data from there.
|
<think>
PR Context:
- Title: refactor(authz): Make connector list accessible by operation groups
- Merged: 2024-12-16T09:22:57Z
- Files changed: 2 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR will make connector_view group accessible by operation groups.
This PR will also change the permission of connector_retrieve API from connector_read to connector_write as it contains sensitive data.
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(authz): Make connector list accessible by operation groups (#6792)
Files to modify:
**crates/router/src/routes/admin.rs**
Modify existing code
**crates/router/src/services/authorization/permission_groups.rs**
Modify existing code
|
{"issue_number": 6788, "pr_number": 6792, "commits_count": 1, "files_changed": 2, "response_length": 1045, "file_count": 4, "needs_breakdown": false}
|
chore(codeowners): add codeowners data for PR reviews
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Adding a CODEOWNERS file for facilitating PR reviews for teams
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
This leads to better ownership boundaries & increased efficiency for reviewers
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Doesn't need to be tested
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(core): payment links - add support for custom background image and layout in details section
- Merged: 2024-12-12T15:48:18Z
- Files changed: 19 files
- Commits: 17 commits
Implementation approach:
## Description
This PR introduces UI revamps to the payment links by including below changes - (described in #6711)
- Introduce `branding_visibility` in business profile's payment link config
- Introduce `details_layout` and `background_image` in both business profile and payments create API
- Co
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): payment links - add support for custom background image and layout in details section (#
Files to modify:
**crates/api_models/src/admin.rs**
Add:
- struct: pub::PaymentLinkBackgroundImageConfig
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Add:
- mod: private::ui
**crates/common_enums/src/enums/ui.rs**
Add:
- function: private::deserialize
- function: private::expecting
- function: private::visit_str
- function: private::serialize
- struct: private::ElementSizeVisitor
- enum: pub::ElementPosition
- enum: pub::ElementSize
- enum: pub::SizeVariants
- enum: pub::PaymentLinkDetailsLayout
- impl: impl Deserialize<'de> for ElementSize
- impl: impl Visitor<'_> for ElementSizeVisitor
- impl: impl Serialize for ElementSize
**crates/diesel_models/src/business_profile.rs**
Add:
- struct: pub::PaymentLinkBackgroundImageConfig
**crates/diesel_models/src/payment_intent.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/lib.rs**
Add:
- function: private::convert_from
- function: private::convert_back
- impl: impl ApiModelToDieselModelConvertor<api_models::admin::PaymentLinkBackgroundImageConfig> for diesel_models::business_profile::PaymentLinkBackgroundImageConfig
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/core/payment_link.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Add:
- function: private::foreign_from
- impl: impl ForeignFrom<diesel_models::business_profile::PaymentLinkBackgroundImageConfig> for api_models::admin::PaymentLinkBackgroundImageConfig
|
{"issue_number": 1, "pr_number": 6725, "commits_count": 1, "files_changed": 19, "response_length": 2673, "file_count": 14, "needs_breakdown": false}
|
[FEATURE] Add Payments - List endpoint for v2
### Feature Description
This feature adds support for retrieving a filtered list of payments via a GET /v2/payments/list endpoint where multiple values can be provided for a single filter key (e.g. connector, etc.).
### Possible Implementation
Add PaymentListFilterConstraints and payments_list_by_filter endpoint for v2
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(payments): add PaymentListFilterConstraints and payments_list_by_filter endpoint for v2
- Merged: 2025-08-21T14:04:23Z
- Files changed: 10 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
**Enhanced Payment Listing API with Multi-Value Filtering**
This feature adds support for retrieving a filtered list of payments via a `GET /v2/payments/list` endpoint where multiple values can be provided for a single filter key (e.g. `sta
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payments): add PaymentListFilterConstraints and payments_list_by_filter endpoint for v2 (#8794)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- function: private::parse_comma_separated
**crates/common_utils/src/id_type/merchant_connector_account.rs**
Add:
- function: private::from_str
- impl: impl FromStr for MerchantConnectorAccountId
**crates/diesel_models/src/query/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/storage_impl/src/mock_db/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_intent.rs**
Modify existing code
|
{"issue_number": 8792, "pr_number": 8794, "commits_count": 1, "files_changed": 10, "response_length": 1766, "file_count": 12, "needs_breakdown": false}
|
Implement verify flow for Adyen
Implement Verify flow for the connectors. Verify flow makes sure if the card is valid or not for future payments like mandate etc.
|
<think>
PR Context:
- Title: feat(connector): Mandates for alternate payment methods via Adyen
- Merged: 2023-05-09T14:40:57Z
- Files changed: 23 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add mandate support for gpay, apple_pay and klarna
Closes #1045
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment va
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Mandates for alternate payment methods via Adyen (#1046)
Co-authored-by: Manoj Ghor
Files to modify:
**crates/router/src/compatibility/stripe/errors.rs**
Modify existing code
**crates/router/src/connector/adyen.rs**
Add:
- function: private::get_headers
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
**crates/router/src/connector/adyen/transformers.rs**
Add:
- struct: pub::MandateData
**crates/router/src/connector/airwallex.rs**
Modify existing code
**crates/router/src/connector/nuvei.rs**
Modify existing code
**crates/router/src/connector/shift4.rs**
Modify existing code
**crates/router/src/core/errors/api_error_response.rs**
Modify existing code
**crates/router/src/core/errors/utils.rs**
Modify existing code
**crates/router/src/core/mandate.rs**
Add:
- function: private::foreign_try_from
- impl: impl ForeignTryFrom<Result<types::PaymentsResponseData, types::ErrorResponse>> for Option<pii::SecretSerdeValue>
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_status.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/types.rs**
Remove:
- impl: impl From<(&&mut RouterData<F1, T1, PaymentsResponseData>, T2)>
Add:
- function: private::from
- impl: impl From<&VerifyRouterData> for PaymentsAuthorizeData
- impl: impl From<(&RouterData<F1, T1, PaymentsResponseData>, T2)>
**crates/router/tests/connectors/adyen_ui.rs**
Add:
- function: private::should_make_adyen_gpay_payment
- function: private::should_make_adyen_gpay_mandate_payment
- function: private::should_make_adyen_gpay_zero_dollar_mandate_payment
- function: private::should_make_adyen_klarna_mandate_payment
- function: private::should_make_adyen_gpay_payment_test
- function: private::should_make_adyen_gpay_mandate_payment_test
- function: private::should_make_adyen_gpay_zero_dollar_mandate_payment_test
- function: private::should_make_adyen_klarna_mandate_payment_test
- struct: private::AdyenSeleniumTest
- impl: impl SeleniumTest for AdyenSeleniumTest
**crates/router/tests/connectors/bambora.rs**
Modify existing code
**crates/router/tests/connectors/forte.rs**
Modify existing code
**crates/router/tests/connectors/main.rs**
Add:
- mod: private::adyen_ui
**crates/router/tests/connectors/nexinets.rs**
Modify existing code
**crates/router/tests/connectors/paypal.rs**
Modify existing code
**crates/router/tests/connectors/selenium.rs**
Add:
- function: private::is_text_present_now
**crates/router/tests/connectors/utils.rs**
Modify existing code
**crates/router/tests/connectors/zen.rs**
Modify existing code
|
{"issue_number": 1045, "pr_number": 1046, "commits_count": 1, "files_changed": 23, "response_length": 3766, "file_count": 24, "needs_breakdown": true}
|
Updating Errors in the API-ref Docs
Updating Errors in the API-ref Docs
|
<think>
PR Context:
- Title: Docs: Updating Error codes in API-ref
- Merged: 2024-07-15T13:01:27Z
- Files changed: 1 files
- Commits: 14 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 5305, "pr_number": 5296, "commits_count": 0, "files_changed": 1, "response_length": 768, "file_count": 0, "needs_breakdown": false}
|
[BUG] fix(payments): add connector error details in response when payment void fails
### Bug Description
When a payment void fails at the connector level, the error was not being propagated back in the API response.
This change ensures connector error details are included in the response, so clients can handle failures appropriately.
### Expected Behavior
When a payment void fails at the connector level, the error was not being propagated back in the API response.
This change ensures connector error details are included in the response, so clients can handle failures appropriately.
### Actual Behavior
Currently error is not coming in payment void if failed at connector level.
### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
### Context For The Bug
_No response_
### Environment
Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header to help us debug your issue.
If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution:
2. Rust version (output of `rustc --version`): ``
3. App version (output of `cargo r --features vergen -- --version`): ``
### Have you spent some time checking if this bug has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: fix(payments): update error handling for payment void v2
- Merged: 2025-10-07T08:22:58Z
- Files changed: 6 files
- Commits: 17 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add error details when payment void is failed at connector level and update the status accordingly.
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies applic
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payments): update error handling for payment void v2 (#9595)
Co-authored-by: hyperswitch-bot[bot
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/conversion_impls.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
|
{"issue_number": 9616, "pr_number": 9595, "commits_count": 1, "files_changed": 6, "response_length": 1309, "file_count": 7, "needs_breakdown": false}
|
[REFACTOR] update cybersource and BOA connector transformers
Currently the `from` impl for card issuer of Cybersource lies in BOA. ref - https://github.com/juspay/hyperswitch/blob/edd099886da9c46800a646fe809796a08eb78c99/crates/router/src/connector/cybersource/transformers.rs#L1267
Move this impl to cybersource transformers - https://github.com/juspay/hyperswitch/blob/edd099886da9c46800a646fe809796a08eb78c99/crates/router/src/connector/bankofamerica/transformers.rs#L522
also, instead of returning strings, can we have enum variant for this?
Please update accordingly in both the cybersource and boa transformers.
|
<think>
PR Context:
- Title: chore(deps): bump the cargo group across 1 directories with 1 update
- Merged: 2024-02-12T11:12:00Z
- Files changed: 11 files
- Commits: 2 commits
Implementation approach:
Bumps the cargo group with 1 update in the /. directory: [tokio](https://github.com/tokio-rs/tokio).
Updates `tokio` from 1.35.1 to 1.36.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.36.0</h2>
<h1>1.36.0 (February 2nd, 2024)</h1>
<h3>Added</h3>
<ul>
<li>io: add <code>tokio::io::Join</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6220">#6220</a>)</l
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6279, "pr_number": 3624, "commits_count": 0, "files_changed": 11, "response_length": 799, "file_count": 0, "needs_breakdown": false}
|
ci: add workflow to create tags on schedule
## 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 introduces a new workflow to create tags on schedule, with the aid of `cocogitto`. In addition, this adds a `cocogitto` template for updating the changelog file. The changelog file has also been updated with recent changes.
I'll take up generating the release notes and GitHub release in a separate PR.
## 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).
-->
We aim to have daily releases.
## 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)?
-->
https://github.com/juspay/hyperswitch/actions/runs/5474468598
## 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: ci(release-new-version): create GitHub release with release notes
- Merged: 2023-07-10T13:44:07Z
- Files changed: 8 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds support for the "release a new version" workflow to also create a GitHub release in addition to a tag.
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 1642, "pr_number": 1669, "commits_count": 0, "files_changed": 8, "response_length": 795, "file_count": 0, "needs_breakdown": false}
|
feat(core): Add record attempt operation for revenue recovery webhooks
## 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 -->
**Revenue record operation**
In revenue recovery webhook flow, we mainly consume 3 types of events
1) PaymentFailure
2) PaymentSuccess
3) InvoiceCancel
For PaymentFailure or PaymentSuccess scenario we need to record the attempt and update the payment intent fields. This PR adds support for this operations.
**Why do we need to record the payment attempts ?**
To predict the next schedule time of mit transaction we need previous attempts information like error message, code and billing info, mandate details etc. So we store this info in payment_attempt against intent(invoice).
**Why do we need to update payment intent ?**
Intent Status should be altered based on attempt status. Apart from this info like no of retries, payment method token details needs to be update in update trackers of record attempt operation.
### 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)?
-->
Testcase 1:
create payment connector mca :
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_FFzEuYGiJhp3SfL7AXoZ' \
--header 'x-profile-id: pro_gj36mgkfbJuFw2ZVvzX8' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"connector_name": "stripe",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "stripe apikey"
},
"connector_webhook_details": {
"merchant_secret": ""
},
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8"
}'
```
response :
```
{
"connector_type": "payment_processor",
"connector_name": "stripe",
"connector_label": "stripe_business",
"id": "mca_oAXqVf3BZs7bOS0iNhV7",
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "sk*******************************************************************************************************5b"
},
"payment_methods_enabled": null,
"connector_webhook_details": {
"merchant_secret": "",
"additional_secret": null
},
"metadata": null,
"disabled": false,
"frm_configs": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null,
"feature_metadata": null
}
```
get the payment connector mca and create billing connector mca
Create billing connector mca
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_FFzEuYGiJhp3SfL7AXoZ' \
--header 'x-profile-id: pro_gj36mgkfbJuFw2ZVvzX8' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "billing_processor",
"connector_name": "chargebee",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "chargebee apikey"
},
"connector_webhook_details": {
"merchant_secret": "chargebee",
"additional_secret" : "password"
},
"feature_metadata" : {
"revenue_recovery" : {
"max_retry_count" : 27,
"billing_connector_retry_threshold" : 16,
"billing_account_reference" :{
"mca_oAXqVf3BZs7bOS0iNhV7" : "gw_16BlyOUaPA0eq12MZ"
}
}
},
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8"
}'
```
response :
```
{
"connector_type": "payment_processor",
"connector_name": "chargebee",
"connector_label": "chargebee_business",
"id": "mca_1WvloGjsk5KcxOZ6fBPd",
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "sk*******************************************************************************************************5b"
},
"payment_methods_enabled": null,
"connector_webhook_details": {
"merchant_secret": "chargebee",
"additional_secret": "password"
},
"metadata": null,
"disabled": false,
"frm_configs": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null,
"feature_metadata": {
"revenue_recovery": {
"max_retry_count": 27,
"billing_connector_retry_threshold": 16,
"billing_account_reference": {
"mca_oAXqVf3BZs7bOS0iNhV7": "gw_16BlyOUaPA0eq12MZ"
}
}
}
}
```
Send chargebee simulated webhook either from dashboard or postman
request :
```
curl --location 'http://localhost:8080/v2/webhooks/cloth_seller_FFzEuYGiJhp3SfL7AXoZ/pro_gj36mgkfbJuFw2ZVvzX8/mca_1WvloGjsk5KcxOZ6fBPd' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
"id": "ev_169vy3UaPFn4L4mf",
"occurred_at": 1737361021,
"source": "admin_console",
"user": "[email protected]",
"object": "event",
"api_version": "v2",
"content": {
"transaction": {
"id": "txn_169vy3UaPFmC44me",
"customer_id": "Azq8o5UaLqWWvyGd",
"subscription_id": "Azq8o5UaLr2WnyHG",
"gateway_account_id": "gw_16BlyOUaPA0eq12MZ",
"payment_source_id": "pm_169vy3UaPDo0t4hL",
"payment_method": "card",
"gateway": "stripe",
"type": "payment",
"date": 1737361019,
"exchange_rate": 1,
"amount": 5,
"id_at_gateway": "ch_3QjGAJSHworDX2hs0B120C0A",
"status": "failure",
"updated_at": 1737361021,
"fraud_reason": "Payment complete.",
"resource_version": 1737361021397,
"deleted": false,
"object": "transaction",
"masked_card_number": "************4242",
"currency_code": "INR",
"base_currency_code": "INR",
"amount_unused": 0,
"linked_invoices": [
{
"invoice_id": "9",
"applied_amount": 500000,
"applied_at": 1737361021,
"invoice_date": 1737361018,
"invoice_total": 500000,
"invoice_status": "paid"
}
],
"linked_refunds": [],
"initiator_type": "merchant",
"three_d_secure": false,
"payment_method_details": "{\"card\":{\"first_name\":\"test2\",\"last_name\":\"name2\",\"iin\":\"424242\",\"last4\":\"4242\",\"funding_type\":\"credit\",\"expiry_month\":12,\"expiry_year\":2026,\"billing_addr1\":\"asdf\",\"billing_addr2\":\"asd\",\"billing_city\":\"asdf\",\"billing_state\":\"asdfaf\",\"billing_country\":\"AF\",\"billing_zip\":\"12345\",\"masked_number\":\"************4242\",\"object\":\"card\",\"brand\":\"visa\"}}"
},
"invoice": {
"id": "invoice_1234",
"customer_id": "Azq8o5UaLqWWvyGd",
"subscription_id": "Azq8o5UaLr2WnyHG",
"recurring": false,
"status": "paid",
"price_type": "tax_exclusive",
"date": 1737361018,
"due_date": 1737361018,
"net_term_days": 0,
"exchange_rate": 1,
"total": 5,
"amount_paid": 0,
"amount_adjusted": 0,
"write_off_amount": 0,
"credits_applied": 0,
"amount_due": 0,
"paid_at": 1737361019,
"updated_at": 1737361021,
"resource_version": 1737361021401,
"deleted": false,
"object": "invoice",
"first_invoice": false,
"amount_to_collect": 0,
"round_off_amount": 0,
"has_advance_charges": false,
"currency_code": "INR",
"base_currency_code": "INR",
"generated_at": 1737361018,
"is_gifted": false,
"term_finalized": true,
"channel": "web",
"tax": 0,
"line_items": [
{
"id": "li_169vy3UaPFmBR4md",
"date_from": 1737361004,
"date_to": 1737361004,
"unit_amount": 500000,
"quantity": 1,
"amount": 500000,
"pricing_model": "flat_fee",
"is_taxed": false,
"tax_amount": 0,
"object": "line_item",
"subscription_id": "Azq8o5UaLr2WnyHG",
"customer_id": "Azq8o5UaLqWWvyGd",
"description": "Implementation Charge",
"entity_type": "charge_item_price",
"entity_id": "cbdemo_implementation-charge-INR",
"tax_exempt_reason": "tax_not_configured",
"discount_amount": 0,
"item_level_discount_amount": 0
}
],
"sub_total": 500000,
"linked_payments": [
{
"txn_id": "txn_169vy3UaPFmC44me",
"applied_amount": 500000,
"applied_at": 1737361021,
"txn_status": "success",
"txn_date": 1737361019,
"txn_amount": 500000
}
],
"applied_credits": [],
"adjustment_credit_notes": [],
"issued_credit_notes": [],
"linked_orders": [],
"dunning_attempts": [],
"billing_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "billing_address"
},
"site_details_at_creation": {
"timezone": "Asia/Calcutta"
}
},
"customer": {
"id": "Azq8o5UaLqWWvyGd",
"first_name": "john",
"last_name": "doe",
"email": "[email protected]",
"phone": "831 757 5848",
"company": "johndoe",
"auto_collection": "on",
"net_term_days": 0,
"allow_direct_debit": false,
"created_at": 1737310670,
"created_from_ip": "205.254.163.189",
"taxability": "taxable",
"updated_at": 1737360899,
"pii_cleared": "active",
"channel": "web",
"resource_version": 1737360899990,
"deleted": false,
"object": "customer",
"billing_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "billing_address"
},
"card_status": "valid",
"promotional_credits": 0,
"refundable_credits": 0,
"excess_payments": 0,
"unbilled_charges": 0,
"preferred_currency_code": "INR",
"mrr": 0,
"primary_payment_source_id": "pm_169vy3UaPDo0t4hL",
"payment_method": {
"object": "payment_method",
"type": "card",
"reference_id": "cus_RcUo8xTwe0sHP7/card_1QjG2dSHworDX2hs6YIjKdML",
"gateway": "stripe",
"gateway_account_id": "gw_16BlyOUaPA0eq12MZ",
"status": "valid"
}
},
"subscription": {
"id": "Azq8o5UaLr2WnyHG",
"billing_period": 1,
"billing_period_unit": "month",
"customer_id": "Azq8o5UaLqWWvyGd",
"status": "active",
"current_term_start": 1737310793,
"current_term_end": 1739989193,
"next_billing_at": 1739989193,
"created_at": 1737310793,
"started_at": 1737310793,
"activated_at": 1737310793,
"created_from_ip": "205.254.163.189",
"updated_at": 1737310799,
"has_scheduled_changes": false,
"channel": "web",
"resource_version": 1737310799688,
"deleted": false,
"object": "subscription",
"currency_code": "INR",
"subscription_items": [
{
"item_price_id": "cbdemo_premium-INR-monthly",
"item_type": "plan",
"quantity": 1,
"unit_price": 100000,
"amount": 0,
"free_quantity": 3,
"object": "subscription_item"
}
],
"shipping_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "shipping_address"
},
"due_invoices_count": 0,
"mrr": 0,
"exchange_rate": 1,
"base_currency_code": "INR",
"has_scheduled_advance_invoices": false
}
},
"event_type": "payment_failed",
"webhook_status": "scheduled",
"webhooks": [
{
"id": "whv2_6oZfZUaLmtchA5Bl",
"webhook_status": "scheduled",
"object": "webhook"
}
]
}'
```
This should create Payment intent, payment attempt in our system with right values in DB
Payment intent details in DB

Payment attempt details in DB

Test case 2 :
change the transaction id in above simulated webhooks and hit the request again, it should create new payment attempt but update the payment intent feature metadata.

Test case 3 :
After passing succeded transaction, we should not allow to record further transactions

Note: This above webhook will still not recieve api response it will only create objects in our system .
## 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): Add support for chargebee recovery webhooks
- Merged: 2025-02-27T13:32:06Z
- Files changed: 16 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add support for chargebee passive churn recovery webhooks. This Pr also adds billing_processor as connector type.
### Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR m
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add support for chargebee recovery webhooks (#7110)
Co-authored-by: Chikke Srujan <
Files to modify:
**crates/api_models/src/enums.rs**
Add:
- function: pub::convert_billing_connector
- enum: pub::BillingConnectors
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/common_utils/src/id_type/payment.rs**
Add:
- function: private::from_str
- impl: impl std::str::FromStr for PaymentReferenceId
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee.rs**
Add:
- function: private::get_webhook_source_verification_signature
- function: private::verify_webhook_source
- function: private::get_webhook_object_reference_id
- function: private::get_webhook_event_type
- function: private::get_revenue_recovery_attempt_details
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Add:
- function: pub::get_webhook_object_from_body
- function: pub::get_invoice_webhook_data_from_body
- function: pub::find_connector_ids
- function: private::try_from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::try_from
- struct: pub::ChargebeeWebhookBody
- struct: pub::ChargebeeInvoiceBody
- struct: pub::ChargebeeInvoiceContent
- struct: pub::ChargebeeWebhookContent
- struct: pub::ChargebeeInvoiceData
- struct: pub::ChargebeeTransactionData
- struct: pub::ChargebeePaymentMethodDetails
- struct: pub::ChargebeeCardDetails
- struct: pub::ChargebeeCustomer
- struct: pub::ChargebeePaymentMethod
- enum: pub::ChargebeeEventType
- enum: pub::ChargebeeTransactionPaymentMethod
- enum: pub::ChargebeeFundingType
- enum: pub::ChargebeeTranasactionStatus
- enum: pub::ChargebeeGateway
- impl: impl ChargebeeWebhookBody
- impl: impl ChargebeeInvoiceBody
- impl: impl ChargebeeCustomer
- impl: impl TryFrom<ChargebeeWebhookBody> for revenue_recovery::RevenueRecoveryAttemptData
- impl: impl From<ChargebeeTranasactionStatus> for enums::AttemptStatus
- impl: impl From<ChargebeeTransactionPaymentMethod> for enums::PaymentMethod
- impl: impl From<ChargebeeFundingType> for enums::PaymentMethodType
- impl: impl From<ChargebeeEventType> for api_models::webhooks::IncomingWebhookEvent
- impl: impl TryFrom<ChargebeeInvoiceBody> for revenue_recovery::RevenueRecoveryInvoiceData
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 7236, "pr_number": 7110, "commits_count": 1, "files_changed": 16, "response_length": 3587, "file_count": 12, "needs_breakdown": false}
|
refactor(ci): Remove Adyen-specific deprecated PMTs Sofort test cases in Postman
## 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 -->
**Postman Collection Update**: Removed the Sofort test cases from the Adyen connector in the Postman collection because these payment methods are deprecated by Adyen Connector.
### 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).
-->
- The **Postman** test cases for Sofort are no longer valid for the Adyen connector, as Adyen has deprecated these PMTs.
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
_**Before**_
<img width="1279" alt="image" src="https://github.com/user-attachments/assets/91073ae0-a62c-40d7-863b-ddda5e2620a8" />
_**After**_
<img width="1093" alt="image" src="https://github.com/user-attachments/assets/f45d07f3-47eb-4331-90d9-b7a2fedf4d2f" />
## 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: chore(postman): postman tests fixes
- Merged: 2025-03-06T08:48:47Z
- Files changed: 30 files
- Commits: 13 commits
Implementation approach:
## Description
### 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?
### Connector:`adyen_uk`
<img width="1270" alt="image" src="https://github.com/use
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7099, "pr_number": 7159, "commits_count": 0, "files_changed": 30, "response_length": 767, "file_count": 0, "needs_breakdown": false}
|
Remove duplicated card number interface
### Feature Description
The CardNumber interface has a duplicated method with the same functionality.
### Possible Implementation
Remove one of the duplicated interfaces.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: refactor(cards,router): Remove duplicated card number interface
- Merged: 2024-05-16T13:41:57Z
- Files changed: 3 files
- Commits: 5 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
The CardNumber interface has a duplicated method with the same functionality. Removed one.
closes #4442
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies app
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(cards,router): Remove duplicated card number interface (#4404)
Co-authored-by: Sanchith Heg
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/cards/src/validate.rs**
Remove:
- function: pub::get_card_extended_bin
**crates/router/src/core/payments/helpers.rs**
Modify existing code
|
{"issue_number": 4442, "pr_number": 4404, "commits_count": 1, "files_changed": 3, "response_length": 1141, "file_count": 5, "needs_breakdown": false}
|
refactor(user): Make password nullable for `users`
Currently `password` is required field in `users` table. This is causing us to create temporary passwords for `users` in some APIs which inserts `users` without password.
So, we have to make password nullable to solve this.
|
<think>
PR Context:
- Title: refactor(users): Make password nullable in `users` table
- Merged: 2024-06-10T13:10:29Z
- Files changed: 7 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This API will make the password column in the `users` table nullable.
### Additional Changes
- [ ] This PR modifies the API contract
- [x] 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:** refactor(users): Make password nullable in `users` table (#4902)
Files to modify:
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/user.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/db/user.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Modify existing code
|
{"issue_number": 4901, "pr_number": 4902, "commits_count": 1, "files_changed": 7, "response_length": 1178, "file_count": 7, "needs_breakdown": false}
|
primary key violates unique constraint upon sending lots of create payment requests with the same customer id
Discovered while running `payment-confirm` loadtesting script.
**Log:**
```
{
...
"flow":"PaymentsCreate",
"extra":{
"api_authentication":"ApiKey",
"error":"{\"error\":{\"type\":\"server_not_available\",\"code\":\"RE_00\",\"message\":\"Something went wrong.\"}}\n├╴crates/router/src/core/payments.rs:96:10\n│\n├─▶ DatabaseError: A unique constraint violation occurred\n│ ├╴crates/router/src/types/storage/query/generics.rs:168:22\n│ ╰╴Error while inserting CustomerNew { customer_id: \"StripeCustomer\", merchant_id: \"merchant_1669119076606\", name: Some(\"John Doe\"), email: Some(*****@example.com), phone: Some(*** alloc::string::String ***), description: None, phone_country_code: Some(\"+65\"), address: None, metadata: None }\n│\n╰─▶ Failed to issue a query: duplicate key value violates unique constraint \"customers_pkey\"\n ╰╴crates/router/src/types/storage/query/generics.rs:167:27",
"http.client_ip":"192.168.48.10",
"http.flavor":"1.1",
"http.host":"router-server:8080",
"http.method":"POST",
"http.route":"/payments"
...
}
}
```
**Steps to reproduce:**
check out `rnd-loadtest-failing-requests` branch
I made a minor change which gives us access to logs of the router container.
once you checked out the branch:
```
cd loadtest
docker compose build # will take some time
bash loadtest.sh -s payment-confirm
```
the last command will give you something like `http_req_failed................: 0.18% ✓ 7 ✗ 3718` in the end. The numbers could be different. Those 7 requests are failed.
You can access the logs stored at `loadtest/logs.tmp/logs`. Search for "server_not_available" string in it.
**Notes:**
1. Those customer queries need to be in a single transaction but currently we are not using pgdb as a relational storage so that would not be a good solution.
**Possible solutions:**
1. We implement api level locking in future, that will handle parallel request errors. (cc @jarnura)
|
<think>
PR Context:
- Title: feat(payment_link): add multiple custom css support in business level
- Merged: 2024-07-01T11:16:05Z
- Files changed: 10 files
- Commits: 13 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Currently we support one theme config for payment link that can be set in business profile level, with this PR we will allow multiple payment link theme configuration in business profile.
### Additional Changes
- [x] This PR modifies the API contract
```shell
"payment_link_config": {
"theme": "#8A0808",
"logo": "https://i.p
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payment_link): add multiple custom css support in business level (#5137)
Co-authored-by: hyper
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_utils/src/types.rs**
Add:
- function: private::convert
- function: private::convert_back
- struct: pub::StringMajorUnitForCore
- impl: impl AmountConvertor for StringMajorUnitForCore
**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/payment_link.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/macros.rs**
Modify existing code
|
{"issue_number": 8, "pr_number": 5137, "commits_count": 1, "files_changed": 10, "response_length": 1645, "file_count": 10, "needs_breakdown": false}
|
[REFACTOR] : [Nuvei] 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): [Nuvei] update error message
- Merged: 2023-11-26T20:22:10Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Fix issue: #2855
- Changes to be made: update the error message
- File changed: **```transformers.rs```** (crates/router/src/connector/nuvei/transformers.rs)
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Nuvei] update error message (#2867)
Files to modify:
**crates/router/src/connector/nuvei/transformers.rs**
Modify existing code
|
{"issue_number": 2855, "pr_number": 2867, "commits_count": 1, "files_changed": 1, "response_length": 935, "file_count": 4, "needs_breakdown": false}
|
refactor(connector): added amount conversion to FISERV
## 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 MinorUnit for amount conversion
### 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).
-->
fixes #5947
## 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`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: refactor(connector): [FISERV, HELCIM] Add amount conversion framework to Fiserv, Helcim
- Merged: 2025-03-12T07:58:54Z
- Files changed: 8 files
- Commits: 13 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
added **FloatMajorUnit** for amount conversion for **Fiserv**
added **FloatMajorUnit** for amount conversion for **Helcim**
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [FISERV, HELCIM] Add amount conversion framework to Fiserv, Helcim (#7336)
Co-a
Files to modify:
**crates/hyperswitch_connectors/src/connectors/fiserv.rs**
Remove:
- struct: pub::Fiserv
Add:
- function: pub::new
- struct: pub::Fiserv
**crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/helcim.rs**
Remove:
- struct: pub::Helcim
Add:
- function: pub::new
- struct: pub::Helcim
- impl: impl Helcim
**crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Remove:
- function: pub::str_to_f32
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/tests/connectors/fiserv.rs**
Modify existing code
**crates/router/tests/connectors/helcim.rs**
Modify existing code
|
{"issue_number": 6256, "pr_number": 7336, "commits_count": 1, "files_changed": 8, "response_length": 1750, "file_count": 14, "needs_breakdown": false}
|
fix(webhooks): add temporary support to acknowledge webhooks whose pa…
…yments aren't done on hyperswitch
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Allow payment not found cases in sandbox
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: fix(webhooks): add temporary support to acknowledge webhooks whose pa…
- Merged: 2023-08-09T12:19:04Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
…… (#1887)
## Description
Mirroring (#1887)
<!-- 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 lin
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(webhooks): add temporary support to acknowledge webhooks whose pa… (#1907)
Files to modify:
**crates/router/src/core/webhooks.rs**
Modify existing code
**Commit 2:** fix(webhooks): add temporary support to acknowledge webhooks whose pa… (#1907)
Files to modify:
**crates/router/src/core/webhooks.rs**
Modify existing code
|
{"issue_number": 1887, "pr_number": 1907, "commits_count": 2, "files_changed": 1, "response_length": 1137, "file_count": 5, "needs_breakdown": false}
|
[ENHANCE] create_user_authentication_method API response to include created entity details
Currently, the [create_user_authentication_method](https://github.com/juspay/hyperswitch/blob/cf30da2df05aac69fd82b676e639b2fbc85dcae5/crates/router/src/core/user.rs#L2482) API endpoint (`POST /user/auth`) returns a generic `200 OK` status with an empty body upon successful creation. This is not informative for API clients, who would benefit from receiving the complete details of the newly created resource in the response, rather than just a success status.
### __Proposed Solution:__
To improve the API's usability and provide immediate access to the created resource's data, the endpoint should return a JSON response containing all the relevant fields of the new user authentication method. This aligns with common REST API practices where a `POST` request to a collection resource returns the representation of the newly created resource.
### __Implementation Plan:__
1. __Define a New Comprehensive Response Struct:__
- In the file `crates/api_models/src/user.rs`, define a new public struct named `CreateUserAuthenticationMethodResponse`.
- This struct should derive `Debug`, `serde::Serialize` and any other traits if required.
- It should contain the following public fields with their respective types:
- `id`, `auth_id`, `owner_id`,`owner_type`, `auth_type`, `email_domain`,`allow_signup`
- Place this new struct definition logically near the existing `CreateUserAuthenticationMethodRequest` struct.
2. __Update the Core Function:__
- In the file `crates/router/src/core/user.rs`, locate the `create_user_authentication_method` async function.
- Update the function's return type from `UserResponse<()>` to `UserResponse<CreateUserAuthenticationMethodResponse>`.
- Add the necessary import statement at the top of the file: `use api_models::user::CreateUserAuthenticationMethodResponse;`.
- Modify the function's success return statement. Instead of `Ok(ApplicationResponse::StatusOk)`, it should return `CreateUserAuthenticationMethodResponse`. This uses the variables already available or computed within the function to populate the response struct.
### __How to Test:__
1. Run the Hyperswitch application locally.
2. Make a `POST` request to the `/user/authentication_method` endpoint.
3. Use the admin API key for authorization. For local development, the key is typically `test_admin`.
4. The request body should be a valid `CreateUserAuthenticationMethodRequest` JSON object.
5. Verify that the response status is `200 OK` and the response body is a JSON object containing the `id`, `auth_id`, `owner_id`, `owner_type`, `auth_type`, `email_domain`, and `allow_signup` of the newly created authentication method.
Curl
```
curl --location '<hyperswitch-backend-base-url>/user/auth' \
--header 'Content-Type: application/json' \
--header 'api-key: <admin-api-key>' \
--data '
{
"owner_type": "organization",
"owner_id": "test_123",
"auth_method": {
"auth_type": "open_id_connect",
"private_config": {
"base_url": "hello.com",
"client_id": "something_client",
"client_secret": "something_client",
"private_key": "something"
},
"public_config": {
"name": "okta"
}
},
"allow_signup": true,
"email_domain": "None"
}'
```
### __Expected Outcome:__
After these changes, a successful request to `POST /user/auth` will yield a `200 OK` response with a JSON body similar to the following:
```json
{
"id": "5500",
"auth_id": "a1b2c3d4-0-1234-567890abcdef",
"owner_id": "merchant_123",
"owner_type": "Merchant",
"auth_type": "OpenIdConnect",
"email_domain": "example.com",
"allow_signup": true
}
```
This provides a much more robust and developer-friendly API experience by giving clients full visibility into the created resource immediately.
|
<think>
PR Context:
- Title: feat: include response body for create_user_authentication_method
- Merged: 2025-10-15T16:19:48Z
- Files changed: 3 files
- Commits: 12 commits
Implementation approach:
#9643
## Description
Currently the API Call to the /user/auth endpoint displays only a 200::OK response code without providing a proper response body containing the authentication details for proper debugging.This PR Introduces a Response body of type CreateUserAuthenticationMethodReponse which co
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: include response body for create_user_authentication_method (#9653)
Files to modify:
**crates/api_models/src/events/user.rs**
Modify existing code
**crates/api_models/src/user.rs**
Add:
- struct: pub::CreateUserAuthenticationMethodResponse
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 9643, "pr_number": 9653, "commits_count": 1, "files_changed": 3, "response_length": 1114, "file_count": 5, "needs_breakdown": false}
|
[Feature] Add tenant-ID as a field to all KafkaStore events
### Context
In-order to support multi-tenancy we need to store data partioned via tenant-id.
In order to do that for kafka events we need to pass tenant-id as a field in the generated kafka events
We can use the KafkaStore field added in #4512 to add them to events in Kafka
### Approach
1. Add a new field in `KafkaEvent` struct representing tenant_id
```rust
#[derive(serde::Serialize, Debug)]
struct KafkaEvent<'a, T: KafkaMessage> {
#[serde(flatten)]
event: &'a T,
sign_flag: i32,
tenant_id: TenantID
}
```
Alternate approaches can be discussed in the issue
|
<think>
PR Context:
- Title: refactor(db): Add TenantID field to KafkaEvent struct
- Merged: 2024-05-15T11:10:32Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Add TenantID to the KafkaEvent struct and add the extra param to the KafkaEvent constructor
- Made changes to the required placed
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the da
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(db): Add TenantID field to KafkaEvent struct (#4598)
Co-authored-by: Sampras Lopes <sampras
Files to modify:
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/services/kafka.rs**
Modify existing code
|
{"issue_number": 4595, "pr_number": 4598, "commits_count": 1, "files_changed": 2, "response_length": 1032, "file_count": 4, "needs_breakdown": false}
|
fix(payment_methods): card_network and card_scheme should be consistent
## 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 -->
In customer payment method list api, card scheme and card network are showing different value for co-branded card it they are saved with both the network, to fix this issue, both these fields are now fetching the data from the card locker
### 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 Postam:
- Create a MCA(Checkout):
- Create a payment with co-branded card with network at Visa:
```
{
"amount": 1043,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "{{customer_id}}",
"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://google.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "01",
"card_exp_year": "99",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "Visa",
"nick_name": "Sakil"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
}
}
}
```
- Do a customer payment method list, the response should be following:
```
{
"customer_payment_methods": [
{
"payment_token": "token_I8i8KGuFhF4KSxQHFePi",
"payment_method_id": "pm_3D4MneEjvgweeRyfyiBv",
"customer_id": "cus_4hPhaiDFxK9W0qUpOGkq",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Visa",
"issuer_country": null,
"last4_digits": "0021",
"expiry_month": "01",
"expiry_year": "99",
"card_token": null,
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": "Sakil",
"card_network": "Visa",
"card_isin": "401006",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2024-12-16T10:20:59.201Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2024-12-16T10:20:59.201Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
}
}
],
"is_guest_customer": false
}
```
- Create a payment again with co-branded card but with network as `CartesBancaires`:
```
{
"amount": 1043,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "{{customer_id}}",
"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://google.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "01",
"card_exp_year": "99",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "CartesBancaires",
"nick_name": "Sakil"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
}
}
}
```
- Do a customer payment method list call, the response should be:
```
{
"customer_payment_methods": [
{
"payment_token": "token_I8i8KGuFhF4KSxQHFePi",
"payment_method_id": "pm_3D4MneEjvgweeRyfyiBv",
"customer_id": "cus_4hPhaiDFxK9W0qUpOGkq",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "CartesBancaires",
"issuer_country": null,
"last4_digits": "0021",
"expiry_month": "01",
"expiry_year": "99",
"card_token": null,
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": "Sakil",
"card_network": "CartesBancaires",
"card_isin": "401006",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2024-12-16T10:20:59.201Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2024-12-16T10:20:59.201Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
}
}
],
"is_guest_customer": false
}
```
## 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(payment_methods): card_network and card_scheme should be consistent
- Merged: 2024-12-18T07:42:26Z
- Files changed: 3 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
In customer payment method list api, card scheme and card network are showing different value for co-branded card it they are saved with both the network, to fix this issue, both these fields are now fetching the data from the card locker
N
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_methods): card_network and card_scheme should be consistent (#6867)
Files to modify:
**crates/diesel_models/src/payment_method.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
|
{"issue_number": 6849, "pr_number": 6867, "commits_count": 1, "files_changed": 3, "response_length": 1124, "file_count": 5, "needs_breakdown": false}
|
Add endpoints to support ai chat interactions
- Add endpoints to talk to different ai services.
- Add config for URLS
- make feature flag for ai chat service that will help to manage feature across different environments.
|
<think>
PR Context:
- Title: feat(ai): add endpoints to chat with ai service
- Merged: 2025-07-16T20:33:11Z
- Files changed: 26 files
- Commits: 23 commits
Implementation approach:
## Description
The PR does the following actions
- Adds endpoints to talk to ai services, particularly to n8n flow and embedded flow
- Introduces a feature flag to manage chat features across different envs
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifie
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(ai): add endpoints to chat with ai service (#8585)
Co-authored-by: Riddhiagrawal001 <riddhi.agr
Files to modify:
**crates/api_models/src/chat.rs**
Add:
- struct: pub::ChatRequest
- struct: pub::ChatResponse
**crates/api_models/src/events.rs**
Add:
- mod: pub::chat
**crates/api_models/src/events/chat.rs**
Modify existing code
**crates/api_models/src/lib.rs**
Add:
- mod: pub::chat
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/common_utils/src/events.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/chat.rs**
Add:
- struct: pub::GetDataMessage
- struct: pub::HyperswitchAiDataRequest
**crates/hyperswitch_domain_models/src/lib.rs**
Add:
- mod: pub::chat
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Add:
- struct: pub::ChatSettings
**crates/router/src/configs/validations.rs**
Add:
- function: pub::validate
- impl: impl super::settings::ChatSettings
**crates/router/src/core.rs**
Add:
- mod: pub::chat
**crates/router/src/core/chat.rs**
Add:
- function: pub::get_data_from_hyperswitch_ai_workflow
**crates/router/src/core/errors.rs**
Add:
- mod: pub::chat
**crates/router/src/core/errors/chat.rs**
Add:
- function: private::switch
- function: pub::get_error_message
- enum: pub::ChatErrors
- impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ChatErrors
- impl: impl ChatErrors
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Add:
- mod: pub::chat
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- struct: pub::Chat
- impl: impl Chat
**crates/router/src/routes/chat.rs**
Add:
- function: pub::get_data_from_hyperswitch_ai_workflow
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 8584, "pr_number": 8585, "commits_count": 1, "files_changed": 26, "response_length": 2807, "file_count": 23, "needs_breakdown": true}
|
[REFACTOR]: [OPAYO] Add amount conversion framework to Opayo
### :memo: Feature Description
Currently, amounts are represented as `i64` values throughout the application. We want to introduce a `Unit` struct that explicitly states the denomination. A new type, `MinorUnit`, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows.
Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application.
### :hammer: Possible Implementation
- For each connector, we need to create an amount conversion function. Connectors will specify the format they require, and the core framework will handle the conversion accordingly.
- Connectors should invoke the `convert` function to receive the amount in their required format.
- Refer to the [connector documentation](https://docs.recurly.com/docs/opayo) 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)
### :sparkles: Are you willing to submit a PR?
### 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(connector): add amount conversion framework to opayo
- Merged: 2024-10-18T13:46:21Z
- Files changed: 3 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds amount conversion framework to Opayo.
Opayo accepts amount in MinorUnit
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configur
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): add amount conversion framework to opayo (#6342)
Co-authored-by: DEEPANSHU BANS
Files to modify:
**crates/router/src/connector/opayo.rs**
Remove:
- struct: pub::Opayo
Add:
- function: pub::new
- struct: pub::Opayo
- impl: impl Opayo
**crates/router/src/connector/opayo/transformers.rs**
Add:
- function: private::from
- struct: pub::OpayoRouterData
- impl: impl From<(MinorUnit, T)> for OpayoRouterData<T>
**crates/router/tests/connectors/opayo.rs**
Modify existing code
|
{"issue_number": 6135, "pr_number": 6342, "commits_count": 1, "files_changed": 3, "response_length": 1325, "file_count": 5, "needs_breakdown": false}
|
primary key violates unique constraint upon sending lots of create payment requests with the same customer id
Discovered while running `payment-confirm` loadtesting script.
**Log:**
```
{
...
"flow":"PaymentsCreate",
"extra":{
"api_authentication":"ApiKey",
"error":"{\"error\":{\"type\":\"server_not_available\",\"code\":\"RE_00\",\"message\":\"Something went wrong.\"}}\n├╴crates/router/src/core/payments.rs:96:10\n│\n├─▶ DatabaseError: A unique constraint violation occurred\n│ ├╴crates/router/src/types/storage/query/generics.rs:168:22\n│ ╰╴Error while inserting CustomerNew { customer_id: \"StripeCustomer\", merchant_id: \"merchant_1669119076606\", name: Some(\"John Doe\"), email: Some(*****@example.com), phone: Some(*** alloc::string::String ***), description: None, phone_country_code: Some(\"+65\"), address: None, metadata: None }\n│\n╰─▶ Failed to issue a query: duplicate key value violates unique constraint \"customers_pkey\"\n ╰╴crates/router/src/types/storage/query/generics.rs:167:27",
"http.client_ip":"192.168.48.10",
"http.flavor":"1.1",
"http.host":"router-server:8080",
"http.method":"POST",
"http.route":"/payments"
...
}
}
```
**Steps to reproduce:**
check out `rnd-loadtest-failing-requests` branch
I made a minor change which gives us access to logs of the router container.
once you checked out the branch:
```
cd loadtest
docker compose build # will take some time
bash loadtest.sh -s payment-confirm
```
the last command will give you something like `http_req_failed................: 0.18% ✓ 7 ✗ 3718` in the end. The numbers could be different. Those 7 requests are failed.
You can access the logs stored at `loadtest/logs.tmp/logs`. Search for "server_not_available" string in it.
**Notes:**
1. Those customer queries need to be in a single transaction but currently we are not using pgdb as a relational storage so that would not be a good solution.
**Possible solutions:**
1. We implement api level locking in future, that will handle parallel request errors. (cc @jarnura)
|
<think>
PR Context:
- Title: fix(payout): use mca_connector_id from ConnectorData to fetch mca_account
- Merged: 2024-08-14T14:57:28Z
- Files changed: 2 files
- Commits: 5 commits
Implementation approach:
## Description
Described in #5621
### 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(payout): use mca_connector_id from ConnectorData to fetch mca_account (#5620)
Co-authored-by: hy
Files to modify:
**crates/router/src/core/payouts.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
|
{"issue_number": 8, "pr_number": 5620, "commits_count": 1, "files_changed": 2, "response_length": 1046, "file_count": 4, "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(connector): add support for affirm through stripe
- Merged: 2023-01-12T12:00:22Z
- Files changed: 3 files
- Commits: 5 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This pr will add support for making affirm payments through stripe.
Few code enhancements that I have included in this PR
- change stripe payment method types from `String` to `StripePaymentMethodType`.
- make changes to `StripePayLaterData` so that it is usable for all pay later payments ( klarna, affirm, afterpay_clearpay )
## Motivation and
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): add support for affirm through stripe (#355)
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Remove:
- struct: pub::StripeKlarnaData
Add:
- struct: pub::StripePayLaterData
**crates/router/src/core/payment_methods/transformers.rs**
Modify existing code
|
{"issue_number": 347, "pr_number": 355, "commits_count": 1, "files_changed": 3, "response_length": 1158, "file_count": 5, "needs_breakdown": false}
|
feat(connector): [Payme] Add Void flow to Payme
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Add void to payme for cancelling transaction
Corresponding hotfix to https://github.com/juspay/hyperswitch/pull/3817
### 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)?
-->
Cannot be tested since cards are failing for Payme
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(connector): [Bluesnap] Metadata to connector metadata mapping
- Merged: 2024-01-30T09:29:47Z
- Files changed: 1 files
- Commits: 14 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
resolve [#3839](https://github.com/juspay/hyperswitch-cloud/issues/3839)
Metadata should be in
{String : Value } type where Value is not an object.
In case it is an object an Request Encoding error is thrown
## Test Case?
Testing can
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Bluesnap] Metadata to connector metadata mapping (#3331)
Co-authored-by: hyperswi
Files to modify:
**crates/router/src/connector/bluesnap/transformers.rs**
Remove:
- impl: impl TryFrom<BluesnapWebhookObjectResource> for serde_json::Value
Add:
- struct: pub::BluesnapMetadata
- struct: pub::RequestMetadata
|
{"issue_number": 3839, "pr_number": 3331, "commits_count": 1, "files_changed": 1, "response_length": 1144, "file_count": 3, "needs_breakdown": false}
|
refactor: add billing and shipping details to payment method data
### Feature Description
linking #347 for reference. Since the billing and shipping address used for payment should be stored in `basillisk` as per the discussion we had. This is to avoid
- Any PII information to be stored in db which will be used for payments.
- Avoid changes to payments if the address table undergoes any major changes ( like encryption ).
### Possible Implementation
- [ ] Have a struct under `payment_method_data.pay_later` that will have all billing and shipping related data required for payments. All paylater payments will have the mandatory details of address taken from here.
- [ ] Save pay_later data in `basillisk`.
- [ ] Add `payment_method_issuer` and `payment_experience` in `payment_attempt`. This will be used to decide which issuer the payment has to go through and what should be the experience ( either sdk flow or redirection flow ).
### Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
None
|
<think>
PR Context:
- Title: refactor: add payment_issuer and payment_experience in pa
- Merged: 2023-02-19T14:30:41Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add `payment_issuer` and `payment_experience` to payment_attempt table. The pay_later issuer will be decided based on this.
a small example of how this could and will be used.
if payment_issuer is `klarna` and payment_experience is `redirect_to_url` then klarna payment will be processed through `stripe` or any supported connector, but if the payment
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: add payment_issuer and payment_experience in pa (#491)
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/enums.rs**
Add:
- enum: pub::PaymentIssuer
- enum: pub::PaymentExperience
**crates/api_models/src/payment_methods.rs**
Remove:
- enum: pub::PaymentExperience
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_utils/src/custom_serde.rs**
Modify existing code
**crates/router/src/connector/aci/transformers.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Modify existing code
**crates/router/src/connector/authorizedotnet/transformers.rs**
Modify existing code
**crates/router/src/connector/braintree/transformers.rs**
Modify existing code
**crates/router/src/connector/checkout/transformers.rs**
Modify existing code
**crates/router/src/connector/cybersource/transformers.rs**
Modify existing code
**crates/router/src/connector/fiserv/transformers.rs**
Modify existing code
**crates/router/src/connector/globalpay/transformers.rs**
Modify existing code
**crates/router/src/connector/klarna.rs**
Modify existing code
**crates/router/src/connector/klarna/transformers.rs**
Modify existing code
**crates/router/src/connector/payu/transformers.rs**
Modify existing code
**crates/router/src/connector/rapyd/transformers.rs**
Modify existing code
**crates/router/src/connector/shift4/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Remove:
- impl: impl TryFrom<(api::PaymentMethod, enums::AuthenticationType)> for StripePaymentMethodData
Add:
- function: private::infer_stripe_pay_later_issuer
- function: private::try_from
- function: private::create_stripe_payment_method
- struct: pub::StripeBillingAddress
- impl: impl TryFrom<(&api_models::payments::PayLaterData, StripePaymentMethodType)> for StripeBillingAddress
- impl: impl TryFrom<(
api::PaymentMethod,
enums::AuthenticationType,
StripePaymentMethodType,
)> for StripePaymentMethodData
**crates/router/src/connector/worldline/transformers.rs**
Modify existing code
**crates/router/src/connector/worldpay.rs**
Modify existing code
**crates/router/src/connector/worldpay/transformers.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Modify existing code
**crates/router/src/core/errors/utils.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/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/db/payment_attempt.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Remove:
- function: private::from
- function: private::from
- impl: impl From<F<api_enums::RoutingAlgorithm>> for F<storage_enums::RoutingAlgorithm>
- impl: impl From<F<storage_enums::RoutingAlgorithm>> for F<api_enums::RoutingAlgorithm>
Add:
- function: private::from
- function: private::from
- impl: impl From<F<api_enums::PaymentIssuer>> for F<storage_enums::PaymentIssuer>
- impl: impl From<F<api_enums::PaymentExperience>> for F<storage_enums::PaymentExperience>
**crates/router/tests/connectors/aci.rs**
Modify existing code
**crates/router/tests/connectors/adyen.rs**
Modify existing code
**crates/router/tests/connectors/authorizedotnet.rs**
Modify existing code
**crates/router/tests/connectors/checkout.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
**crates/router/tests/connectors/worldline.rs**
Modify existing code
**crates/router/tests/payments.rs**
Modify existing code
**crates/router/tests/payments2.rs**
Modify existing code
**crates/router_derive/src/lib.rs**
Add:
- function: pub::diesel_enum_derive_string
**crates/router_derive/src/macros.rs**
Modify existing code
**crates/router_derive/src/macros/diesel.rs**
Add:
- function: pub::diesel_enum_text_derive_inner
- enum: private::StorageType
**crates/storage_models/src/enums.rs**
Remove:
- enum: pub::PaymentFlow
- enum: pub::RoutingAlgorithm
Add:
- enum: pub::MandateType
- enum: pub::PaymentExperience
**crates/storage_models/src/payment_attempt.rs**
Modify existing code
**crates/storage_models/src/schema.rs**
Modify existing code
|
{"issue_number": 447, "pr_number": 491, "commits_count": 1, "files_changed": 30, "response_length": 5583, "file_count": 49, "needs_breakdown": true}
|
[FEATURE]: [Stax] 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): [Stax] Use connector_response_reference_id as reference to merchant
- Merged: 2023-10-03T18:28:56Z
- Files changed: 1 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This pull request fixes #2348 issue in STAX and uses connector_response_reference_id as reference to merchant.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Stax] Use connector_response_reference_id as reference to merchant (#2415)
Files to modify:
**crates/router/src/connector/stax/transformers.rs**
Modify existing code
|
{"issue_number": 2348, "pr_number": 2415, "commits_count": 1, "files_changed": 1, "response_length": 1004, "file_count": 3, "needs_breakdown": false}
|
[FEATURE] align the JSON deserialization errors into expected ErrorResponse format
### Feature Description
HyperSwitch uses an error format for responding back with the errors in the API. This error structure is uniform across different stages of the flow. For any deserialization errors in the API, error response with a different structure is returned.
Expected
```
{
"error": {
"error_type": "invalid_request",
"message": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34",
"code": "IR_06"
}
}
```
Actual
```
{
"error": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34"
}
```
### Possible Implementation
Update the `Display` implementation of `CustomJsonError`
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: refactor: update API response for JSON deserialization errors
- Merged: 2024-11-21T22:26:21Z
- Files changed: 6 files
- Commits: 7 commits
Implementation approach:
## Description
Described in #6609
### 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:** refactor: update API response for JSON deserialization errors (#6610)
Files to modify:
**crates/router/src/utils.rs**
Modify existing code
|
{"issue_number": 6609, "pr_number": 6610, "commits_count": 1, "files_changed": 6, "response_length": 936, "file_count": 3, "needs_breakdown": false}
|
[FEATURE]: [Worldpay] Currency Unit Conversion
### :memo: Feature Description
- Each currency can be described in terms of base or minor units.
- For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit.
- In Hyperswitch, the amount value is expected to be always provided in minor units.
- For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent)
- Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them.
- We have functions `to_currency_base_unit` and `to_currency_lower_unit` in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector.
### :hammer: Possible Implementation
- ConnectorCommon trait have been implemented for the connector.
- This trait contains `get_currency_unit` method. This method needs to be implemented.
- It will define what type of conversion needs to be done during `connector_router_data` creation. Concurrently handle the creation of `connector_router_data` to be passed for the connector request body creation.
- You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2196
:bookmark: Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/`
### :package: Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### :sparkles: Are you willing to submit a PR?
|
<think>
PR Context:
- Title: refactor(connector): [Worldpay] Currency Unit Conversion
- Merged: 2023-10-12T06:02:32Z
- Files changed: 3 files
- Commits: 18 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This pull request implements the get_currency_unit from the ConnectorCommon trait for the Worldpay connector. This function allows connectors to declare their accepted currency unit as either Base or Minor. For Worldpay it accepts currency as
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Worldpay] Currency Unit Conversion (#2436)
Co-authored-by: Suraj <surajshinde.
Files to modify:
**crates/router/src/connector/worldpay.rs**
Add:
- function: private::get_currency_unit
**crates/router/src/connector/worldpay/transformers.rs**
Add:
- function: private::try_from
- struct: pub::WorldpayRouterData
- impl: impl TryFrom<(
&types::api::CurrencyUnit,
types::storage::enums::Currency,
i64,
T,
)> for WorldpayRouterData<T>
|
{"issue_number": 2250, "pr_number": 2436, "commits_count": 1, "files_changed": 3, "response_length": 1300, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] Add support for Bank Debits payment method
### Feature Description
### Problem statement
Bank Debits enables merchants to directly pull funds from the customers' bank accounts once the customers provide authorization for the same. It is primarily used for recurring transactions/mandates and for large ticket transactions like rent, fees, etc.
Hyperswitch will need to support the following popular Bank Debits from US and EU:
- ACH Direct Debit
- BECS Direct Debit
- BACS Direct Debit
- SEPA Direct Debit
### Possible Implementation
_No response_
### 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
|
<think>
PR Context:
- Title: feat(core): [Stripe] add bank debits payment method to stripe
- Merged: 2023-04-21T08:38:53Z
- Files changed: 8 files
- Commits: 17 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR will add support for creating payments using `bank_debits` payment method. This has been implemented for stripe.
Mandate details have to passed for all the payment methods.
- Sample mandate data
```json
{
"mandate_data": {
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): [Stripe] add bank debits payment method to stripe (#906)
Files to modify:
**crates/api_models/src/enums.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Add:
- struct: pub::BankDebitBilling
- enum: pub::BankDebitData
**crates/router/src/connector/aci/transformers.rs**
Modify existing code
**crates/router/src/connector/authorizedotnet/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Add:
- function: private::from
- function: private::get_bank_debit_data
- function: private::get_url
- struct: pub::StripeMandateRequest
- struct: pub::StripeBankDebitData
- struct: pub::StripeVerifyWithMicroDepositsResponse
- enum: pub::StripeMandateType
- enum: pub::BankDebitData
- impl: impl From<&payments::BankDebitBilling> for StripeBillingAddress
- impl: impl StripeNextActionResponse
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
**crates/storage_models/src/enums.rs**
Modify existing code
|
{"issue_number": 838, "pr_number": 906, "commits_count": 1, "files_changed": 8, "response_length": 1899, "file_count": 10, "needs_breakdown": false}
|
[FEATURE]: [Nexi Nets] 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): [NexiNets] Update connector_response_reference_id as reference to merchant
- Merged: 2023-10-11T09:15:11Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
The `connector_response_reference_id` parameter has been set for the Nexi Nets Payment Solutions for uniform reference and transaction tracking.
### File Changes
- [x] This PR modifies the Nexi Nets Transformers file.
**Location- router/src/connector/nexinets/transformers.rs**
## Motivation and Context
This PR was raised so that it Fixes #2337
## How did you test it?
- **I ran the following command, and all t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [NexiNets] Update connector_response_reference_id as reference to merchant (#2537)
Files to modify:
**crates/router/src/connector/nexinets/transformers.rs**
Modify existing code
|
{"issue_number": 2337, "pr_number": 2537, "commits_count": 1, "files_changed": 1, "response_length": 1022, "file_count": 4, "needs_breakdown": false}
|
[FIX] add a configuration validation for workers
We don't have a validation check
[number of workers in our config](https://github.com/juspay/hyperswitch/blob/94cd7b689758a71e13a3eaa655335e658d13afc8/crates/router/src/configs/settings.rs#L422) . But if the number of workers is zero actix straight out panics. Ref: https://docs.rs/actix-web/latest/actix_web/struct.HttpServer.html#method.workers
|
<think>
PR Context:
- Title: fix(router): added validation check to number of workers in config
- Merged: 2024-02-07T09:33:32Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Added validation check on number workers
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provid
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(router): added validation check to number of workers in config (#3533)
Files to modify:
**crates/router/src/configs/validations.rs**
Modify existing code
|
{"issue_number": 3510, "pr_number": 3533, "commits_count": 1, "files_changed": 1, "response_length": 960, "file_count": 3, "needs_breakdown": false}
|
confirm-intent API contract changes for split payments (v2)
In v2, we need to support receiving multiple payment methods in the confirm-intent request. Add a new field to support this use case
|
<think>
PR Context:
- Title: feat(router): Add Confirm-Intent API contract changes for split payments (v2)
- Merged: 2025-09-25T17:56:40Z
- Files changed: 3 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Added `split_payment_method_data` field to `confirm-intent` call to accept a `Vec` of payment methods
<img width="502" height="763" alt="image" src="https://github.com/user-attachments/assets/69ae3cc4-3d06-4980-b2d9-52b489aa98ad" />
##
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Add Confirm-Intent API contract changes for split payments (v2) (#9469)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- struct: pub::SplitPaymentMethodDataRequest
**crates/openapi/src/openapi_v2.rs**
Modify existing code
|
{"issue_number": 9467, "pr_number": 9469, "commits_count": 1, "files_changed": 3, "response_length": 1069, "file_count": 4, "needs_breakdown": false}
|
[BUG] docs: `amount` and `currency` are optional in OpenAPI docs
### Bug Description
The error
```json
{
"error": {
"type": "invalid_request",
"message": "Missing required param: currency",
"code": "IR_04"
}
}
```
Is thrown when creating a payment with no fields in the request body.The request is created as per the openapi schema shown [here](https://app.swaggerhub.com/apis-docs/bernard-eugine/HyperswitchAPI/0.0.1)
### Expected Behavior
The openapi schema should accurately tell which fields are mandatory in the request.
### Actual Behavior
Openapi schema lists all fields as optional.
### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Create a payment with no fields in the request body.
### Context For The Bug
_No response_
### Environment
Local environment.
### 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: feat(documentation): add polymorphic `generate_schema` macro
- Merged: 2023-05-19T11:33:50Z
- Files changed: 16 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR will allow us to specify which fields are mandatory in `PaymentsRequest` for a particular flow. A new macro is added called `PolymorphicSchema` ( Name is open for discussion ), which will generate different schemas as specified by
`#[generate_schemas(PaymentsCreateRequest)]` , where we can specify which fields will be mandatory in PaymentsCrea
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(documentation): add polymorphic `generate_schema` macro (#1183)
Co-authored-by: pixincreate@wor
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/api_models/src/refunds.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
**crates/router/src/routes/admin.rs**
Modify existing code
**crates/router/src/routes/disputes.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Modify existing code
**crates/router/src/types/api/admin.rs**
Modify existing code
**crates/router_derive/src/lib.rs**
Add:
- function: pub::polymorphic_schema
**crates/router_derive/src/macros.rs**
Remove:
- mod: private::helpers
Add:
- mod: pub::generate_schema
- mod: private::helpers
**crates/router_derive/src/macros/generate_schema.rs**
Add:
- function: private::get_inner_path_ident
- function: private::get_struct_fields
- function: pub::polymorphic_macro_derive_inner
|
{"issue_number": 1118, "pr_number": 1183, "commits_count": 1, "files_changed": 16, "response_length": 1980, "file_count": 15, "needs_breakdown": false}
|
refactor: Rename business profile to profiles in api, diesel, domain, interface and error types
<!-- 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 -->
Rename business profile to profiles in api, diesel, domain, interface and error types
### 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`
-->
- API Model types related to `BusinessProfiles` changed to `Profiles` both v1 and v2
- Diesel Model types related to `BusinessProfiles` changed to `Profiles` for both v1 and v2 since almost all the places we use common functions, and the table name is not changed for both versions. Only the transit types in the application changed
- Domain Model types related to `BusinessProfiles` changed to `Profiles` for both v1 and v2 since this is transit type in application
- Error variant for Profile where changed
- `BusinessProfileNotFound` to `ProfileNotFound`
- In Openapi spec of v1 the function name used is changed
- In Openapi spec of v2 both function name and types used where changed
- In `admin.rs` all private struct for both v1 and v2 is changes because those where transit types
- Database interface where changed to `ProfileInterface`
- Profile related route handler wrapper where moved to a separate file `src/routes/profile.rs` from `src/routes/admin.rs`
## 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).
-->
Currently the usage of Profile terms and BusinessProfile terms messed up and there is no consistency in usage of these terms.
This pull request covers only a part of renaming the business profile relates changes.
## 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)?
-->
These are only types changes, so if the compilation is successful then everything is good.
## 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: refactor(payment_methods): refactor customer payment methods list v2 code to follow better code practices
- Merged: 2024-11-08T14:57:43Z
- Files changed: 30 files
- Commits: 25 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR includes refactors around the customer payment methods list v2 code to follow some of the practices we've started enforcing in the recent few months. Additionally, I've picked up some minor refactors along the way.
This PR contai
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(payment_methods): refactor customer payment methods list v2 code to follow better code prac
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/diesel_models/src/business_profile.rs**
Modify existing code
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/diesel_models/src/payment_method.rs**
Remove:
- function: pub::create_payment_method
- function: pub::create_payment_method
Add:
- function: private::deref
- function: private::deref_mut
- struct: pub::PaymentsMandateReferenceRecord
- struct: pub::PaymentsMandateReference
- impl: impl std::ops::Deref for PaymentsMandateReference
- impl: impl std::ops::DerefMut for PaymentsMandateReference
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/business_profile.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/merchant_connector_account.rs**
Add:
- function: pub::new
- function: pub::is_merchant_connector_account_id_in_connector_mandate_details
- struct: pub::MerchantConnectorAccounts
- impl: impl MerchantConnectorAccounts
**crates/hyperswitch_domain_models/src/payment_methods.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_response_types.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Remove:
- function: pub::update_payment_method_metadata_and_last_used
Add:
- function: pub::get_mca_status
**crates/router/src/core/payment_methods/transformers.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/db/payment_method.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Add:
- function: pub::check_client_secret_and_get_auth
- function: pub::is_ephemeral_auth
**crates/router/src/types/api/admin.rs**
Modify existing code
**crates/router/src/types/payment_methods.rs**
Modify existing code
**crates/router/src/types/storage/payment_method.rs**
Remove:
- function: private::deref
- function: private::deref_mut
- struct: pub::PaymentsMandateReferenceRecord
- struct: pub::PaymentsMandateReference
- impl: impl Deref for PaymentsMandateReference
- impl: impl DerefMut for PaymentsMandateReference
|
{"issue_number": 5877, "pr_number": 6433, "commits_count": 1, "files_changed": 30, "response_length": 3885, "file_count": 28, "needs_breakdown": true}
|
[REFACTOR] : [Bluesnap] Add connector_transaction_id as fallback for webhooks
### Bug Description
Currently we are only consuming `merchant_transaction_id` from the webhook body, this was done to tackle the timeouts issue, but seems like Bluesnap doesn't always includes this id, so we need to add `connector_transaction_id` as fallback for webhook body
### Expected Behavior
add `connector_transaction_id` as fallback for webhook body, so that even if merchant_transaction_id is not present webhook can be processed
### Actual Behavior
Currently we are only consuming `merchant_transaction_id` from the webhook body, this was done to tackle the timeouts issue, but seems like Bluesnap doesn't always includes this id, so we need to add `connector_transaction_id` as fallback for webhook body
### 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: refactor(connector): [bluesnap] add connector_txn_id fallback for webhook
- Merged: 2024-01-10T14:48:20Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
add connector_txn_id fallback for webhook
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [bluesnap] add connector_txn_id fallback for webhook (#3315)
Files to modify:
**crates/router/src/connector/bluesnap.rs**
Modify existing code
|
{"issue_number": 3316, "pr_number": 3315, "commits_count": 1, "files_changed": 1, "response_length": 973, "file_count": 3, "needs_breakdown": false}
|
[Kafka] - Consolidate payment logs into a single topic for sessionizing
Consolidate intent, attempt, dispute, refund events into a single topic `hyperswitch-consolidated-events` for sessionizer to consume
#### Initial log structure
```json
{
"log": {
"merchant_id": "test",
"payment_id": "p1",
"attempt_id": "a1",
...
}
"log_type": "payment_attempt"
}
```
|
<think>
PR Context:
- Title: feat(consolidated-kafka-events): add consolidated kafka payment events
- Merged: 2024-06-03T09:30:52Z
- Files changed: 10 files
- Commits: 11 commits
Implementation approach:
## Description
- add consolidated payment events to a single topic for sessionizing
- add millisecond precision to timestamp fields
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/en
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(consolidated-kafka-events): add consolidated kafka payment events (#4798)
Co-authored-by: hyper
Files to modify:
**crates/router/src/events.rs**
Modify existing code
**crates/router/src/services/kafka.rs**
Add:
- function: private::new
- function: private::key
- function: private::event_type
- function: private::creation_timestamp
- struct: private::KafkaConsolidatedLog
- struct: private::KafkaConsolidatedEvent
- impl: impl KafkaConsolidatedEvent<'a, T>
- impl: impl KafkaMessage for KafkaConsolidatedEvent<'a, T>
- mod: private::dispute_event
- mod: private::payment_attempt_event
- mod: private::payment_intent_event
- mod: private::refund_event
**crates/router/src/services/kafka/dispute_event.rs**
Add:
- function: pub::from_storage
- function: private::key
- function: private::event_type
- struct: pub::KafkaDisputeEvent
- impl: impl KafkaDisputeEvent<'a>
- impl: impl super::KafkaMessage for KafkaDisputeEvent<'a>
**crates/router/src/services/kafka/payment_attempt_event.rs**
Add:
- function: pub::from_storage
- function: private::key
- function: private::event_type
- struct: pub::KafkaPaymentAttemptEvent
- impl: impl KafkaPaymentAttemptEvent<'a>
- impl: impl super::KafkaMessage for KafkaPaymentAttemptEvent<'a>
**crates/router/src/services/kafka/payment_intent_event.rs**
Add:
- function: pub::from_storage
- function: private::key
- function: private::event_type
- struct: pub::KafkaPaymentIntentEvent
- impl: impl KafkaPaymentIntentEvent<'a>
- impl: impl super::KafkaMessage for KafkaPaymentIntentEvent<'a>
**crates/router/src/services/kafka/refund_event.rs**
Add:
- function: pub::from_storage
- function: private::key
- function: private::event_type
- struct: pub::KafkaRefundEvent
- impl: impl KafkaRefundEvent<'a>
- impl: impl super::KafkaMessage for KafkaRefundEvent<'a>
|
{"issue_number": 4797, "pr_number": 4798, "commits_count": 1, "files_changed": 10, "response_length": 2766, "file_count": 8, "needs_breakdown": false}
|
[FEATURE]: [Payeezy] 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): [Payeezy] Use connector_response_reference_id as reference to merchant
- Merged: 2023-10-04T08:04:12Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add `connector_response_reference_id` support for Payeezy
- Used `transaction_id` as the reference id, while implementing this!
Resolves #2343 and resolves #2312.
### Additional Changes
- [ ] This PR modifies the API contract
- [
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Payeezy] Use connector_response_reference_id as reference to merchant (#2410)
Files to modify:
**crates/router/src/connector/payeezy/transformers.rs**
Modify existing code
|
{"issue_number": 2312, "pr_number": 2410, "commits_count": 1, "files_changed": 1, "response_length": 1013, "file_count": 3, "needs_breakdown": false}
|
Testability ddd repository
- Adding/updating the storage interface
- Using cargo features for diesel specific things
- Implement the storage interface for Sqlx
- Implement the mockdb interface for unit tests
- All tests passing
:heavy_check_mark: It was already merged on Bitbucket.
|
<think>
PR Context:
- Title: build(deps): bump `futures-locks` crate from 0.6 to 0.7.0
- Merged: 2022-12-05T07:35:40Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR updates the `futures-locks` crate from version `0.6` to `0.7.0`.
Fixes an instance of GHSA-fg7r-2g4j-5cgr raised as a Dependabot security alert against our repository.
It turns out that `tokio 0.2.25` was a dependency of `futures-locks 0.6` and thus the security
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 55, "pr_number": 59, "commits_count": 0, "files_changed": 2, "response_length": 787, "file_count": 0, "needs_breakdown": false}
|
[DOC] update cypress docs
current docs are pretty much outdated
|
<think>
PR Context:
- Title: docs(cypress): update file structure
- Merged: 2025-01-13T07:50:55Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR updates Cypress documentation to deal with recent file structure change.
- `cypress-tests` folder structure to reduce confusion and chaos in within `e2e` directory
- previous:
```sh
.
└── cypress
├── e2e
│
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6955, "pr_number": 7016, "commits_count": 0, "files_changed": 2, "response_length": 766, "file_count": 0, "needs_breakdown": false}
|
feat(router): Support `card` in `payment_method_subtype` [V2]
`payment_method_subtype` field needs to be made mandatory and `card` needs to be added as a supported enum variant.
This is needed for parity with industry standard analytics hierarchy
|
<think>
PR Context:
- Title: feat(router): Support `card` in `payment_method_subtype` [V2]
- Merged: 2025-04-08T10:20:11Z
- Files changed: 30 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- Made `payment_method_subtype` mandatory in API endpoints and `payment_attempt` table
- Added `card` as an enum variant to `payment_method_subtype`
### Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Support `card` in `payment_method_subtype` [V2] (#7662)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/common_enums/src/transformers.rs**
Modify existing code
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/diesel_models/src/types.rs**
Modify existing code
**crates/euclid/src/frontend/dir/enums.rs**
Modify existing code
**crates/euclid/src/frontend/dir/lowering.rs**
Modify existing code
**crates/euclid/src/frontend/dir/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/adyen.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/klarna.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/revenue_recovery.rs**
Modify existing code
**crates/kgraph_utils/src/mca.rs**
Modify existing code
**crates/kgraph_utils/src/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/revenue_recovery/types.rs**
Modify existing code
**crates/router/src/types/api/payment_methods.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 7661, "pr_number": 7662, "commits_count": 1, "files_changed": 30, "response_length": 2814, "file_count": 28, "needs_breakdown": true}
|
fix(user_roles): migrations for backfilling user_roles entity_id
Backfill entity_id with entity_type in user_roles table to avoid dashboard breaking
|
<think>
PR Context:
- Title: fix(user_roles): migrations for backfilling user_roles entity_id
- Merged: 2024-12-16T13:36:14Z
- Files changed: 4 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR ensures that the entity_id is backfilled in the user_roles table, preventing issues for V1 users when switching organizations and logging in.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6843, "pr_number": 6847, "commits_count": 0, "files_changed": 4, "response_length": 794, "file_count": 0, "needs_breakdown": false}
|
Support Default Payment Method for customer
Add support for having a default payment method option for a customer. This can be used to increase conversion rates by using the preferred saved payment method for payments, reducing the friction.
Solution:
- Customers table to have a column for 'default_payment_method'
- API to set and retrieve the default PM for a customer
- If default has not been set, use the `last_used` PM as the default
- Customer Payment Method List to indicate the default PM
|
<think>
PR Context:
- Title: fix(connector): [BOA, Cybersource] capture error_code
- Merged: 2024-01-09T07:15:42Z
- Files changed: 3 files
- Commits: 20 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Resolves [#3739](https://github.com/juspay/hyperswitch-cloud/issues/3739)
## 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 screen
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [BOA, Cybersource] capture error_code (#3239)
Co-authored-by: Sahkal Poddar <sahkal.
Files to modify:
**crates/router/src/connector/bankofamerica/transformers.rs**
Remove:
- function: private::is_payment_failure
Add:
- function: private::from
- impl: impl From<(&Option<BankOfAmericaErrorInformation>, u16, String)> for types::ErrorResponse
**crates/router/src/connector/cybersource/transformers.rs**
Remove:
- function: private::is_payment_failure
Add:
- function: private::from
- impl: impl From<(&Option<CybersourceErrorInformation>, u16, String)> for types::ErrorResponse
**crates/router/src/connector/utils.rs**
Add:
- function: pub::is_payment_failure
- function: pub::is_refund_failure
|
{"issue_number": 3739, "pr_number": 3239, "commits_count": 1, "files_changed": 3, "response_length": 1541, "file_count": 5, "needs_breakdown": false}
|
Deep health check for outgoing request
|
<think>
PR Context:
- Title: feat: add healthcheck for outgoing request
- Merged: 2024-02-01T11:58:11Z
- Files changed: 5 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Closes #3518. Add healthcheck for outgoing calls
## 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 documentati
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add healthcheck for outgoing request (#3519)
Co-authored-by: hyperswitch-bot[bot] <148525504+h
Files to modify:
**crates/api_models/src/health_check.rs**
Modify existing code
**crates/router/src/consts.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Add:
- enum: pub::HealthCheckOutGoing
**crates/router/src/core/health_check.rs**
Add:
- function: private::health_check_outgoing
**crates/router/src/routes/health.rs**
Modify existing code
|
{"issue_number": 3518, "pr_number": 3519, "commits_count": 1, "files_changed": 5, "response_length": 1258, "file_count": 7, "needs_breakdown": false}
|
[BUG] [NOON] 3ds payment have `next_action` as `null`
3ds card payments in noon connector receive `next_action` as `null`.
this can be resolved by unifying both the responses (paypal and card) into one and use it else where.
|
<think>
PR Context:
- Title: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
- Merged: 2025-04-21T08:20:04Z
- Files changed: 2 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
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 t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#7832)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Remove:
- 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": 7831, "pr_number": 7832, "commits_count": 1, "files_changed": 2, "response_length": 1386, "file_count": 4, "needs_breakdown": false}
|
feat: List payment method API access needs to be enabled using client secret for SDK calls
### Description
Need to enable access for list payment methods API using client secret for SDK calls. This will help SDK show only those payment methods that are enabled by the merchant on their dashboard.
We would also need to filter the payment methods by applying the minimum/maximum amount, accepted_countries, accepted_currencies and recurring_payment_enabled conditions that the merchant has set for each of the payment methods
### Changes
a) List payment method API needs to take client secret and return a list of eligible payment methods for that payment
b) Using the client_secret, fetch the payment id and the relevant payment details (amount, currency, billing_country, mandate data) so that the above conditions can be checked for each payment methods enabled by the merchant and thereafter filter them
|
<think>
PR Context:
- Title: feat: Filter payment methods based on payment
- Merged: 2023-01-11T10:57:11Z
- Files changed: 6 files
- Commits: 9 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Filter payment methods based on the current payment that's happening to only show relevant payment methods. More details in #323
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: Filter payment methods based on payment (#331)
Files to modify:
**crates/api_models/src/payment_methods.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/routes/app.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Add:
- function: private::from
- impl: impl From<F<storage_enums::Currency>> for F<api_enums::Currency>
|
{"issue_number": 323, "pr_number": 331, "commits_count": 1, "files_changed": 6, "response_length": 1355, "file_count": 8, "needs_breakdown": false}
|
ci(cypress): fix `archipel` cypress test cases
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
Enhancements for `archipel` Cypress Tests.
### 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).
-->
`archipel` Cypress Tests were failing.
## 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="720" alt="image" src="https://github.com/user-attachments/assets/23559711-59e2-41d7-8fb4-1572e524fc49" /-->
<img width="726" height="962" alt="image" src="https://github.com/user-attachments/assets/ee72bc01-69a1-4afb-ac76-8c3edec1c124" />
_PS: There is an issue with Incremental Auth, not anything related to the configs, but the spec itself, addressing it in another PR because that would affect 1 other connector as well, and after it is fixed, it would affect 3 connectors in total._
## 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(cypress): update skip logic and test flow for cypress incremental auth tests
- Merged: 2025-07-11T02:04:29Z
- Files changed: 4 files
- Commits: 11 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR introduces a set of improvements and refactors in the Cypress test suite specifically for **Incremental Authorization** test cases.
---
### ✅ Key Changes:
1. **Connector Inclusion List for Incremental Auth**
* Introduc
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8189, "pr_number": 8594, "commits_count": 0, "files_changed": 4, "response_length": 816, "file_count": 2, "needs_breakdown": false}
|
[FEATURE]: add `offset` field to mandates list
### Feature Description
The [mandates list](https://github.com/juspay/hyperswitch/blob/54c0b218d9f20c6388dde0f30ea525011cdad573/crates/router/src/routes/mandates.rs#L114) endpoint currently has no field to specify `offset`, which would skip certain number of entries from the start. This is necessary in order to provide pagination support.
### Possible Implementation
accept a field called `offset` which specifies the number of items to skip from the start.
This would be similar to the `payments_list` pagination. Refer [here](https://github.com/juspay/hyperswitch/blob/54c0b218d9f20c6388dde0f30ea525011cdad573/crates/router/src/routes/payments.rs#L868)
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
None
|
<think>
PR Context:
- Title: feat(router): add offset in mandate list route
- Merged: 2024-03-19T07:56:00Z
- Files changed: 4 files
- Commits: 11 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add offset to mandate list endpoint.
Closes #3748
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): add offset in mandate list route (#3923)
Files to modify:
**crates/api_models/src/mandates.rs**
Modify existing code
**crates/router/src/db/mandate.rs**
Modify existing code
**crates/router/src/routes/mandates.rs**
Modify existing code
**crates/router/src/types/storage/mandate.rs**
Modify existing code
|
{"issue_number": 3748, "pr_number": 3923, "commits_count": 1, "files_changed": 4, "response_length": 1110, "file_count": 6, "needs_breakdown": false}
|
ci: add reusable workflow to create nightly tags in CalVer format
## 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 adds a new reusable workflow to create tags in the calendar versioning (CalVer) format `YYYY.0M.0D.MICRO` (month and date are zero-padded, and the `MICRO` version number starts from zero) instead of the existing `release-new-version` workflow to create SemVer tags. The workflow uses a GitHub app token and GitHub API calls to commit the changes and tag them in order to have verified commits and tags.
The reusable workflow can be used like so (provided the secrets have been set up):
```yaml
jobs:
create-nightly-tag:
name: Create a nightly tag
uses: juspay/hyperswitch/.github/workflows/release-nightly-version-reusable.yml@main # Or ...@<commit_sha>
secrets:
app_id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
app_private_key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}
```
Refer to [the docs](https://docs.github.com/en/actions/using-workflows/reusing-workflows) for more information.
### Prerequisites for using the reusable workflow
1. The first CalVer tag must be tagged manually (by some user), the workflow does not handle that case.
2. The workflow needs a `git-cliff` configuration file located at `.github/git-cliff-changelog.toml`.
## 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).
-->
We will be using CalVer tags for daily tags, which will be used internally for testing, and SemVer tags for stable releases which are meant to be used by end users.
## 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 temporarily updated the workflow file to run on this branch, the commits in this PR include the commits pushed by the bot. Note that the commits created by the bot are also signed.
One of the action runs: https://github.com/juspay/hyperswitch/actions/runs/7401505144
As a proof of the tag that was created by the bot, I'm including a screenshot of the tag that was pushed (which was since deleted). Note that the tag created is also signed.

The `2024.01.03-test-tag` had to be created manually by me because the workflow does not handle that case.
## 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
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: ci: add workflow to create stable SemVer tag for a given CalVer tag
- Merged: 2024-01-09T08:14:26Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds a new workflow to attach a SemVer tag to a selected CalVer tag, thus creating a "stable" release intended for end users and deploying on production environments. The workflow also attaches the changelog since the previous SemVer t
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 3247, "pr_number": 3285, "commits_count": 0, "files_changed": 1, "response_length": 797, "file_count": 0, "needs_breakdown": false}
|
[REFACTOR] : [Forte] 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): [Forte] change error message from not supported to not implemented
- Merged: 2023-12-17T17:51:59Z
- Files changed: 1 files
- Commits: 3 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Forte] change error message from not supported to not implemented (#2847)
Files to modify:
**crates/router/src/connector/forte/transformers.rs**
Modify existing code
|
{"issue_number": 2840, "pr_number": 2847, "commits_count": 1, "files_changed": 1, "response_length": 1011, "file_count": 3, "needs_breakdown": false}
|
feat: Role information in list merchants API
- HCC FE is building a profile feature where they want to show all the merchants where the current user is part of.
- This also includes the role they were assigned in each merchant account.
- We have an API which lists merchant accounts but it doesn't send role they were assigned.
- So, we can change that API to also send the roles.
|
<think>
PR Context:
- Title: feat(users): Add role specific fields for list merchants API
- Merged: 2024-04-10T10:43:24Z
- Files changed: 7 files
- Commits: 7 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- This PR adds `role_id`, `role_name`, `org_id` fields in list merchants for user API.
- New route `/user/merchants/list` which points to the same function as `/user/switch/list`.
### Additional Changes
- [x] This PR modifies the API cont
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): Add role specific fields for list merchants API (#4326)
Co-authored-by: hyperswitch-bot
Files to modify:
**crates/api_models/src/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/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::get_multiple_role_info_for_user_roles
|
{"issue_number": 4325, "pr_number": 4326, "commits_count": 1, "files_changed": 7, "response_length": 1384, "file_count": 9, "needs_breakdown": false}
|
refactor(pm_list): Update required fields for a payment method
## 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 -->
Refactored required fields for a payment method and removed fields not collected by sdk such as description, browser info.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: revert: refactor(pm_list): Update required fields for a payment method
- Merged: 2023-07-17T08:09:19Z
- Files changed: 3 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#1720
Reason - Solution seemed unnecessary after discussion.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert: refactor(pm_list): Update required fields for a payment method (#1724)
Co-authored-by: Tinu
Files to modify:
**crates/api_models/src/enums.rs**
Modify existing code
**crates/router/src/configs/defaults.rs**
Modify existing code
|
{"issue_number": 1720, "pr_number": 1724, "commits_count": 1, "files_changed": 3, "response_length": 635, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] [CONNECTOR] Payload
Integrate a new connector Payload.
Developer Docs: https://docs.payload.com
Login Dashboard: https://app.payload.com
|
<think>
PR Context:
- Title: feat(connector): [payload] introduce no-3ds cards
- Merged: 2025-07-05T15:10:04Z
- Files changed: 14 files
- Commits: 15 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR introduces the below given flows for Payload connector:
- [x] Cards (No 3DS)
- [x] PSync
- [x] Void
- [x] Refunds
- [x] AVS Checks
- [x] Cypress
Connector does not support 3DS transactions.
### Additional Changes
- [
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [payload] introduce no-3ds cards (#8545)
Files to modify:
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payload.rs**
Remove:
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Payload
Add:
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Payload
- mod: private::requests
- mod: private::responses
**crates/hyperswitch_connectors/src/connectors/payload/requests.rs**
Add:
- struct: pub::BillingAddress
- struct: pub::PayloadCardsRequestData
- struct: pub::PayloadCard
- struct: pub::PayloadCancelRequest
- struct: pub::PayloadCaptureRequest
- struct: pub::PayloadRefundRequest
- enum: pub::PayloadPaymentsRequest
- enum: pub::TransactionTypes
**crates/hyperswitch_connectors/src/connectors/payload/responses.rs**
Add:
- struct: pub::PayloadCardsResponseData
- struct: pub::PayloadCardResponse
- struct: pub::RefundsLedger
- struct: pub::PayloadRefundResponse
- struct: pub::PayloadErrorResponse
- enum: pub::PayloadPaymentStatus
- enum: pub::PayloadPaymentsResponse
- enum: pub::AvsResponse
- enum: pub::RefundStatus
**crates/hyperswitch_connectors/src/connectors/payload/transformers.rs**
Remove:
- struct: pub::PayloadPaymentsRequest
- struct: pub::PayloadCard
- struct: pub::PayloadPaymentsResponse
- struct: pub::RefundResponse
- struct: pub::PayloadErrorResponse
- enum: pub::PayloadPaymentStatus
Add:
- function: private::from
- function: private::from
- function: private::try_from
- impl: impl From<(StringMajorUnit, T)> for PayloadRouterData<T>
- impl: impl From<responses::PayloadPaymentStatus> for common_enums::AttemptStatus
**crates/payment_methods/src/configs/payment_connector_required_fields.rs**
Modify existing code
**crates/router/src/core/connector_validation.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 8527, "pr_number": 8545, "commits_count": 1, "files_changed": 14, "response_length": 3275, "file_count": 12, "needs_breakdown": false}
|
refactor(storage): Add a separate crate to represent store implementations
## 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 -->
- Adding a crate to split out implementation concerns for database
### 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).
-->
- Splitting out storage implementation concerns would lead to somewhat abstracted code
- Faster compilation/ analyzer since diesel dependencies are no longer needed each time
- Ability to rely on multiple storage implementations
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
- running it locally, Although it does not need much testing beyond compilation
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: refactor(storage_impl): Integrate the composite store from external crate
- Merged: 2023-08-14T13:24:42Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- move `RedisConnInterface` to storage impl
- move 'PubSubInterface` to storage impl
- move 'KvStorePartition` impls to storage impl as the cases are gonna be used there as well
- use the above interfaces throughout router crate & add imple
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(storage_impl): Integrate the composite store from external crate (#1921)
Files to modify:
**crates/cards/src/lib.rs**
Modify existing code
**crates/router/src/connection.rs**
Modify existing code
**crates/router/src/connector/cashtocode.rs**
Modify existing code
**crates/router/src/connector/tsys.rs**
Modify existing code
**crates/router/src/core/cache.rs**
Modify existing code
**crates/router/src/core/files/helpers.rs**
Modify existing code
**crates/router/src/core/payment_methods/vault.rs**
Modify existing code
**crates/router/src/core/payouts.rs**
Modify existing code
**crates/router/src/core/payouts/validator.rs**
Modify existing code
**crates/router/src/db.rs**
Add:
- impl: impl RedisConnInterface for MockDb
**crates/router/src/db/api_keys.rs**
Modify existing code
**crates/router/src/db/cache.rs**
Modify existing code
**crates/router/src/db/configs.rs**
Modify existing code
**crates/router/src/db/ephemeral_key.rs**
Modify existing code
**crates/router/src/db/merchant_account.rs**
Modify existing code
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/router/src/db/merchant_key_store.rs**
Modify existing code
**crates/router/src/db/payment_attempt.rs**
Modify existing code
**crates/router/src/db/payment_intent.rs**
Modify existing code
**crates/router/src/db/queue.rs**
Modify existing code
**crates/router/src/db/refund.rs**
Modify existing code
**crates/router/src/lib.rs**
Remove:
- mod: pub::cache
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/services.rs**
Remove:
- function: private::subscribe
- function: private::publish
- function: private::on_message
- function: private::get_redis_conn
- function: pub::new
- function: pub::get_drainer_stream_name
- function: pub::redis_conn
- function: pub::push_to_drainer_stream
- struct: pub::Store
- struct: pub::StoreConfig
- trait: pub::PubSubInterface
- trait: pub::RedisConnInterface
- impl: impl PubSubInterface for redis_interface::RedisConnectionPool
- impl: impl RedisConnInterface for Store
**crates/router/src/types/storage/payment_attempt.rs**
Remove:
- impl: impl crate::utils::storage_partitioning::KvStorePartition for PaymentAttempt
**crates/router/src/types/storage/payment_intent.rs**
Remove:
- impl: impl crate::utils::storage_partitioning::KvStorePartition for PaymentIntent
**crates/router/src/types/storage/refund.rs**
Remove:
- impl: impl crate::utils::storage_partitioning::KvStorePartition for Refund
**crates/router/src/utils/storage_partitioning.rs**
Remove:
- function: private::partition_number
- function: private::shard_key
- function: private::fmt
- enum: pub::PartitionKey
- trait: pub::KvStorePartition
- impl: impl std::fmt::Display for PartitionKey<'a>
**crates/router/tests/cache.rs**
Modify existing code
**crates/router/tests/connectors/payeezy.rs**
Modify existing code
**crates/router_derive/src/macros/diesel.rs**
Modify existing code
**crates/storage_impl/src/lib.rs**
Remove:
- mod: pub::diesel
Add:
- function: private::new
- function: private::get_master_pool
- function: private::get_replica_pool
- function: private::get_redis_conn
- function: pub::from_config
- function: private::new
- function: private::get_master_pool
- function: private::get_replica_pool
- function: private::get_redis_conn
- function: pub::master_key
- impl: impl DatabaseStore for RouterStore<T>
- impl: impl RedisConnInterface for RouterStore<T>
- impl: impl DatabaseStore for KVRouterStore<T>
- impl: impl RedisConnInterface for KVRouterStore<T>
- mod: pub::database
- mod: pub::payments
- mod: pub::refund
**crates/storage_impl/src/payments.rs**
Add:
- impl: impl KvStorePartition for PaymentIntent
- impl: impl KvStorePartition for PaymentAttempt
**crates/storage_impl/src/redis.rs**
Add:
- struct: pub::RedisStore
- mod: pub::cache
- mod: pub::pub_sub
**crates/storage_impl/src/redis/kv_store.rs**
Add:
- enum: pub::PartitionKey
- trait: pub::KvStorePartition
**crates/storage_impl/src/redis/pub_sub.rs**
Add:
- function: private::subscribe
- function: private::publish
- function: private::on_message
- trait: pub::PubSubInterface
- impl: impl PubSubInterface for redis_interface::RedisConnectionPool
**crates/storage_impl/src/refund.rs**
Add:
- impl: impl KvStorePartition for Refund
|
{"issue_number": 1853, "pr_number": 1921, "commits_count": 1, "files_changed": 30, "response_length": 5408, "file_count": 39, "needs_breakdown": true}
|
fix(connector): [Cryptopay]fix redirection for cryptopay
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
add validation for metadata for cryptopay. This method will return None if metadata is not of type Object. Since connector accepts only Object.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Test cases - Make a payment with metadata - null, bool, and object
expected behavior - Payment should be successful
payment request -
```
{
"amount": 100,
"currency": "EUR",
"confirm": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "crypto",
"payment_method_type": "crypto_currency",
"payment_method_data": {
"crypto": {
"pay_currency": "XRP"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AF",
"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"
}
}
```
metadata is not passed to connector if it is empty, Null, bool

metadata is passed to connector when it is of type 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 the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: fix(connector): [Cryptopay]fix redirection for cryptopay
- Merged: 2024-04-03T06:18:37Z
- Files changed: 2 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
add validation for metadata for cryptopay. This method will return None if metadata is not of type Object. Since connector accepts only Object.
OSS PR - #4272
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [Cryptopay]fix redirection for cryptopay (#4279)
Co-authored-by: hyperswitch-bot[bot
Files to modify:
**crates/router/src/connector/cryptopay/transformers.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Add:
- function: private::get_metadata_as_object
|
{"issue_number": 4272, "pr_number": 4279, "commits_count": 1, "files_changed": 2, "response_length": 1086, "file_count": 4, "needs_breakdown": false}
|
[BUG] : [Square] Card payments fail with Bad Request
### Bug Description
Square payments fail with an invalid request error as shown below.
This error happens in Tokenization flow of square
`SquareErrorResponse { errors: [SquareErrorDetails { category: Some("INVALID_REQUEST_ERROR"), code: Some("BAD_REQUEST"), detail: Some("Bad request.`
### Expected Behavior
The payment request must be accepted by square
### Actual Behavior
The payment request is rejected by square
### 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 '....'
1. Make a card payment with square
### 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?
None
|
<think>
PR Context:
- Title: refactor(connector): [Prophetpay][Rapyd][Shift4][Square] Mask PII data
- Merged: 2024-03-18T06:53:09Z
- Files changed: 4 files
- Commits: 6 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Mask pii information passed and received in the connector request and response for Prophetpay, rapyd, shift4 and square.
## Test Case
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this chan
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [Prophetpay][Rapyd][Shift4][Square] Mask PII data (#3930)
Files to modify:
**crates/router/src/connector/prophetpay/transformers.rs**
Modify existing code
**crates/router/src/connector/rapyd/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
|
{"issue_number": 3974, "pr_number": 3930, "commits_count": 1, "files_changed": 4, "response_length": 1221, "file_count": 6, "needs_breakdown": false}
|
feat(single_use): add extra fields in `Mandate` table and `MandateData` [Blocked on #61]
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
This PR adds single use mandate support and a 2 new fields to the mandate table (i.e. singe_use_amount, single_use_currency)
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
The change includes the following files.
- migrations/2022-12-05-090521_single_use_mandate_fields/up.sql
- migrations/2022-12-05-090521_single_use_mandate_fields/down.sql
## Motivation and Context
Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to.
1. Create new types for the change #45
2. Introduce the Flow and Connector Integration #47
3. Add Stripe POC #50
4. Introduce the new operation and all the related components in the payments core #53 + #61
5. Changing the `MandateData` type
6. Move the mandate related behaviour to domain
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: refactor(payout_link): update fonts and UI for payout link
- Merged: 2024-08-29T07:28:21Z
- Files changed: 8 files
- Commits: 5 commits
Implementation approach:
(cherry picked from commit f6ca667f1da972ab3f522cf674d22fb4fcf0ca38)
## Description
This PR improves UI by using default fonts, hiding scrollbars and making logos consistent.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ]
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(payout_link): update fonts and UI for payout link (#5678)
Co-authored-by: hyperswitch-bot[b
Files to modify:
**crates/router/src/services/api/generic_link_response/context.rs**
Modify existing code
|
{"issue_number": 66, "pr_number": 5678, "commits_count": 1, "files_changed": 8, "response_length": 1001, "file_count": 3, "needs_breakdown": false}
|
[FEATURE] feat(router): verify service for applepay merchant registration v2
### Feature Description
verify service for applepay merchant registration in v2
### Possible Implementation
Add POST /v2/verify/apple-pay/{merchant_id} endpoint for verify domains with Apple
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(router): verify service for applepay merchant registration v2
- Merged: 2025-08-22T13:36:37Z
- Files changed: 5 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add Apple Pay merchant registration and verified domains retrieval for v2
### Additional Changes
- [X] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/enviro
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): verify service for applepay merchant registration v2 (#8999)
Files to modify:
**crates/router/src/core/verification.rs**
Modify existing code
**crates/router/src/core/verification/utils.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- impl: impl Verify
**crates/router/src/routes/verification.rs**
Add:
- function: pub::apple_pay_merchant_registration
|
{"issue_number": 8998, "pr_number": 8999, "commits_count": 1, "files_changed": 5, "response_length": 1286, "file_count": 7, "needs_breakdown": false}
|
fix(router): allow setup future usage to be updated in payment update and confirm requests
## 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 -->
Allow the `setup_future_usage` associated with the payment intent to be updated in Payment Update and Confirm APIs.
### Additional Changes
None
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## 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)?
-->
Local, compiler-guided, stripe payments.
## 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(router): allow setup future usage to be updated in payment update and confirm requests (#610)
- Merged: 2023-02-25T12:09:17Z
- Files changed: 3 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
#610
### Additional Changes
None
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 610, "pr_number": 638, "commits_count": 0, "files_changed": 3, "response_length": 827, "file_count": 0, "needs_breakdown": false}
|
[CI] Update NMI postman collection
Existing NMI postman collection is outdated and needs to be updated to the latest one look after regressions
|
<think>
PR Context:
- Title: ci(postman): refactor NMI postman collection
- Merged: 2024-02-27T11:18:31Z
- Files changed: 30 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR aims at refactoring NMI collection by bringing it back to life. Added more flows to look after regressions.
Closes #3734
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schem
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 3734, "pr_number": 3805, "commits_count": 0, "files_changed": 30, "response_length": 775, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] unix timestamp to primitive date time
### Feature Description
add a deserialization logic to convert unix timestamp to primitive date time so that there will no need to timestamp conversion in connectors
### Possible Implementation
need to implement a new trait which has implementations of converting unix timestamp to required date time format
### 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): add dispute webhooks for Stripe
- Merged: 2023-05-03T02:22:00Z
- Files changed: 14 files
- Commits: 14 commits
Implementation approach:
## Description
Implemented Dispute Webhooks for Stripe
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): add dispute webhooks for Stripe (#918)
Files to modify:
**crates/api_models/src/disputes.rs**
Modify existing code
**crates/api_models/src/enums.rs**
Modify existing code
**crates/common_utils/src/custom_serde.rs**
Add:
- function: pub::serialize
- function: pub::deserialize
- function: pub::serialize
- function: pub::deserialize
- mod: pub::timestamp
- mod: pub::option
**crates/router/src/connector/adyen.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Modify existing code
**crates/router/src/connector/checkout.rs**
Modify existing code
**crates/router/src/connector/checkout/transformers.rs**
Modify existing code
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Remove:
- struct: pub::StripeWebhookDataObjectId
Add:
- function: private::try_from
- struct: pub::WebhookEventDataResource
- struct: pub::EvidenceDetails
- enum: pub::WebhookEventObjectType
- enum: pub::WebhookEventStatus
- impl: impl TryFrom<WebhookEventStatus> for api_models::webhooks::IncomingWebhookEvent
**crates/router/src/types/api/disputes.rs**
Modify existing code
**crates/storage_models/src/dispute.rs**
Modify existing code
**crates/storage_models/src/schema.rs**
Modify existing code
|
{"issue_number": 967, "pr_number": 918, "commits_count": 1, "files_changed": 14, "response_length": 2160, "file_count": 14, "needs_breakdown": false}
|
[FEATURE] Validate card security codes and expiration month/year
### Feature Description
As of now, we don't perform any validations on card security codes (CVC/CVV/CID code) and card expiration month and year. It'd be great if the following validations can be done:
1. Card security code must be 3 or 4 digits only
2. Expiration month is valid (1-12)
3. Expiration year is a 4 digit number only
4. Card has not expired (expiration month and year correspond to a date in the future)
This logic can reside in a new crate called `cards`. Please also include unit tests in your PR.
_For external contributors, clarify any questions you may have, and let us know that you're interested in picking this up. We'll assign this issue to you to reduce duplication of effort on the same task._
### Possible Implementation
For card security codes, you could do:
```rust
use masking::StrongSecret;
struct CardSecurityCode(StrongSecret<u16>);
let card_security_code = CardSecurityCode::try_from(123); // You can use the `TryFrom` trait for this purpose
struct CardExpirationMonth(StrongSecret<u8>);
let card_expiration_month = CardExpirationMonth::try_from(1); // You can use the `TryFrom` trait for this purpose
impl CardExpirationMonth {
fn inner(&self) -> u8;
fn two_digits(&self) -> String;
}
struct CardExpirationYear(StrongSecret<u16>);
let card_expiration_year = CardExpirationYear::try_from(2038); // You can use the `TryFrom` trait for this purpose
impl CardExpirationYear {
fn inner(&self) -> u16;
fn four_digits(&self) -> String;
fn two_digits(&self) -> String;
}
struct CardExpiration {
pub month: CardExpirationMonth,
pub year: CardExpirationYear,
}
impl CardExpiration {
fn is_expired(&self) -> bool;
}
```
You can implement `Serialize` and `Deserialize` traits on `CardSecurityCode`. Use the 2-digit and 4-digit representations for the month and year, respectively, for the `Serialize` and `Deserialize` implementations of the card expiry month and year. You can implement any more methods as necessary.
### 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(cards): validate card security code and expiration
- Merged: 2023-05-03T01:54:31Z
- Files changed: 5 files
- Commits: 11 commits
Implementation approach:
## Description
Add basic validations for card security codes (CVC/CVV/CID code) and card expiration month and year. This logic resides in a new crate called cards. Validations included (as of now):
- [x] Card security code must be 3 or 4 digits only
- [x] Expiration month is valid (1-12)
- [x] Expiration year is a 4 digit numb
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(cards): validate card security code and expiration (#874)
Co-authored-by: Sanchith Hegde <22217
Files to modify:
**crates/cards/src/lib.rs**
Add:
- function: private::try_from
- function: private::deserialize
- function: pub::two_digits
- function: private::try_from
- function: private::deserialize
- function: pub::four_digits
- function: pub::two_digits
- function: private::try_from
- function: private::deserialize
- function: pub::is_expired
- function: pub::get_month
- function: pub::get_year
- function: private::try_from
- function: private::deref
- function: private::deref
- function: private::deref
- struct: pub::CardSecurityCode
- struct: pub::CardExpirationMonth
- struct: pub::CardExpirationYear
- struct: pub::CardExpiration
- impl: impl TryFrom<u16> for CardSecurityCode
- impl: impl Deserialize<'de> for CardSecurityCode
- impl: impl CardExpirationMonth
- impl: impl TryFrom<u8> for CardExpirationMonth
- impl: impl Deserialize<'de> for CardExpirationMonth
- impl: impl CardExpirationYear
- impl: impl TryFrom<u16> for CardExpirationYear
- impl: impl Deserialize<'de> for CardExpirationYear
- impl: impl CardExpiration
- impl: impl TryFrom<(u8, u16)> for CardExpiration
- impl: impl Deref for CardSecurityCode
- impl: impl Deref for CardExpirationMonth
- impl: impl Deref for CardExpirationYear
**crates/cards/tests/basic.rs**
Add:
- function: private::test_card_security_code
- function: private::test_card_expiration_month
- function: private::test_card_expiration_year
- function: private::test_card_expiration
**crates/masking/src/serde.rs**
Add:
- impl: impl SerializableSecret for u8
- impl: impl SerializableSecret for u16
|
{"issue_number": 607, "pr_number": 874, "commits_count": 1, "files_changed": 5, "response_length": 2609, "file_count": 5, "needs_breakdown": false}
|
[BUG] Fix typo in `integration_test.toml`
`krungsri_bank` it is.
|
<think>
PR Context:
- Title: chore(env): revert typo in integ env
- Merged: 2024-06-12T08:04:26Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR reverts typo introduced in https://github.com/juspay/hyperswitch/pull/4398 in `integration_test.toml` that resulted in deployments to fail.
Resolves #4957
### Additional Changes
- [ ] This PR modifies the API contract
- [ ]
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 4957, "pr_number": 4958, "commits_count": 0, "files_changed": 1, "response_length": 766, "file_count": 0, "needs_breakdown": false}
|
feat: integrate Basilisk locker for storing sensitive data
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
We need to remove the temp card from the code and have another PCI compliance service to store sensitive information like card details
### Additional Changes
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/environment variables
<!--
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?
Manual testing with local setup
On SBX : In /payment call and /payment_method list call, you call basilisk tokenize api to store temporary card detail and you get a lookup_key aka payment_token and you can get the card detail anytime by calling the detokenize api
You get a db entry in basilisk db
In Local : we use mock_db (also used for save card ) to store card detail, so to monitor you will get 2 entry in locker_mock_up table, one for temp card storage and other for save card call and if its not a save card just one
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [x] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(router): Better UI payment link and order details product image and merchant config support
- Merged: 2023-10-17T09:18:52Z
- Files changed: 19 files
- Commits: 30 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Added better UI with animation in payment link along with orderDetails to support product_img_link param.
It also adds, new params in merchant Account to configure payment link styles
### Additional Changes
- [x] This PR modifies the A
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Better UI payment link and order details product image and merchant config support (#2
Files to modify:
**crates/api_models/src/admin.rs**
Add:
- struct: pub::PaymentLinkConfig
- struct: pub::PaymentLinkColorSchema
**crates/api_models/src/payments.rs**
Add:
- struct: pub::PaymentLinkDetails
**crates/diesel_models/src/merchant_account.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/payment_link.rs**
Add:
- function: private::validate_sdk_requirements
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/types/api/admin.rs**
Modify existing code
**crates/router/src/types/domain/merchant_account.rs**
Modify existing code
**crates/router/tests/connectors/payme.rs**
Modify existing code
**crates/router/tests/connectors/zen.rs**
Modify existing code
|
{"issue_number": 34, "pr_number": 2583, "commits_count": 1, "files_changed": 19, "response_length": 2086, "file_count": 17, "needs_breakdown": true}
|
Add checks around Cypress mandates payments
Just verifying the payment method status isn't enough. We also need to verify the existence of connector mandate id. this can be done by updating the `mitusingpmid` command.
|
<think>
PR Context:
- Title: ci(cypress): verify mandate id to be `null` if payment id not `succeeded`
- Merged: 2025-04-16T10:47:24Z
- Files changed: 2 files
- Commits: 8 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR adds a check to verify if the `payment_status` is not any of `succeeded`, `partially_captured` or `requires_capture` and if so, then the `connector_mandate_id` should be `null`.
### Additional Changes
- [ ] This PR modifies the
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7748, "pr_number": 7749, "commits_count": 0, "files_changed": 2, "response_length": 803, "file_count": 0, "needs_breakdown": false}
|
[FEATURE]: [Nexi Nets] 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(nexinets): Use connector_request_reference_id as reference to the connector - Work In Progress
- Merged: 2023-10-13T05:31:23Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
For all payment methods, Hyperswitch should transmit a reference to the connector, enabling merchants to subsequently locate the payment within the connector dashboard.
In this PR, such reference is obtained by calling `connector_request_reference_id()` in `RouterData`. The result is then passed as the "merchantOrderId" param
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(nexinets): Use connector_request_reference_id as reference to the connector - Work In Progress
Files to modify:
**crates/router/src/connector/nexinets/transformers.rs**
Modify existing code
|
{"issue_number": 2307, "pr_number": 2515, "commits_count": 1, "files_changed": 1, "response_length": 1032, "file_count": 3, "needs_breakdown": false}
|
Missing next steps after deployment setup on Readme
Next steps after deployment setup on Readme are missing
|
<think>
PR Context:
- Title: docs: Updated next steps after deployment setup on Readme
- Merged: 2025-04-03T03:28:38Z
- Files changed: 1 files
- Commits: 4 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Updated next steps after deployment setup on Readme
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7685, "pr_number": 7686, "commits_count": 0, "files_changed": 1, "response_length": 787, "file_count": 0, "needs_breakdown": false}
|
[BUG] [NOON] 3ds payment have `next_action` as `null`
3ds card payments in noon connector receive `next_action` as `null`.
this can be resolved by unifying both the responses (paypal and card) into one and use it else where.
|
<think>
PR Context:
- Title: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
- Merged: 2025-04-21T11:05:17Z
- Files changed: 21 files
- Commits: 2 commits
Implementation approach:
## 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 overrid
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#7856)
Co-au
Files to modify:
**crates/common_utils/src/types.rs**
Modify existing code
**crates/common_utils/src/validation.rs**
Modify existing code
**crates/euclid/src/backend/vir_interpreter.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bluesnap.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/forte/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Remove:
- function: private::try_from
- struct: pub::NoonPaypalResponse
- struct: pub::NoonPaypalResponseResult
- impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
**crates/hyperswitch_connectors/src/connectors/paypal.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/square/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/volt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zen/transformers.rs**
Modify existing code
**crates/router/src/connector/netcetera/netcetera_types.rs**
Modify existing code
**crates/router/src/connector/netcetera/transformers.rs**
Modify existing code
**crates/router/src/core/errors/utils.rs**
Modify existing code
**crates/router/src/events/audit_events.rs**
Modify existing code
**crates/router/tests/connectors/cashtocode.rs**
Modify existing code
|
{"issue_number": 7831, "pr_number": 7856, "commits_count": 1, "files_changed": 21, "response_length": 2940, "file_count": 23, "needs_breakdown": true}
|
[FEATURE]: Add support for Webhooks through UCS
### Feature Description
the Webhooks should go to Unified connector service and should be handled there
### Possible Implementation
add webhook integration in hyperswitch
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(core): Adding integration for webhooks through UCS
- Merged: 2025-08-08T14:35:40Z
- Files changed: 5 files
- Commits: 20 commits
Implementation approach:
## Description
Added webhooks integration support in hyperswitch so that for webhooks hyperswitch can call UCS and get the response.
Closes #8880
### 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(core): Adding integration for webhooks through UCS (#8814)
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_webhook_details
**crates/router/src/core/unified_connector_service.rs**
Remove:
- mod: private::transformers
Add:
- function: pub::should_call_unified_connector_service_for_webhooks
- function: pub::build_webhook_secrets_from_merchant_connector_account
- function: pub::call_unified_connector_service_for_webhook
- function: pub::extract_webhook_content_from_ucs_response
- mod: pub::transformers
**crates/router/src/core/unified_connector_service/transformers.rs**
Add:
- function: private::foreign_try_from
- function: pub::transform_ucs_webhook_response
- function: pub::build_webhook_transform_request
- struct: pub::WebhookTransformData
- impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails
**crates/router/src/core/webhooks/incoming.rs**
Add:
- function: private::process_ucs_webhook_transform
- function: private::extract_webhook_event_object
- struct: pub::WebhookProcessingResult
**Commit 2:** feat(core): Adding integration for webhooks through UCS (#8814)
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_webhook_details
**crates/router/src/core/unified_connector_service.rs**
Remove:
- mod: private::transformers
Add:
- function: pub::should_call_unified_connector_service_for_webhooks
- function: pub::build_webhook_secrets_from_merchant_connector_account
- function: pub::call_unified_connector_service_for_webhook
- function: pub::extract_webhook_content_from_ucs_response
- mod: pub::transformers
**crates/router/src/core/unified_connector_service/transformers.rs**
Add:
- function: private::foreign_try_from
- function: pub::transform_ucs_webhook_response
- function: pub::build_webhook_transform_request
- struct: pub::WebhookTransformData
- impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails
**crates/router/src/core/webhooks/incoming.rs**
Add:
- function: private::process_ucs_webhook_transform
- function: private::extract_webhook_event_object
- struct: pub::WebhookProcessingResult
|
{"issue_number": 8880, "pr_number": 8814, "commits_count": 2, "files_changed": 5, "response_length": 3391, "file_count": 13, "needs_breakdown": false}
|
fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and add error code mapping '800.100.203'
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- fix deserialization error for incoming webhook response for trustpay
made `Code` as optional field
- add error code mapping '800.100.203'
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
No testing can be done since it matches error code in production which cant be replicated
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and add error code mapping '800.100.203'
- Merged: 2024-03-26T13:25:13Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
- fix deserialization error for incoming webhook response for trustpay
made `Code` as optional field
- add error code mapping '800.100.203'
PR raised against main - #4199
### Additional Changes
- [ ] This PR modifies the API con
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [Trustpay] fix deserialization error for incoming webhook response for trustpay and
Files to modify:
**crates/router/src/connector/trustpay.rs**
Modify existing code
**crates/router/src/connector/trustpay/transformers.rs**
Modify existing code
|
{"issue_number": 4199, "pr_number": 4201, "commits_count": 1, "files_changed": 2, "response_length": 1136, "file_count": 4, "needs_breakdown": false}
|
[REFACTOR] reduce duplicate code in config in cypress
- too much chaos and confusion
- boiler plate and duplicate code
- move memory cache test out of payments and make it a separate service
|
<think>
PR Context:
- Title: refactor(cypress): move memory cache tests out of payment for misc
- Merged: 2025-01-24T17:23:22Z
- Files changed: 30 files
- Commits: 21 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR aims at refactoring:
- `cypress-tests` folder structure to reduce confusion and chaos in within `e2e` directory
- previous:
```sh
.
└── cypress
├── e2e
│ ├── PaymentMethodListTest
│ ├── PaymentMet
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6993, "pr_number": 6992, "commits_count": 0, "files_changed": 30, "response_length": 798, "file_count": 0, "needs_breakdown": false}
|
[BUG] FEATURE_MATRIX shows JPMorgan does not support Refunds
I added support for refunds 3 weeks ago in #8436. Feature matrix needs to be updated.
|
<think>
PR Context:
- Title: fix(feature_matrix): refunds are supported by jpmorgan
- Merged: 2025-07-24T13:32:53Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
This PR marks refunds as supported by JPMorgan connector. Although this does not affect refund flow, the feature matrix marking is wrong.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the datab
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(feature_matrix): refunds are supported by jpmorgan (#8699)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/jpmorgan.rs**
Modify existing code
|
{"issue_number": 8698, "pr_number": 8699, "commits_count": 1, "files_changed": 1, "response_length": 952, "file_count": 3, "needs_breakdown": false}
|
enhance(router/webhooks): expose additional incoming request details to webhooks flow
## 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 -->
This PR exposes additional details about the incoming webhooks request (particularly the method) to the various connector webhook functions.
### Additional Changes
None
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
Certain connectors like Worldline will peform an initial endpoint check by making a GET request to Hyperswitch. This case needs to be handled in the connector. This PR facilitates this handling.
## 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, compiler-guided
## 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: enhance(router): release candidate pr for webhooks enhancement (#637)
- Merged: 2023-02-25T13:17:19Z
- Files changed: 22 files
- Commits: 5 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
#637
### Additional Changes
None
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 637, "pr_number": 641, "commits_count": 0, "files_changed": 22, "response_length": 800, "file_count": 0, "needs_breakdown": false}
|
Use `serde_repr` for serializing enums as u8
https://github.com/juspay/orca/blob/56d153d8f7c2c75391799cf14280c448df97842f/crates/router/src/connector/authorizedotnet/transformers.rs#L219-L227
Instead of such renaming, it would be more properly to use `#[repr(u8)]` here:
```rust
#[derive(Serialize_repr, Deserialize_repr)]
#[repr(u8)]
pub enum AuthorizedotnetPaymentStatus {
Approved = 1,
Declined = 2,
Error = 3,
#[default]
HeldForReview = 4,
}
```
https://serde.rs/enum-number.html
|
<think>
PR Context:
- Title: use `serde_repr` for serializing enums as `u8`
- Merged: 2022-12-13T13:23:37Z
- Files changed: 3 files
- Commits: 2 commits
Implementation approach:
## Type of Chang
- [x] Refactoring
## Motivation and Context
Closes #110.
## 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:** use `serde_repr` for serializing enums as `u8` (#130)
Files to modify:
**crates/router/src/connector/authorizedotnet/transformers.rs**
Modify existing code
|
{"issue_number": 110, "pr_number": 130, "commits_count": 1, "files_changed": 3, "response_length": 668, "file_count": 3, "needs_breakdown": false}
|
[FEATURE]: Add ability to add connectors without any auth details
### Feature Description
Ability to integrate a connector without any auth details. But it need not be used for routing until we get the auth details.
### Possible Implementation
Create a new auth_type, which doesn't need any details and use the disabled field in the mca table to disable it in routing.
### 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(mca): Add new `auth_type` and a status field for mca
- Merged: 2023-11-20T07:42:46Z
- Files changed: 18 files
- Commits: 13 commits
Implementation approach:
## Description
<!-- Describe your changes in detail -->
Add a new `auth_type` called `TemporaryAuth` which describes that auth details are not yet received. When using this `auth_type` the connector status will be `inactive` and mca will be disabled.
### Additional Changes
- [x] This PR modif
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(mca): Add new `auth_type` and a status field for mca (#2883)
Co-authored-by: github-actions[bot
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::ConnectorStatus
**crates/diesel_models/src/enums.rs**
Modify existing code
**crates/diesel_models/src/merchant_connector_account.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/kgraph_utils/benches/evaluation.rs**
Modify existing code
**crates/kgraph_utils/src/mca.rs**
Modify existing code
**crates/router/src/connector/square/transformers.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Add:
- function: pub::validate_status_and_disabled
**crates/router/src/core/verification/utils.rs**
Modify existing code
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/router/src/openapi.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/domain/merchant_connector_account.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 2895, "pr_number": 2883, "commits_count": 1, "files_changed": 18, "response_length": 1978, "file_count": 17, "needs_breakdown": true}
|
refactor(router): return generic message for UnprocessableEntity in make_pm_data
## 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 -->
During payments confirm call if the `payment_token` passed is invalid, `token_a6tVM7swAN2ZqkbQIm9 expired or invalid` was being returned. Now it is refactored to return `token expired or invalid` instead of including the token value in the error message. This pr also includes the change to use change_context instead of map_err while adding data into 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 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)?
-->
<img width="1054" alt="Screenshot 2023-08-30 at 10 55 32 AM" src="https://github.com/juspay/hyperswitch/assets/83439957/bc150432-5985-4889-9d2c-bc9efd79c731">
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: chore(deps): bump openssl from 0.10.57 to 0.10.60
- Merged: 2023-11-29T08:09:42Z
- Files changed: 2 files
- Commits: 1 commits
Implementation approach:
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.57 to 0.10.60.
<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.60</h2>
<h2>What's Changed</h2>
<ul>
<li>Correct off-by-one in minimum output buffer size computation by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 2050, "pr_number": 3004, "commits_count": 0, "files_changed": 2, "response_length": 779, "file_count": 0, "needs_breakdown": false}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.