public function AcceptJs::getJsLibrary in Commerce Authorize.Net 8
Gets the JS library ID.
This is usually an external library defined in the module's libraries.yml file. Included by the PaymentInformation pane to get around core bug #1988968. Example: 'commerce_braintree/braintree'.
Return value
string|null The JS library ID, or NULL if not available.
Overrides PaymentGatewayBase::getJsLibrary
File
- src/
Plugin/ Commerce/ PaymentGateway/ AcceptJs.php, line 209
Class
- AcceptJs
- Provides the Accept.js payment gateway.
Namespace
Drupal\commerce_authnet\Plugin\Commerce\PaymentGatewayCode
public function getJsLibrary() {
if ($this->configuration['cca_status']) {
if ($this
->getMode() === 'test') {
return 'commerce_authnet/cardinalcruise-dev';
}
return 'commerce_authnet/cardinalcruise';
}
return 'commerce_authnet/form-accept';
}