You are here

function commerce_braintree_hostedfields_library in Commerce Braintree 7.3

Same name and namespace in other branches
  1. 7.2 modules/commerce_braintree_hostedfields/commerce_braintree_hostedfields.module \commerce_braintree_hostedfields_library()

Implements hook_library().

File

modules/commerce_braintree_hostedfields/commerce_braintree_hostedfields.module, line 11
Provides integration with Braintree Hosted Fields.

Code

function commerce_braintree_hostedfields_library() {
  $path = drupal_get_path('module', 'commerce_braintree_hostedfields');
  $libraries['braintree.hostedfields'] = array(
    'title' => 'Braintree Hosted Fields',
    'website' => 'https://github.com/braintree/braintree-web',
    'version' => '2.25.0',
    'js' => array(
      'https://js.braintreegateway.com/js/braintree-2.25.0.min.js' => array(
        'type' => 'external',
      ),
      $path . '/js/commerce_braintree_hostedfields.js' => array(),
    ),
    'css' => array(
      $path . '/css/commerce_braintree_hostedfields.css' => array(),
    ),
  );
  return $libraries;
}