public function USPSRateRequestBase::logRequest in Commerce USPS 8
Logs the request data.
1 call to USPSRateRequestBase::logRequest()
- USPSRateRequestBase::getRates in src/
USPSRateRequestBase.php - Fetch rates from the USPS API.
File
- src/
USPSRateRequestBase.php, line 164
Class
- USPSRateRequestBase
- Class USPSRateRequest.
Namespace
Drupal\commerce_uspsCode
public function logRequest() {
if (!empty($this->configuration['options']['log']['request'])) {
$request = $this->uspsRequest
->getPostData();
\Drupal::logger('commerce_usps')
->info('@message', [
'@message' => print_r($request, TRUE),
]);
}
}