You are here

protected function VisaCheckout::logResponse in Commerce Authorize.Net 8

Writes an API response to the log for debugging.

Parameters

\CommerceGuys\AuthNet\Response\ResponseInterface $response: The API response object.

2 calls to VisaCheckout::logResponse()
VisaCheckout::onReturn in src/Plugin/Commerce/PaymentGateway/VisaCheckout.php
Processes the "return" request.
VisaCheckout::validateConfigurationForm in src/Plugin/Commerce/PaymentGateway/VisaCheckout.php
Form validation handler.

File

src/Plugin/Commerce/PaymentGateway/VisaCheckout.php, line 279

Class

VisaCheckout
Provides the Authorize.net payment gateway.

Namespace

Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway

Code

protected function logResponse(ResponseInterface $response) {
  $message = $this
    ->describeResponse($response);
  $level = $response
    ->getResultCode() === 'Error' ? 'error' : 'info';
  $this->logger
    ->log($level, $message);
}