Skip to content

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

refactor(router): changed auth of verify_apple_pay from mid to jwt (#2094)

Prajjwal Kumar8246f4e9c336
diff --git a/crates/router/src/routes/verification.rs b/crates/router/src/routes/verification.rs
index b429368197..1de0803170 100644
--- a/crates/router/src/routes/verification.rs
+++ b/crates/router/src/routes/verification.rs
@@ -14,10 +14,8 @@ pub async fn apple_pay_merchant_registration(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<verifications::ApplepayMerchantVerificationRequest>,
- path: web::Path<String>,
) -> impl Responder {
let flow = Flow::Verification;
- let merchant_id = path.into_inner();
api::server_wrap(
flow,
state.get_ref(),
@@ -26,7 +24,7 @@ pub async fn apple_pay_merchant_registration(
|state, _, body| {
verification::verify_merchant_creds_for_applepay(state, &req, body, &state.conf.kms)
},
- &auth::MerchantIdAuth(merchant_id.clone()),
+ auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()),
)
.await
}