-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(router): add /relay endpoint #6870
Conversation
Changed Files
|
#[serde(rename = "type")] | ||
pub relay_type: RelayType, | ||
/// The data that is associated with the relay request | ||
pub data: Option<RelayData>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add connector_reference_id
in the response
crates/api_models/src/relay.rs
Outdated
/// Identifier of the connector ( merchant connector account ) to which relay request is being made | ||
#[schema(example = "mca_5apGeP94tMts6rg3U3kR", value_type = String)] | ||
pub connector_id: common_utils::id_type::MerchantConnectorAccountId, | ||
/// The business profile that is associated with this payment request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The business profile that is associated with this payment request | |
/// The business profile that is associated with this relay request |
…witch into relay/api-contract
crates/api_models/src/relay.rs
Outdated
pub connector_id: common_utils::id_type::MerchantConnectorAccountId, | ||
/// The business profile that is associated with this relay request | ||
#[schema(example = "pro_abcdefghijklmnopqrstuvwxyz", value_type = String)] | ||
pub profile_id: common_utils::id_type::ProfileId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to headers
3f04a81
to
bbef5a3
Compare
bbef5a3
to
e7db9e0
Compare
80f0cb3
to
2b94a33
Compare
} | ||
|
||
#[derive(Debug, ToSchema, Clone, Deserialize, Serialize)] | ||
#[serde(rename_all = "snake_case", untagged)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use untagged for deserialization. You can rely on the relay_type
to infer this. Can be changed in the subsequent PRs as well
…ete-pm * 'main' of github.com:juspay/hyperswitch: chore(version): 2024.12.23.0 feat(connector): [JPMORGAN] add Payment flows for cards (#6668) refactor(grpc): send `x-tenant-id` and `x-request-id` in grpc headers (#6904) feat(payment_methods_v2): Added Ephemeral auth for v2 (#6813) chore(cypress): payout - fix test cases for adyenplatform bank (#6887) refactor(connector): [Airwallex] add device_data in payment request (#6881) feat(router): add db interface for `/relay` (#6879) feat(payments_v2): implement payments capture v2 (#6722) feat(router): add /relay endpoint (#6870)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Type of Change
Description
/relay is a api that will be used to just forward the request sent my merchant without performing any application logic on it. In this pr the changes is particular to support the refunds for the payments that was directly performed with the connector (example stripe) with out hyperswitch involved during the payment flow.
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy