2

I've installed the Kount Magento 2 Extension on Magento 2.1.3 and I am running into an RuntimeException when running the compile command:

Compilation was started.
Repositories code generation... 1/7 [====>-----------------------]  14% 1     sec 74.8 MiB
     [RuntimeException]                                                                                  
  Source class "\Kount_Log_Binding_Nop" for "Kount_Log_Binding_NopLogger"     generation does not exist.  

setup:di:compile

Any help would be appreciated. I've contacted Kount but they can't seem to pinpoint the error since they use a third party for the extension development.

1
  • As the development team of this extension, I'd like to be of any help I can. Jeremey, from the post below reached out to us directly and I see you're issue is still open. Do you still need guidance / assistance ?
    – Rob
    Commented Apr 20, 2017 at 20:12

1 Answer 1

3

I recently ran into this issue. After a bit of sleuthing, I did eventually track down that these classes are part of the PHP SDK libraries available at https://support.kount.com/Developer_Resources/Software_Development_Kits_(SDKs).

Despite being mentioned in their documentation, the packages are not composer-ready just yet. The developers, Swarming Technology, have been notified about this. Hopefully the documentation will be updated to include the necessary steps or perhaps the SDK files can be included in the module download.

Update: The official documentation now includes steps to install these SDK files. However, they now also support a Github page and Composer repository which you can use instead. This option is not included in their documentation. I've updated my below answers to include this.


Here are your options to install the Kount SDK libraries:

Integrated

To include the API files within the module directory (in order to keep it self-contained), add the SDK library files (including the autoload.php and settings.ini) somewhere, such as lib/Kount/, within the Swarming/Kount directory.

Within the Swarming/Kount/registration.php file, add a

require_once('lib/Kount/autoload.php');

The SDK API files should now load.

Autoloader (should work composer or composerless)

Composer

Kount now supports a composer package installation of their SDK.

Simply use composer require kount/kount-ris-php-sdk in your project or add "kount/kount-ris-php-sdk": "^6.5" to your composer.json "require" section and run composer update.

Composerless

The magento-composer-autoloader package (required by all versions of Magento 2) does include Magento 1.x-style autoloading within the /lib/internal directory.

Add the SDK files under /lib/internal/Kount/(Log|Ris|SimpleLogger|Util)

You may need to run composer dump-autoload, but the classes should now be autoloaded.

2
  • Jeremy, thanks for playing a little bit of deep dive Google work to get in touch with us! For future users, If anyone has issues, contact our support desk @ [email protected] and we'll be glad to help out!
    – Rob
    Commented Apr 20, 2017 at 20:15
  • Thanks, Rob. Yurii did let me know that /lib/internal works automatically. I swear I had tried this and it didn't work, but it appears to be working now. I've updated my answer to reflect this. Commented Apr 20, 2017 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.