From 742769aba1e2e63d49123952234e9ed7c1a889a6 Mon Sep 17 00:00:00 2001 From: kwmcrell Date: Tue, 15 Oct 2019 16:59:44 -0500 Subject: [PATCH] Updated DeleteToken to take in the configName for the .Execute() command so that multiple configurations can be used --- src/GlobalPayments.Api/PaymentMethods/Credit.cs | 4 ++-- src/GlobalPayments.Api/PaymentMethods/PaymentInterfaces.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GlobalPayments.Api/PaymentMethods/Credit.cs b/src/GlobalPayments.Api/PaymentMethods/Credit.cs index 711210ba..6c1bc39c 100644 --- a/src/GlobalPayments.Api/PaymentMethods/Credit.cs +++ b/src/GlobalPayments.Api/PaymentMethods/Credit.cs @@ -137,7 +137,7 @@ public bool UpdateTokenExpiry() { /// Deletes the token associated with the current card object /// /// boolean value indicating success/failure - public bool DeleteToken() { + public bool DeleteToken(string configName = "default") { if (string.IsNullOrEmpty(Token)) { throw new BuilderException("Token cannot be null"); } @@ -145,7 +145,7 @@ public bool DeleteToken() { try { new ManagementBuilder(TransactionType.TokenDelete) .WithPaymentMethod(this) - .Execute(); + .Execute(configName); return true; } catch (ApiException) { diff --git a/src/GlobalPayments.Api/PaymentMethods/PaymentInterfaces.cs b/src/GlobalPayments.Api/PaymentMethods/PaymentInterfaces.cs index 754f4fc1..f972124b 100644 --- a/src/GlobalPayments.Api/PaymentMethods/PaymentInterfaces.cs +++ b/src/GlobalPayments.Api/PaymentMethods/PaymentInterfaces.cs @@ -64,7 +64,7 @@ interface ITokenizable { string Token { get; set; } string Tokenize(); bool UpdateTokenExpiry(); - bool DeleteToken(); + bool DeleteToken(string configName = "default"); } interface IVerifiable {