Skip to content
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
68248f0
Init commit for injector crate
su-shivanshmathur Aug 4, 2025
c89185c
injector enhancements
su-shivanshmathur Aug 4, 2025
0a9bc18
Injector test cases
su-shivanshmathur Aug 6, 2025
5d7e06f
default changes
su-shivanshmathur Aug 6, 2025
513478c
Merge branch 'main' of github.com:juspay/hyperswitch into addition_in…
su-shivanshmathur Aug 14, 2025
02162d6
chore: run formatter
hyperswitch-bot[bot] Aug 14, 2025
26a383f
clippy errors
su-shivanshmathur Aug 14, 2025
032df2f
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 14, 2025
a7f7198
chore: run formatter
hyperswitch-bot[bot] Aug 14, 2025
7e0fba5
clippy error
su-shivanshmathur Aug 14, 2025
b5cf478
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 14, 2025
542cce3
chore: run formatter
hyperswitch-bot[bot] Aug 14, 2025
326b86d
Secret<String> related changes
su-shivanshmathur Aug 15, 2025
0529859
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
3f253ad
Merge branch 'main' of github.com:juspay/hyperswitch into addition_in…
su-shivanshmathur Aug 15, 2025
1a632d8
chore: run formatter
hyperswitch-bot[bot] Aug 15, 2025
ed0fe98
Removing not required Http Methods
su-shivanshmathur Aug 15, 2025
6fc8eee
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
9aa26ba
chore: run formatter
hyperswitch-bot[bot] Aug 15, 2025
69ceb9d
clippy error
su-shivanshmathur Aug 15, 2025
0c5fa7d
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
d3c2b93
chore: run formatter
hyperswitch-bot[bot] Aug 15, 2025
41fc6a1
whitespace changes
su-shivanshmathur Aug 15, 2025
ef671d0
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
5f67c74
chore: run formatter
hyperswitch-bot[bot] Aug 15, 2025
1b69ffb
indentation changes
su-shivanshmathur Aug 15, 2025
d562c4a
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
8ea2faa
chore: run formatter
hyperswitch-bot[bot] Aug 15, 2025
2ba76b7
UCS related commit
su-shivanshmathur Aug 15, 2025
8396400
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 15, 2025
6a06928
compilation errors
su-shivanshmathur Aug 16, 2025
cb033db
feature flag
su-shivanshmathur Aug 16, 2025
90cdae0
chore: run formatter
hyperswitch-bot[bot] Aug 16, 2025
ebdbc04
feature flag changes
su-shivanshmathur Aug 19, 2025
3759b02
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 19, 2025
b2a684d
chore: run formatter
hyperswitch-bot[bot] Aug 19, 2025
79d11ac
reverting changes
su-shivanshmathur Aug 19, 2025
42a5d4e
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 19, 2025
81ed686
Merge branch 'main' of github.com:juspay/hyperswitch into addition_in…
su-shivanshmathur Aug 19, 2025
47fb3b6
ci_hack command resolves
su-shivanshmathur Aug 19, 2025
f29d414
chore: run formatter
hyperswitch-bot[bot] Aug 19, 2025
29f0266
ci_hack changes
su-shivanshmathur Aug 19, 2025
c13dd05
comment resolutions
su-shivanshmathur Aug 20, 2025
9037977
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 20, 2025
d56e7ee
chore: run formatter
hyperswitch-bot[bot] Aug 20, 2025
7a20353
injector.rs introduction
su-shivanshmathur Aug 20, 2025
01736f1
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 20, 2025
385bb7a
chore: run formatter
hyperswitch-bot[bot] Aug 20, 2025
07ae22d
comment resolution
su-shivanshmathur Aug 20, 2025
2799da0
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 20, 2025
9e26dbe
chore: run formatter
hyperswitch-bot[bot] Aug 20, 2025
9469a60
vault_type to vault_connector
su-shivanshmathur Aug 20, 2025
ca17887
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 20, 2025
f83df2a
cargo check changes
su-shivanshmathur Aug 21, 2025
1a3dd05
reverting commit changes
su-shivanshmathur Aug 21, 2025
4424487
import changes
su-shivanshmathur Aug 21, 2025
1b0cc73
chore: run formatter
hyperswitch-bot[bot] Aug 21, 2025
28803d8
cargo check fix
su-shivanshmathur Aug 21, 2025
40b12a9
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 21, 2025
f726462
cargo check commit
su-shivanshmathur Aug 21, 2025
dd54aa6
chore: run formatter
hyperswitch-bot[bot] Aug 21, 2025
33fafc6
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Aug 21, 2025
73dd445
Cargo check changes
su-shivanshmathur Aug 21, 2025
720f611
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 21, 2025
c940a79
comment resolution
su-shivanshmathur Aug 22, 2025
c136844
chore: run formatter
hyperswitch-bot[bot] Aug 22, 2025
3368df1
comments
su-shivanshmathur Aug 22, 2025
793a76c
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 22, 2025
451c1de
injector domain model removal
su-shivanshmathur Aug 22, 2025
48069ac
removal of test script
su-shivanshmathur Aug 22, 2025
6989520
removal of unwanted changes
su-shivanshmathur Aug 22, 2025
3b84467
clippy fixes
su-shivanshmathur Aug 22, 2025
d4838ac
chore: run formatter
hyperswitch-bot[bot] Aug 22, 2025
3281525
moving enums around
su-shivanshmathur Aug 22, 2025
ffbab9c
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 22, 2025
a3812f6
Merge branch 'main' of github.com:juspay/hyperswitch into addition_in…
su-shivanshmathur Aug 22, 2025
d15d079
chore: run formatter
hyperswitch-bot[bot] Aug 22, 2025
c124485
comment resolution
su-shivanshmathur Aug 22, 2025
25948ad
comment resolution
su-shivanshmathur Aug 23, 2025
be2f0aa
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 23, 2025
575ff01
remove todo coment
su-shivanshmathur Aug 23, 2025
861aab2
remove the keymanager changes
su-shivanshmathur Aug 23, 2025
28e0bfc
resolving the Cargo Check command errors
su-shivanshmathur Aug 23, 2025
555cd3d
chore: run formatter
hyperswitch-bot[bot] Aug 23, 2025
1ef6321
Making dependencies non-optional
su-shivanshmathur Aug 24, 2025
d7491d0
Merge branch 'addition_injector_crate' of github.com:juspay/hyperswit…
su-shivanshmathur Aug 24, 2025
e0ac1d5
comment resolution
su-shivanshmathur Aug 25, 2025
bd1b2d0
clippy changes
su-shivanshmathur Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions crates/common_utils/src/keymanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ where
let url = format!("{}/{endpoint}", &state.url);

logger::info!(key_manager_request=?request_body);
let mut header = vec![];
header.push((
let mut header = vec![(
HeaderName::from_str(CONTENT_TYPE)
.change_context(errors::KeyManagerClientError::FailedtoConstructHeader)?,
HeaderValue::from_str("application/json")
.change_context(errors::KeyManagerClientError::FailedtoConstructHeader)?,
));
)];

#[cfg(feature = "km_forward_x_request_id")]
if let Some(request_id) = state.request_id {
header.push((
Expand Down Expand Up @@ -211,7 +211,7 @@ impl ConvertRaw for TransientBatchDecryptDataRequest {
fn convert_raw(self) -> Result<Self::Output, errors::KeyManagerClientError> {
let data = self
.data
.iter()
.into_iter()
.map(|(k, v)| {
let value = match String::from_utf8(v.peek().clone()) {
Ok(data) => data,
Expand All @@ -220,7 +220,7 @@ impl ConvertRaw for TransientBatchDecryptDataRequest {
format!("{DEFAULT_ENCRYPTION_VERSION}:{data}")
}
};
(k.to_owned(), StrongSecret::new(value))
(k, StrongSecret::new(value))
})
.collect();
Ok(BatchDecryptDataRequest {
Expand Down
2 changes: 2 additions & 0 deletions crates/diesel_models/src/payment_attempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ impl PaymentAttemptUpdateInternal {

#[cfg(feature = "v2")]
impl PaymentAttemptUpdate {
// #[allow(clippy::todo)]
pub fn apply_changeset(self, _source: PaymentAttempt) -> PaymentAttempt {
todo!()
// let PaymentAttemptUpdateInternal {
Expand Down Expand Up @@ -1325,6 +1326,7 @@ impl PaymentAttemptUpdate {

#[cfg(feature = "v2")]
impl From<PaymentAttemptUpdate> for PaymentAttemptUpdateInternal {
// #[allow(clippy::todo)]
fn from(_payment_attempt_update: PaymentAttemptUpdate) -> Self {
todo!()
// match payment_attempt_update {
Expand Down
13 changes: 13 additions & 0 deletions crates/hyperswitch_connectors/src/connectors/redsys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,4 +921,17 @@ impl ConnectorSpecifications for Redsys {
connector_utils::generate_12_digit_number().to_string()
}
}

// #[cfg(feature = "v2")]
// fn generate_connector_request_reference_id(
// &self,
// payment_intent: &hyperswitch_domain_models::payments::PaymentIntent,
// _payment_attempt: &hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt,
// ) -> String {
// payment_intent
// .merchant_reference_id
// .as_ref()
// .map(|id| id.get_string_repr().to_owned())
// .unwrap_or_else(|| connector_utils::generate_12_digit_number().to_string())
// }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this change. seems like this is irrelevant change

}
2 changes: 1 addition & 1 deletion crates/hyperswitch_interfaces/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pub trait ConnectorSpecifications {
false
}

#[cfg(not(feature = "v2"))]
#[cfg(feature = "v1")]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this required?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not required, please revert this

/// Generate connector request reference ID
fn generate_connector_request_reference_id(
&self,
Expand Down
48 changes: 48 additions & 0 deletions crates/injector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[package]
name = "injector"
description = "Token injection and payload processing for payment connectors"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true

[features]
default = [
"dep:hyperswitch_interfaces",
"dep:common_utils",
"dep:external_services",
"dep:masking",
"dep:router_env",
"dep:async-trait",
"dep:error-stack",
"dep:nom",
"dep:serde",
"dep:serde_json",
"dep:thiserror",
"dep:tokio",
"dep:url"
]

v1 = ["default"]
v2 = ["default"]
serde = ["default"]
tracing-actix-web = ["default"]

[dependencies]
hyperswitch_interfaces = { version = "0.1.0", path = "../hyperswitch_interfaces", optional = true }
common_utils = { version = "0.1.0", path = "../common_utils", optional = true }
external_services = { version = "0.1.0", path = "../external_services", optional = true }
masking = { version = "0.1.0", path = "../masking", optional = true }
router_env = { version = "0.1.0", path = "../router_env", optional = true }

async-trait = { version = "0.1.88", optional = true }
error-stack = { version = "0.4.1", optional = true }
nom = { version = "7.1.3", optional = true }
serde = { version = "1.0.219", features = ["derive"], optional = true }
serde_json = { version = "1.0.140", optional = true }
thiserror = { version = "1.0.69", optional = true }
tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread"], optional = true }
url = { version = "2.5.4", features = ["serde"], optional = true }

[lints]
workspace = true
Loading
Loading