-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b4672b
commit 9fb490b
Showing
17 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod connector_onboarding; | ||
pub mod customer; | ||
pub mod gsm; | ||
mod locker_migration; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use common_utils::events::{ApiEventMetric, ApiEventsType}; | ||
|
||
use crate::connector_onboarding::{ | ||
ActionUrlRequest, ActionUrlResponse, OnboardingStatus, OnboardingSyncRequest, | ||
}; | ||
|
||
common_utils::impl_misc_api_event_type!( | ||
ActionUrlRequest, | ||
ActionUrlResponse, | ||
OnboardingSyncRequest, | ||
OnboardingStatus | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use actix_web::{web, HttpRequest, HttpResponse}; | ||
use api_models::connector_onboarding as api_types; | ||
use router_env::Flow; | ||
|
||
use super::AppState; | ||
use crate::{ | ||
core::{api_locking, connector_onboarding as core}, | ||
services::{api, authentication as auth, authorization::permissions::Permission}, | ||
}; | ||
|
||
pub async fn get_action_url( | ||
state: web::Data<AppState>, | ||
http_req: HttpRequest, | ||
json_payload: web::Json<api_types::ActionUrlRequest>, | ||
) -> HttpResponse { | ||
let flow = Flow::GetActionUrl; | ||
let req_payload = json_payload.into_inner(); | ||
Box::pin(api::server_wrap( | ||
flow.clone(), | ||
state, | ||
&http_req, | ||
req_payload.clone(), | ||
|state, _: auth::UserFromToken, req| core::get_action_url(state, req), | ||
&auth::JWTAuth(Permission::MerchantAccountWrite), | ||
api_locking::LockAction::NotApplicable, | ||
)) | ||
.await | ||
} | ||
|
||
pub async fn sync_onboarding_status( | ||
state: web::Data<AppState>, | ||
http_req: HttpRequest, | ||
json_payload: web::Json<api_types::OnboardingSyncRequest>, | ||
) -> HttpResponse { | ||
let flow = Flow::SyncOnboardingStatus; | ||
let req_payload = json_payload.into_inner(); | ||
Box::pin(api::server_wrap( | ||
flow.clone(), | ||
state, | ||
&http_req, | ||
req_payload.clone(), | ||
core::sync_onboarding_status, | ||
&auth::JWTAuth(Permission::MerchantAccountWrite), | ||
api_locking::LockAction::NotApplicable, | ||
)) | ||
.await | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters