mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(vsaas): enable creating v2 merchant accounts in platform organization (#8823)
This commit is contained in:
@ -714,17 +714,8 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {
|
||||
.create_or_validate(db)
|
||||
.await?;
|
||||
|
||||
let merchant_account_type = match organization.get_organization_type() {
|
||||
OrganizationType::Standard => MerchantAccountType::Standard,
|
||||
// Blocking v2 merchant account create for platform
|
||||
OrganizationType::Platform => {
|
||||
return Err(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: "Merchant account creation is not allowed for a platform organization"
|
||||
.to_string(),
|
||||
}
|
||||
.into())
|
||||
}
|
||||
};
|
||||
// V2 currently supports creation of Standard merchant accounts only, irrespective of organization type
|
||||
let merchant_account_type = MerchantAccountType::Standard;
|
||||
|
||||
let key = key_store.key.into_inner();
|
||||
let id = identifier.to_owned();
|
||||
|
||||
Reference in New Issue
Block a user