You are here

commerce_authnet.install in Commerce Authorize.Net 8

Same filename and directory in other branches
  1. 7 commerce_authnet.install

Contains install and update functions for Commerce Authorize.net.

File

commerce_authnet.install
View source
<?php

/**
 * @file
 * Contains install and update functions for Commerce Authorize.net.
 */

/**
 * Implements hook_requirements().
 */
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;
}

Functions