CyberSource / cybersource-rest-client-php

PHP client library for the CyberSource REST API
30 stars 66 forks source link

setDebug methods removed from Authentication/Core/MerchantConfiguration #87

Open chriskoleda opened 2 years ago

chriskoleda commented 2 years ago

Hey guys, I noticed when combing through some logs in some of our Magento2 code that there are calls to a method setDebug that no longer exists. Our client code is calling this code to run reports, but it also seems that your code is still calling these non-existent methods as well.

If you look here at this older version of your code https://github.com/CyberSource/cybersource-rest-client-php/blob/bc2e8894c6867a23ef0641e96a423c172febfbea/lib/Authentication/Core/MerchantConfiguration.php#L541

You can see a setDebug did exist and you can see here on the most recent version of your code, that the method no longer exists but is still being called by other methods https://github.com/CyberSource/cybersource-rest-client-php/blob/cb77850f6261eaf1569187a746c790675d9f34bd/lib/Authentication/Core/MerchantConfiguration.php#L870

It seems to me that this was partially replaced by CyberSource/LogConfiguration class but I cannot tell for sure.

I Was wondering if you guys could provide any insight or code fix for this. This snippet of code below is what we have written for running our reports it essentially news up a CyberSource/Authentication/Core/MerchantConfiguration class and sets these methods (the first 3 of which do not seem to exist any longer)

          $merchantConfig->setDebug($enableLog);
            $merchantConfig->setLogSize(trim($logSize));
            $merchantConfig->setDebugFile(trim($logFile));
            $merchantConfig->setLogFileName(trim($logFilename));
            $merchantConfig->setauthenticationType($authenticationType);
            $merchantConfig->setMerchantID(trim($merchantID));
            $merchantConfig->setApiKeyID($apiKeyID);
            $merchantConfig->setSecretKey($secretKey);
            $merchantConfig->setKeyFileName(trim($keyFilename));
            $merchantConfig->setKeyAlias($keyAlias);
            $merchantConfig->setKeyPassword($keyPass);
            $merchantConfig->setKeysDirectory($keyDirectory);
            $merchantConfig->setRunEnvironment($runEnv);
            $merchantConfig->validateMerchantData();

I was wondering what a replacement for these methods might be as they are causing our report code to fail.

Thanks!

D41126250 commented 2 years ago

Same problem here @chriskoleda Do you have more information or any partial solution? Thanks!

tedwong commented 1 year ago

@D41126250 / @chriskoleda May I know how did u guys resolve at the end?