diff --git a/generator/cybersource-php-template/ApiClient.mustache b/generator/cybersource-php-template/ApiClient.mustache index ed2602574..85af5a25d 100644 --- a/generator/cybersource-php-template/ApiClient.mustache +++ b/generator/cybersource-php-template/ApiClient.mustache @@ -108,7 +108,7 @@ class ApiClient $this->clientId = $this->getClientId(); if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $merchantConfig->getLogConfiguration()); } } diff --git a/generator/cybersource-php-template/ObjectSerializer.mustache b/generator/cybersource-php-template/ObjectSerializer.mustache index 6c06cefbb..4fbdc8ddd 100644 --- a/generator/cybersource-php-template/ObjectSerializer.mustache +++ b/generator/cybersource-php-template/ObjectSerializer.mustache @@ -266,7 +266,7 @@ class ObjectSerializer $deserialized = new \SplFileObject($filename, "w"); $byte_written = $deserialized->fwrite($data); if (Configuration::getDefaultConfiguration()->getLogConfiguration()->isLoggingEnabled()) { - $tempLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), Configuration::getDefaultConfiguration()->getLogConfiguration()); + $tempLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), Configuration::getDefaultConfiguration()->getLogConfiguration()); $tempLogger->debug("Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing."); $tempLogger->close(); } diff --git a/generator/cybersource-php-template/api.mustache b/generator/cybersource-php-template/api.mustache index 4cb610b9d..3f225fbe1 100644 --- a/generator/cybersource-php-template/api.mustache +++ b/generator/cybersource-php-template/api.mustache @@ -57,7 +57,7 @@ use \{{invokerPackage}}\Logging\LogFactory as LogFactory; $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/generator/cybersource-php-template/configuration.mustache b/generator/cybersource-php-template/configuration.mustache index 97ac55e0a..d08c42a4d 100644 --- a/generator/cybersource-php-template/configuration.mustache +++ b/generator/cybersource-php-template/configuration.mustache @@ -178,7 +178,7 @@ class Configuration { $this->logConfig = new LogConfiguration(); if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $this->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $this->getLogConfiguration()); } } diff --git a/lib/Api/BatchesApi.php b/lib/Api/BatchesApi.php index 7732283d6..be6be975d 100644 --- a/lib/Api/BatchesApi.php +++ b/lib/Api/BatchesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/BillingAgreementsApi.php b/lib/Api/BillingAgreementsApi.php index 5369e5a67..b2e1ccb6a 100644 --- a/lib/Api/BillingAgreementsApi.php +++ b/lib/Api/BillingAgreementsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/BinLookupApi.php b/lib/Api/BinLookupApi.php index 812a779ee..e02fded59 100644 --- a/lib/Api/BinLookupApi.php +++ b/lib/Api/BinLookupApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CaptureApi.php b/lib/Api/CaptureApi.php index 60e549353..f04263331 100644 --- a/lib/Api/CaptureApi.php +++ b/lib/Api/CaptureApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ChargebackDetailsApi.php b/lib/Api/ChargebackDetailsApi.php index 1de588d06..4a1a3aa58 100644 --- a/lib/Api/ChargebackDetailsApi.php +++ b/lib/Api/ChargebackDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ChargebackSummariesApi.php b/lib/Api/ChargebackSummariesApi.php index 3a0bc3ebe..6091788d4 100644 --- a/lib/Api/ChargebackSummariesApi.php +++ b/lib/Api/ChargebackSummariesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ConversionDetailsApi.php b/lib/Api/ConversionDetailsApi.php index e863a2a86..f6bcca37c 100644 --- a/lib/Api/ConversionDetailsApi.php +++ b/lib/Api/ConversionDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CreateNewWebhooksApi.php b/lib/Api/CreateNewWebhooksApi.php index 262356c65..318ef7231 100644 --- a/lib/Api/CreateNewWebhooksApi.php +++ b/lib/Api/CreateNewWebhooksApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CreditApi.php b/lib/Api/CreditApi.php index 20e344443..4c112381f 100644 --- a/lib/Api/CreditApi.php +++ b/lib/Api/CreditApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CustomerApi.php b/lib/Api/CustomerApi.php index 20f96b1e0..c33d9185a 100644 --- a/lib/Api/CustomerApi.php +++ b/lib/Api/CustomerApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CustomerPaymentInstrumentApi.php b/lib/Api/CustomerPaymentInstrumentApi.php index eae84e1c5..9f0bd779c 100644 --- a/lib/Api/CustomerPaymentInstrumentApi.php +++ b/lib/Api/CustomerPaymentInstrumentApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/CustomerShippingAddressApi.php b/lib/Api/CustomerShippingAddressApi.php index bc051893c..bed155892 100644 --- a/lib/Api/CustomerShippingAddressApi.php +++ b/lib/Api/CustomerShippingAddressApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/DecisionManagerApi.php b/lib/Api/DecisionManagerApi.php index cce08adbe..4071f66c1 100644 --- a/lib/Api/DecisionManagerApi.php +++ b/lib/Api/DecisionManagerApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/DownloadDTDApi.php b/lib/Api/DownloadDTDApi.php index b178d9c9c..0e138fa3e 100644 --- a/lib/Api/DownloadDTDApi.php +++ b/lib/Api/DownloadDTDApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/DownloadXSDApi.php b/lib/Api/DownloadXSDApi.php index 0fc6bb6cc..f73dc33aa 100644 --- a/lib/Api/DownloadXSDApi.php +++ b/lib/Api/DownloadXSDApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/EMVTagDetailsApi.php b/lib/Api/EMVTagDetailsApi.php index aa4c618e5..7826be64b 100644 --- a/lib/Api/EMVTagDetailsApi.php +++ b/lib/Api/EMVTagDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/FlexAPIApi.php b/lib/Api/FlexAPIApi.php index ee68d0bd8..047cf90be 100644 --- a/lib/Api/FlexAPIApi.php +++ b/lib/Api/FlexAPIApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/InstrumentIdentifierApi.php b/lib/Api/InstrumentIdentifierApi.php index 9cbadf318..f8760e98c 100644 --- a/lib/Api/InstrumentIdentifierApi.php +++ b/lib/Api/InstrumentIdentifierApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/InterchangeClearingLevelDetailsApi.php b/lib/Api/InterchangeClearingLevelDetailsApi.php index e10bbe018..ba5018f1c 100644 --- a/lib/Api/InterchangeClearingLevelDetailsApi.php +++ b/lib/Api/InterchangeClearingLevelDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/InvoiceSettingsApi.php b/lib/Api/InvoiceSettingsApi.php index 732a43c88..05198c8fb 100644 --- a/lib/Api/InvoiceSettingsApi.php +++ b/lib/Api/InvoiceSettingsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/InvoicesApi.php b/lib/Api/InvoicesApi.php index 863f19730..c266d5301 100644 --- a/lib/Api/InvoicesApi.php +++ b/lib/Api/InvoicesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ManageWebhooksApi.php b/lib/Api/ManageWebhooksApi.php index cc6da1da9..a268c99d8 100644 --- a/lib/Api/ManageWebhooksApi.php +++ b/lib/Api/ManageWebhooksApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/MerchantBoardingApi.php b/lib/Api/MerchantBoardingApi.php index 7cf5a2c8a..934e9d4ae 100644 --- a/lib/Api/MerchantBoardingApi.php +++ b/lib/Api/MerchantBoardingApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/MicroformIntegrationApi.php b/lib/Api/MicroformIntegrationApi.php index b183337c1..619afc915 100644 --- a/lib/Api/MicroformIntegrationApi.php +++ b/lib/Api/MicroformIntegrationApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/NetFundingsApi.php b/lib/Api/NetFundingsApi.php index d6d40ec57..7dc744848 100644 --- a/lib/Api/NetFundingsApi.php +++ b/lib/Api/NetFundingsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/NotificationOfChangesApi.php b/lib/Api/NotificationOfChangesApi.php index 8f584c9bd..85438b4b5 100644 --- a/lib/Api/NotificationOfChangesApi.php +++ b/lib/Api/NotificationOfChangesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/OAuthApi.php b/lib/Api/OAuthApi.php index 377a3edd0..65f3c1f8d 100644 --- a/lib/Api/OAuthApi.php +++ b/lib/Api/OAuthApi.php @@ -56,7 +56,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/OrdersApi.php b/lib/Api/OrdersApi.php index 2729c0172..3da96538f 100644 --- a/lib/Api/OrdersApi.php +++ b/lib/Api/OrdersApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PayerAuthenticationApi.php b/lib/Api/PayerAuthenticationApi.php index 248609e81..6ffb347f3 100644 --- a/lib/Api/PayerAuthenticationApi.php +++ b/lib/Api/PayerAuthenticationApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PaymentBatchSummariesApi.php b/lib/Api/PaymentBatchSummariesApi.php index a1ddd0bf7..a66bb07c2 100644 --- a/lib/Api/PaymentBatchSummariesApi.php +++ b/lib/Api/PaymentBatchSummariesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PaymentInstrumentApi.php b/lib/Api/PaymentInstrumentApi.php index 7bf93a1df..1d0e61a60 100644 --- a/lib/Api/PaymentInstrumentApi.php +++ b/lib/Api/PaymentInstrumentApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PaymentsApi.php b/lib/Api/PaymentsApi.php index c38041c32..ee3f83bed 100644 --- a/lib/Api/PaymentsApi.php +++ b/lib/Api/PaymentsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PayoutsApi.php b/lib/Api/PayoutsApi.php index 2930cc156..12e7c28c3 100644 --- a/lib/Api/PayoutsApi.php +++ b/lib/Api/PayoutsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PlansApi.php b/lib/Api/PlansApi.php index b148cfce6..c96a8375d 100644 --- a/lib/Api/PlansApi.php +++ b/lib/Api/PlansApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PurchaseAndRefundDetailsApi.php b/lib/Api/PurchaseAndRefundDetailsApi.php index 8d065db76..77022b95d 100644 --- a/lib/Api/PurchaseAndRefundDetailsApi.php +++ b/lib/Api/PurchaseAndRefundDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/PushFundsApi.php b/lib/Api/PushFundsApi.php index 302989416..ade83779f 100644 --- a/lib/Api/PushFundsApi.php +++ b/lib/Api/PushFundsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/RefundApi.php b/lib/Api/RefundApi.php index 45005905f..ac1ef4915 100644 --- a/lib/Api/RefundApi.php +++ b/lib/Api/RefundApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReplayWebhooksApi.php b/lib/Api/ReplayWebhooksApi.php index 71bff8e91..c02a09212 100644 --- a/lib/Api/ReplayWebhooksApi.php +++ b/lib/Api/ReplayWebhooksApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReportDefinitionsApi.php b/lib/Api/ReportDefinitionsApi.php index 7aa7d638a..5e7432fa4 100644 --- a/lib/Api/ReportDefinitionsApi.php +++ b/lib/Api/ReportDefinitionsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReportDownloadsApi.php b/lib/Api/ReportDownloadsApi.php index 0b34079bc..32531a32f 100644 --- a/lib/Api/ReportDownloadsApi.php +++ b/lib/Api/ReportDownloadsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReportSubscriptionsApi.php b/lib/Api/ReportSubscriptionsApi.php index 253d8102e..f97271719 100644 --- a/lib/Api/ReportSubscriptionsApi.php +++ b/lib/Api/ReportSubscriptionsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReportsApi.php b/lib/Api/ReportsApi.php index 7e419350b..0ddebe389 100644 --- a/lib/Api/ReportsApi.php +++ b/lib/Api/ReportsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/RetrievalDetailsApi.php b/lib/Api/RetrievalDetailsApi.php index 832d7ae40..eb2b1bebf 100644 --- a/lib/Api/RetrievalDetailsApi.php +++ b/lib/Api/RetrievalDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/RetrievalSummariesApi.php b/lib/Api/RetrievalSummariesApi.php index 1a03bd7e1..56c4995ca 100644 --- a/lib/Api/RetrievalSummariesApi.php +++ b/lib/Api/RetrievalSummariesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/ReversalApi.php b/lib/Api/ReversalApi.php index 56cb79aaf..04733796a 100644 --- a/lib/Api/ReversalApi.php +++ b/lib/Api/ReversalApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/SearchTransactionsApi.php b/lib/Api/SearchTransactionsApi.php index 8f7fc0afb..0f7c4a9a8 100644 --- a/lib/Api/SearchTransactionsApi.php +++ b/lib/Api/SearchTransactionsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/SecureFileShareApi.php b/lib/Api/SecureFileShareApi.php index b2ff2cec5..3ce88a960 100644 --- a/lib/Api/SecureFileShareApi.php +++ b/lib/Api/SecureFileShareApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/SubscriptionsApi.php b/lib/Api/SubscriptionsApi.php index 2cd452fae..fa5a9014a 100644 --- a/lib/Api/SubscriptionsApi.php +++ b/lib/Api/SubscriptionsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/TaxesApi.php b/lib/Api/TaxesApi.php index f05101ac6..eccd089dd 100644 --- a/lib/Api/TaxesApi.php +++ b/lib/Api/TaxesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/TokenApi.php b/lib/Api/TokenApi.php index 16db649a4..6c59be490 100644 --- a/lib/Api/TokenApi.php +++ b/lib/Api/TokenApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/TransactionBatchesApi.php b/lib/Api/TransactionBatchesApi.php index 49cee3d3e..1e7ebb038 100644 --- a/lib/Api/TransactionBatchesApi.php +++ b/lib/Api/TransactionBatchesApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/TransactionDetailsApi.php b/lib/Api/TransactionDetailsApi.php index 00693dd31..f4c829641 100644 --- a/lib/Api/TransactionDetailsApi.php +++ b/lib/Api/TransactionDetailsApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/TransientTokenDataApi.php b/lib/Api/TransientTokenDataApi.php index 64ac8b2e5..eab49ad9d 100644 --- a/lib/Api/TransientTokenDataApi.php +++ b/lib/Api/TransientTokenDataApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/UnifiedCheckoutCaptureContextApi.php b/lib/Api/UnifiedCheckoutCaptureContextApi.php index 5e22f4ac4..45aa7b31a 100644 --- a/lib/Api/UnifiedCheckoutCaptureContextApi.php +++ b/lib/Api/UnifiedCheckoutCaptureContextApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/UserManagementApi.php b/lib/Api/UserManagementApi.php index 269587f53..da4fd64ea 100644 --- a/lib/Api/UserManagementApi.php +++ b/lib/Api/UserManagementApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/UserManagementSearchApi.php b/lib/Api/UserManagementSearchApi.php index 43dd41802..e6f55188c 100644 --- a/lib/Api/UserManagementSearchApi.php +++ b/lib/Api/UserManagementSearchApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/VerificationApi.php b/lib/Api/VerificationApi.php index dc2ab6046..42e586139 100644 --- a/lib/Api/VerificationApi.php +++ b/lib/Api/VerificationApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/Api/VoidApi.php b/lib/Api/VoidApi.php index bddbf83e1..833285e49 100644 --- a/lib/Api/VoidApi.php +++ b/lib/Api/VoidApi.php @@ -66,7 +66,7 @@ public function __construct(\CyberSource\ApiClient $apiClient = null) $this->apiClient = $apiClient; if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $apiClient->merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $apiClient->merchantConfig->getLogConfiguration()); } } diff --git a/lib/ApiClient.php b/lib/ApiClient.php index 20d18b82f..4107acf73 100755 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -118,7 +118,7 @@ public function __construct(\CyberSource\Configuration $config = null, \CyberSou $this->clientId = $this->getClientId(); if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $merchantConfig->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $merchantConfig->getLogConfiguration()); } } diff --git a/lib/Authentication/Core/Authentication.php b/lib/Authentication/Core/Authentication.php index 077cb4dae..1d52d57d2 100644 --- a/lib/Authentication/Core/Authentication.php +++ b/lib/Authentication/Core/Authentication.php @@ -20,7 +20,7 @@ public function __construct(\CyberSource\Logging\LogConfiguration $logConfig = n { if (null !== $logConfig) { if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } } } diff --git a/lib/Authentication/Core/MerchantConfiguration.php b/lib/Authentication/Core/MerchantConfiguration.php index aec719afb..d118752a8 100644 --- a/lib/Authentication/Core/MerchantConfiguration.php +++ b/lib/Authentication/Core/MerchantConfiguration.php @@ -243,7 +243,7 @@ public function __construct() $this->logConfig = new LogConfiguration(); if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $this->logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $this->logConfig); } } @@ -1175,7 +1175,7 @@ public function validateMerchantData() } } - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $this->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $this->getLogConfiguration()); self::$logger->info(GlobalParameter::LOG_START_MSG); $logConfig = $this->getLogConfiguration(); $configurationData = array( diff --git a/lib/Authentication/Http/HttpSignatureGenerator.php b/lib/Authentication/Http/HttpSignatureGenerator.php index a42528dd4..1cc80e11d 100644 --- a/lib/Authentication/Http/HttpSignatureGenerator.php +++ b/lib/Authentication/Http/HttpSignatureGenerator.php @@ -19,7 +19,7 @@ class HttpSignatureGenerator implements TokenGenerator public function __construct(\CyberSource\Logging\LogConfiguration $logConfig) { if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), $logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } } diff --git a/lib/Authentication/Jwt/JsonWebTokenGenerator.php b/lib/Authentication/Jwt/JsonWebTokenGenerator.php index 13c8e6536..3598676e2 100644 --- a/lib/Authentication/Jwt/JsonWebTokenGenerator.php +++ b/lib/Authentication/Jwt/JsonWebTokenGenerator.php @@ -21,7 +21,7 @@ class JsonWebTokenGenerator implements TokenGenerator public function __construct(\CyberSource\Logging\LogConfiguration $logConfig) { if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } } diff --git a/lib/Authentication/Jwt/JsonWebTokenHeader.php b/lib/Authentication/Jwt/JsonWebTokenHeader.php index f2015bbee..1cef872ca 100644 --- a/lib/Authentication/Jwt/JsonWebTokenHeader.php +++ b/lib/Authentication/Jwt/JsonWebTokenHeader.php @@ -23,7 +23,7 @@ class JsonWebTokenHeader public function __construct(\CyberSource\Logging\LogConfiguration $logConfig) { if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } self::$cache = new Cache(); diff --git a/lib/Authentication/PayloadDigest/PayloadDigest.php b/lib/Authentication/PayloadDigest/PayloadDigest.php index 9263080ee..4cd3e9577 100644 --- a/lib/Authentication/PayloadDigest/PayloadDigest.php +++ b/lib/Authentication/PayloadDigest/PayloadDigest.php @@ -18,7 +18,7 @@ class PayloadDigest public function __construct(\CyberSource\Logging\LogConfiguration $logConfig = null) { if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $logConfig); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } } diff --git a/lib/Configuration.php b/lib/Configuration.php index 9ecd244ab..ab8e00489 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -187,7 +187,7 @@ public function __construct() { $this->logConfig = new LogConfiguration(); if (self::$logger === null) { - self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class($this)), $this->getLogConfiguration()); + self::$logger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $this->getLogConfiguration()); } } diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index cfaee52e8..e0f25b7c3 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -275,7 +275,7 @@ public static function deserialize($data, $class, $httpHeaders = null) $deserialized = new \SplFileObject($filename, "w"); $byte_written = $deserialized->fwrite($data); if (Configuration::getDefaultConfiguration()->getLogConfiguration()->isLoggingEnabled()) { - $tempLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), Configuration::getDefaultConfiguration()->getLogConfiguration()); + $tempLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), Configuration::getDefaultConfiguration()->getLogConfiguration()); $tempLogger->debug("Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing."); $tempLogger->close(); } diff --git a/lib/Utilities/Flex/TokenVerification.php b/lib/Utilities/Flex/TokenVerification.php index cb3554d4c..6524f9899 100644 --- a/lib/Utilities/Flex/TokenVerification.php +++ b/lib/Utilities/Flex/TokenVerification.php @@ -14,7 +14,7 @@ class TokenVerification public function __construct(\CyberSource\Logging\LogConfiguration $logConfig=null) { if (self::$MyLogger === null) { - self::$MyLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(get_class()), $logConfig); + self::$MyLogger = (new LogFactory())->getLogger(\CyberSource\Utilities\Helpers\ClassHelper::getClassName(static::class), $logConfig); } }