Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183)
Suman Majib1628f798146
diff --git a/Cargo.lock b/Cargo.lockindex 1aef07f36d..42add100ad 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3911,7 +3911,7 @@ dependencies = ["image","iso_currency","isocountry",- "josekit 0.8.6",+ "josekit","lazy_static","masking","mime",@@ -4375,23 +4375,6 @@ dependencies = ["libc",]-[[package]]-name = "josekit"-version = "0.8.6"-source = "git+https://github.com/sumanmaji4/josekit-rs.git?rev=5ab54876c29a84f86aef8c169413a46026883efe#5ab54876c29a84f86aef8c169413a46026883efe"-dependencies = [- "anyhow",- "base64 0.21.7",- "flate2",- "once_cell",- "openssl",- "regex",- "serde",- "serde_json",- "thiserror 1.0.69",- "time",-]-[[package]]name = "josekit"version = "0.8.7"@@ -6660,7 +6643,7 @@ dependencies = ["hyperswitch_domain_models","hyperswitch_interfaces","infer",- "josekit 0.8.7",+ "josekit","jsonwebtoken","kgraph_utils","masking",diff --git a/crates/hyperswitch_connectors/Cargo.toml b/crates/hyperswitch_connectors/Cargo.tomlindex 6be421eb30..9233aa9bc5 100644--- a/crates/hyperswitch_connectors/Cargo.toml+++ b/crates/hyperswitch_connectors/Cargo.toml@@ -25,7 +25,7 @@ http = "0.2.12"iso_currency = "0.4.4"isocountry = "0.3.2"image = { version = "0.25.6", default-features = false, features = ["png"] }-josekit = { git = "https://github.com/sumanmaji4/josekit-rs.git", rev = "5ab54876c29a84f86aef8c169413a46026883efe", features = ["support-empty-payload"] }+josekit = "0.8.7"lazy_static = "1.5.0"mime = "0.3.17"num-traits = "0.2.19"diff --git a/crates/hyperswitch_connectors/src/connectors/nomupay.rs b/crates/hyperswitch_connectors/src/connectors/nomupay.rsindex cb65c4db9f..6b2516d120 100644--- a/crates/hyperswitch_connectors/src/connectors/nomupay.rs+++ b/crates/hyperswitch_connectors/src/connectors/nomupay.rs@@ -53,7 +53,7 @@ use hyperswitch_interfaces::{webhooks,};use josekit::{- jws::{JwsHeader, ES256},+ jws::{self, JwsHeader, ES256},jwt::{self, JwtPayload},Map, Value,};@@ -142,8 +142,12 @@ fn get_signature(.signer_from_pem(&private_key).change_context(errors::ConnectorError::ProcessingStepFailed(None))?;- let nomupay_jwt = jwt::encode_with_signer(&payload, &header, &signer)- .change_context(errors::ConnectorError::ProcessingStepFailed(None))?;+ let nomupay_jwt = match method {+ "GET" => jws::serialize_compact(b"", &header, &signer)+ .change_context(errors::ConnectorError::ProcessingStepFailed(None))?,+ _ => jwt::encode_with_signer(&payload, &header, &signer)+ .change_context(errors::ConnectorError::ProcessingStepFailed(None))?,+ };let jws_blocks: Vec<&str> = nomupay_jwt.split('.').collect();