mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 05:58:13 -05: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))
|
else if(!string.IsNullOrWhiteSpace(paymentToken))
|
||||||
{
|
{
|
||||||
|
if(paymentToken.StartsWith("btok_"))
|
||||||
|
{
|
||||||
|
throw new BadRequestException("Invalid token.");
|
||||||
|
}
|
||||||
|
|
||||||
if(paymentToken.StartsWith("tok_"))
|
if(paymentToken.StartsWith("tok_"))
|
||||||
{
|
{
|
||||||
paymentService = new StripePaymentService();
|
paymentService = new StripePaymentService();
|
||||||
@ -612,6 +617,11 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
public async Task ReplacePaymentMethodAsync(User user, string paymentToken)
|
public async Task ReplacePaymentMethodAsync(User user, string paymentToken)
|
||||||
{
|
{
|
||||||
|
if(paymentToken.StartsWith("btok_"))
|
||||||
|
{
|
||||||
|
throw new BadRequestException("Invalid token.");
|
||||||
|
}
|
||||||
|
|
||||||
IPaymentService paymentService = null;
|
IPaymentService paymentService = null;
|
||||||
if(paymentToken.StartsWith("tok_"))
|
if(paymentToken.StartsWith("tok_"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user