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
refactor(core): error thrown for wrong mca in applepay_verification flow change from 5xx to 4xx (#2189)
Prajjwal Kumar656e7106b44b
diff --git a/crates/router/src/core/verification.rs b/crates/router/src/core/verification.rsindex a9dd234ac6..c1dac8f838 100644--- a/crates/router/src/core/verification.rs+++ b/crates/router/src/core/verification.rs@@ -7,7 +7,7 @@ use error_stack::ResultExt;use external_services::kms;use crate::{- core::errors::{self, api_error_response, utils::StorageErrorExt},+ core::errors::{self, api_error_response},headers, logger,routes::AppState,services, types,@@ -120,7 +120,7 @@ pub async fn get_verified_apple_domains_with_mid_mca_id(let key_store = db.get_merchant_key_store_by_merchant_id(&merchant_id, &db.get_master_key().to_vec().into()).await- .to_not_found_response(errors::ApiErrorResponse::InternalServerError)?;+ .change_context(api_error_response::ApiErrorResponse::MerchantAccountNotFound)?;let verified_domains = db.find_by_merchant_connector_account_merchant_id_merchant_connector_id(diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rsindex dca1fd3e40..ab213ed092 100644--- a/crates/router/src/routes/app.rs+++ b/crates/router/src/routes/app.rs@@ -602,7 +602,7 @@ impl Verify {web::scope("/verify").app_data(web::Data::new(state)).service(- web::resource("/{merchant_id}/apple_pay")+ web::resource("/apple_pay/{merchant_id}").route(web::post().to(apple_pay_merchant_registration)),).service(