mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 09:32:48 -05:00
[PM-15048] Update bank account verification to use descriptor code (#5048)
* Update verify bank account process to use descriptor code * Run dotnet format
This commit is contained in:
@ -206,6 +206,11 @@ public class OrganizationBillingController(
|
||||
return Error.Unauthorized();
|
||||
}
|
||||
|
||||
if (requestBody.DescriptorCode.Length != 6 || !requestBody.DescriptorCode.StartsWith("SM"))
|
||||
{
|
||||
return Error.BadRequest("Statement descriptor should be a 6-character value that starts with 'SM'");
|
||||
}
|
||||
|
||||
var organization = await organizationRepository.GetByIdAsync(organizationId);
|
||||
|
||||
if (organization == null)
|
||||
@ -213,7 +218,7 @@ public class OrganizationBillingController(
|
||||
return Error.NotFound();
|
||||
}
|
||||
|
||||
await subscriberService.VerifyBankAccount(organization, (requestBody.Amount1, requestBody.Amount2));
|
||||
await subscriberService.VerifyBankAccount(organization, requestBody.DescriptorCode);
|
||||
|
||||
return TypedResults.Ok();
|
||||
}
|
||||
|
Reference in New Issue
Block a user