You are here

function commerce_authnet_library in Commerce Authorize.Net 7

Implements hook_library().

File

./commerce_authnet.module, line 16
Implements Authorize.Net payment services for use in Drupal Commerce.

Code

function commerce_authnet_library() {
  $path = drupal_get_path('module', 'commerce_authnet');
  $libraries['commerce_authnet.acceptjs.sandbox'] = array(
    'title' => 'Accept.JS Sandbox',
    'website' => 'https://developer.authorize.net/api/reference/features/acceptjs.html',
    'version' => 'v1',
    'js' => array(
      'https://jstest.authorize.net/v1/Accept.js' => array(
        'type' => 'external',
      ),
    ),
  );
  $libraries['commerce_authnet.acceptjs.production'] = array(
    'title' => 'Accept.JS Production',
    'website' => 'https://developer.authorize.net/api/reference/features/acceptjs.html',
    'version' => 'v1',
    'js' => array(
      'https://js.authorize.net/v1/Accept.js' => array(
        'type' => 'external',
      ),
    ),
  );
  $libraries['commerce_authnet.acceptjs.accept'] = array(
    'title' => 'Accept.JS Form',
    'version' => VERSION,
    'js' => array(
      $path . '/js/commerce_authnet.form.js' => array(),
      $path . '/js/commerce_authnet.accept.form.js' => array(),
    ),
  );
  return $libraries;
}