You are here

public function OnsiteBase::__construct in Commerce Authorize.Net 8

Constructs a new PaymentGatewayBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\commerce_payment\PaymentTypeManager $payment_type_manager: The payment type manager.

\Drupal\commerce_payment\PaymentMethodTypeManager $payment_method_type_manager: The payment method type manager.

\Drupal\Component\Datetime\TimeInterface $time: The time.

\Drupal\commerce_price\MinorUnitsConverterInterface $minor_units_converter: The minor units converter.

Overrides PaymentGatewayBase::__construct

File

src/Plugin/Commerce/PaymentGateway/OnsiteBase.php, line 89

Class

OnsiteBase
Provides the Authorize.net payment gateway base class.

Namespace

Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, PaymentTypeManager $payment_type_manager, PaymentMethodTypeManager $payment_method_type_manager, TimeInterface $time, MinorUnitsConverterInterface $minor_units_converter, ClientInterface $client, LoggerInterface $logger, PrivateTempStoreFactory $private_tempstore, AdjustmentTransformerInterface $adjustment_transformer, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $payment_type_manager, $payment_method_type_manager, $time, $minor_units_converter);
  $this->httpClient = $client;
  $this->logger = $logger;
  $this->authnetConfiguration = new Configuration([
    'sandbox' => $this
      ->getMode() == 'test',
    'api_login' => $this->configuration['api_login'],
    'transaction_key' => $this->configuration['transaction_key'],
    'client_key' => $this->configuration['client_key'],
  ]);
  $this->privateTempStore = $private_tempstore;
  $this->adjustmentTransformer = $adjustment_transformer;
  $this->messenger = $messenger;
}