Giter Site home page Giter Site logo

kount-ris-php-sdk's People

Contributors

boyankukushev avatar dharp-kount avatar gallilama avatar michael-kumar avatar mmewara avatar preslav-anev avatar preslavpa avatar raoulduke avatar sanjeevitt avatar shermankester avatar silarn avatar sveneyem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kount-ris-php-sdk's Issues

PHP 8.2.2 Deprecation Notices

Hope your day is well!

Screenshot 2023-01-23 at 5 43 12 PM

Creation of dynamic property Kount_SimpleLogger_File::$isRisDebugEnabled is deprecated

Best,
RM

Unable to override Logger with settings

Kount version installed: 7.5.0
PHP 8.1
Laravel 9.47.0

I am unable to override the Logger settings from what is default in src/settings.ini. I have installed Kount via Composer, with Kount living in vendor/kount/kount-ris-php-sdk. When the Request object is created, it creates the logger using the default settings.ini, then loads the settings provided. At no point does it reload the logger, and there are no functions to do so:

/vendor/kount/kount-ris-php-sdk/src/Kount/Ris/Request.php:

  public function __construct($settings = null)
  {
    // Logger is created from the default settings
    $loggerFactory = Kount_Log_Factory_LogFactory::getLoggerFactory();
    $this->logger = $loggerFactory->getLogger(__CLASS__);

   // Settings are loaded from the settings.ini provided or from the ArraySettings passed in
    if ($settings instanceof Kount_Ris_ArraySettings) {
      $this->settings = $settings;
      Kount_Util_Khash::createKhash($this->settings);
    } else {
      $configReader = Kount_Util_ConfigFileReader::instance($settings);
      $this->settings = new Kount_Ris_ArraySettings($configReader->getSettings());
      Kount_Util_Khash::createKhash($this->settings);
    }

    Kount_Util_Khash::setConfigKey($this->settings->getConfigKey());
    $this->setMerchantId($this->settings->getMerchantId());
    $this->setVersion($this->settings->getVERS());
    $this->setUrl($this->settings->getRisUrl());
    if ($this->settings->getApiKey()) {
      $this->setApiKey($this->settings->getApiKey());
    } else {
      $this->setCertificate(
        $this->settings->getX509CertPath(),
        $this->settings->getX509KeyPath(),
        $this->settings->getX509Passphrase()
      );
    }
    $this->setConnectionTimeout($this->settings->getConnectionTimeout());

    // KHASH payment encoding is enabled by default.
    $this->setKhashPaymentEncoding(true);
  }

Since modifying vendor files is not at all recommended, I cannot actually enable logging.

Composer installs can't set SALT_PHRASE

Because of the addition of the SALT_PHRASE parameter, composer installs of the SDK will not work when needing the Kount_Util_Khash class. This is because the Khash class does not allow you to pass in custom settings values in the constructor, while other classes, such as Kount_Ris_Request, do.

Thus, when you use the Kount_Util_Khash::hash function, it always loads the SALT_PHRASE from the settings.ini file. However, the settings.ini file is going to be overwritten any time you update the composer package (nor will it, of course, preserve this setting across different composer installs). This makes using this file to set settings unfeasible.

The Kount_Util_Khash class needs to be able to accept custom settings.

Kount version 7.3 and Above fails while creating the Kount Khash

Hi Community, thanks in advance for all the support.

We are updating our servers to PHP 8.1 and we are reviewing all the versions of our projects.

We are using Kount SDK for PHP version 7.2, because we encounter that versions 7.3 and above fails while instantiating the kount Khash. We are using it this way.

$inquiry = new \Kount_Ris_Request_Inquiry(\Kount_Util_Khash::createKhash($myFilePath));

We receive the error:

"Argument #1 ($filename) must be of type string, Kount_Util_Khash given"

Do you have any idea why this happens? Is there a different way to prepare the Inquiry?

Thanks in Advance for all the help!
Warm Regards,
Ignacio.

Adding Code and Error Screenshots:

https://freeimage.host/i/HTPpgrQ
https://freeimage.host/i/HTPp42V

PHP8 support

Has this been tested with php8 yet? We're trying to use it but have run into a few errors:

 curl_setopt(): Argument #2 ($option) is not a valid cURL option at Kount/Ris/Request.php:318

Also, when trying to upgrade from 7.2 to 7.3 it's complaining that you're using an incompatible version of sebastian/version

Let me know if you need more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.