add response to system logger for subscription API calls

This commit is contained in:
David Bomba 2021-04-06 17:14:30 +10:00
parent 6b9001684e
commit 06c5cf0519

View File

@ -244,6 +244,15 @@ class SubscriptionService
} }
/* Append the response to the system logger body */
if($response) {
$status = $response->getStatusCode();
$response_body = $response->getBody();
$body = array_merge($body, ['status' => $status, 'response_body' => $response_body]);
}
$client = \App\Models\Client::find($this->decodePrimaryKey($body['client'])); $client = \App\Models\Client::find($this->decodePrimaryKey($body['client']));
SystemLogger::dispatch( SystemLogger::dispatch(