You are here

public function AcceptJs::getCcaApiKey in Commerce Authorize.Net 8

Get the CCA API Key.

Return value

string The CCA API Key.

1 call to AcceptJs::getCcaApiKey()
AcceptJs::createPaymentMethod in src/Plugin/Commerce/PaymentGateway/AcceptJs.php
@todo Needs kernel test

File

src/Plugin/Commerce/PaymentGateway/AcceptJs.php, line 193

Class

AcceptJs
Provides the Accept.js payment gateway.

Namespace

Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway

Code

public function getCcaApiKey() {
  if ($this->configuration['cca_status']) {

    // Test API Key.
    // @see https://developer.cardinalcommerce.com/try-it-now.shtml
    if ($this->configuration['mode'] == 'test') {
      return '754be3dc-10b7-471f-af31-f20ce12b9ec1';
    }
    else {
      return $this->configuration['cca_api_key'];
    }
  }
}