CyberSource / CyberSource/cybersource-rest-client-php

setDebug methods removed from Authentication/Core/MerchantConfiguration

Open
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
41
Forks
77
Avg merge
26m
Merged PRs (30d)
1

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the older and current lib/Authentication/Core/MerchantConfiguration.php versions linked in the issue, then inspect the referenced CyberSource/LogConfiguration class. Trace the report setup calls for setDebug, setLogSize, and setDebugFile, and determine whether the configuration API or its callers need alignment; done means the report code no longer fails on these missing methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.