From a3b30595f5d73da35c4e4550bd217e65177b50f6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 31 Aug 2019 00:33:29 -0400 Subject: [PATCH] null check paymentToken --- src/Core/Services/Implementations/StripePaymentService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index f92723d8af..3d198f86cc 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -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_")) {