1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-01 23:31:41 +01:00

null check paymentToken

This commit is contained in:
Kyle Spearrin 2019-08-31 00:33:29 -04:00
parent 81d2da8df4
commit a3b30595f5

View File

@ -51,7 +51,7 @@ namespace Bit.Core.Services
var stripePaymentMethod = paymentMethodType == PaymentMethodType.Card ||
paymentMethodType == PaymentMethodType.BankAccount;
if(stripePaymentMethod)
if(stripePaymentMethod && !string.IsNullOrWhiteSpace(paymentToken))
{
if(paymentToken.StartsWith("pm_"))
{
@ -334,7 +334,7 @@ namespace Bit.Core.Services
string stipeCustomerPaymentMethodId = null;
string stipeCustomerSourceToken = null;
if(stripePaymentMethod)
if(stripePaymentMethod && !string.IsNullOrWhiteSpace(paymentToken))
{
if(paymentToken.StartsWith("pm_"))
{