mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
null check paymentToken
This commit is contained in:
@ -51,7 +51,7 @@ namespace Bit.Core.Services
|
|||||||
var stripePaymentMethod = paymentMethodType == PaymentMethodType.Card ||
|
var stripePaymentMethod = paymentMethodType == PaymentMethodType.Card ||
|
||||||
paymentMethodType == PaymentMethodType.BankAccount;
|
paymentMethodType == PaymentMethodType.BankAccount;
|
||||||
|
|
||||||
if(stripePaymentMethod)
|
if(stripePaymentMethod && !string.IsNullOrWhiteSpace(paymentToken))
|
||||||
{
|
{
|
||||||
if(paymentToken.StartsWith("pm_"))
|
if(paymentToken.StartsWith("pm_"))
|
||||||
{
|
{
|
||||||
@ -334,7 +334,7 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
string stipeCustomerPaymentMethodId = null;
|
string stipeCustomerPaymentMethodId = null;
|
||||||
string stipeCustomerSourceToken = null;
|
string stipeCustomerSourceToken = null;
|
||||||
if(stripePaymentMethod)
|
if(stripePaymentMethod && !string.IsNullOrWhiteSpace(paymentToken))
|
||||||
{
|
{
|
||||||
if(paymentToken.StartsWith("pm_"))
|
if(paymentToken.StartsWith("pm_"))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user