You are here

public function USPSRateRequestBase::logResponse in Commerce USPS 8

Logs the response data.

1 call to USPSRateRequestBase::logResponse()
USPSRateRequestBase::getRates in src/USPSRateRequestBase.php
Fetch rates from the USPS API.

File

src/USPSRateRequestBase.php, line 174

Class

USPSRateRequestBase
Class USPSRateRequest.

Namespace

Drupal\commerce_usps

Code

public function logResponse() {
  if (!empty($this->configuration['options']['log']['response'])) {
    \Drupal::logger('commerce_usps')
      ->info('@message', [
      '@message' => print_r($this->uspsRequest
        ->getResponse(), TRUE),
    ]);
  }
}