mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +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)
|
.create_or_validate(db)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let merchant_account_type = match organization.get_organization_type() {
|
// V2 currently supports creation of Standard merchant accounts only, irrespective of organization type
|
||||||
OrganizationType::Standard => MerchantAccountType::Standard,
|
let merchant_account_type = 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())
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let key = key_store.key.into_inner();
|
let key = key_store.key.into_inner();
|
||||||
let id = identifier.to_owned();
|
let id = identifier.to_owned();
|
||||||
|
|||||||
Reference in New Issue
Block a user