mirror of
https://github.com/bitwarden/server.git
synced 2025-02-01 23:31:41 +01:00
do not accept bank tokens for premium
This commit is contained in:
parent
72848a0623
commit
45c2d3eeb8
@ -551,6 +551,11 @@ namespace Bit.Core.Services
|
||||
}
|
||||
else if(!string.IsNullOrWhiteSpace(paymentToken))
|
||||
{
|
||||
if(paymentToken.StartsWith("btok_"))
|
||||
{
|
||||
throw new BadRequestException("Invalid token.");
|
||||
}
|
||||
|
||||
if(paymentToken.StartsWith("tok_"))
|
||||
{
|
||||
paymentService = new StripePaymentService();
|
||||
@ -612,6 +617,11 @@ namespace Bit.Core.Services
|
||||
|
||||
public async Task ReplacePaymentMethodAsync(User user, string paymentToken)
|
||||
{
|
||||
if(paymentToken.StartsWith("btok_"))
|
||||
{
|
||||
throw new BadRequestException("Invalid token.");
|
||||
}
|
||||
|
||||
IPaymentService paymentService = null;
|
||||
if(paymentToken.StartsWith("tok_"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user