refactor(merchant_account): make organization_id as mandatory (#2458)

This commit is contained in:
Narayan Bhat
2023-10-06 16:13:02 +05:30
committed by GitHub
parent 8c80c008aa
commit 53b4816d27
8 changed files with 21 additions and 8 deletions

View File

@ -31,6 +31,8 @@ use crate::{
utils::{self, OptionExt},
};
const DEFAULT_ORG_ID: &str = "org_abcdefghijklmn";
#[inline]
pub fn create_merchant_publishable_key() -> String {
format!(
@ -164,7 +166,7 @@ pub async fn create_merchant_account(
intent_fulfillment_time: req.intent_fulfillment_time.map(i64::from),
payout_routing_algorithm: req.payout_routing_algorithm,
id: None,
organization_id: req.organization_id,
organization_id: req.organization_id.unwrap_or(DEFAULT_ORG_ID.to_string()),
is_recon_enabled: false,
default_profile: None,
recon_status: diesel_models::enums::ReconStatus::NotRequested,