You are here

function commerce_authnet_requirements in Commerce Authorize.Net 8

Same name and namespace in other branches
  1. 7 commerce_authnet.install \commerce_authnet_requirements()

Implements hook_requirements().

File

./commerce_authnet.install, line 11
Contains install and update functions for Commerce Authorize.net.

Code

function commerce_authnet_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\CommerceGuys\\AuthNet\\Configuration')) {
      $requirements['commerce_authnet_library'] = [
        'description' => t('Commerce Authorize.net requires the commerceguys/authnet library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}