From 9b5c696e1fa21a8c19cbb10e3acac5df22395fb7 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Wed, 20 Nov 2024 13:59:22 +0100 Subject: [PATCH] use error code constants --- .../Billing/Services/Implementations/SubscriberService.cs | 2 +- src/Core/Services/Implementations/StripePaymentService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Billing/Services/Implementations/SubscriberService.cs b/src/Core/Billing/Services/Implementations/SubscriberService.cs index 8c23b5591..034ce3c36 100644 --- a/src/Core/Billing/Services/Implementations/SubscriberService.cs +++ b/src/Core/Billing/Services/Implementations/SubscriberService.cs @@ -646,7 +646,7 @@ public class SubscriberService( { switch (e.StripeError.Code) { - case "tax_id_invalid": + case StripeConstants.ErrorCodes.TaxIdInvalid: logger.LogWarning("Invalid tax ID '{TaxID}' for country '{Country}'.", taxInformation.TaxId, taxInformation.Country); diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index 14e4419b8..a7a0c7ea8 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -1736,7 +1736,7 @@ public class StripePaymentService : IPaymentService { switch (e.StripeError.Code) { - case "tax_id_invalid": + case StripeConstants.ErrorCodes.TaxIdInvalid: _logger.LogWarning("Invalid tax ID '{TaxID}' for country '{Country}'.", taxInfo.TaxIdNumber, taxInfo.BillingAddressCountry); @@ -1969,7 +1969,7 @@ public class StripePaymentService : IPaymentService { switch (e.StripeError.Code) { - case "tax_id_invalid": + case StripeConstants.ErrorCodes.TaxIdInvalid: _logger.LogWarning("Invalid tax ID '{TaxID}' for country '{Country}'.", parameters.TaxInformation.TaxId, parameters.TaxInformation.Country);