Skip to content
Snippets Groups Projects
Commit e30b8a70 authored by Jonathan Sacksick's avatar Jonathan Sacksick
Browse files

Issue #3347009: Canceling an order causes fatal error.

parent 143bfcae
No related branches found
No related tags found
No related merge requests found
Pipeline #275823 canceled
......@@ -186,7 +186,7 @@ class AvataxLib implements AvataxLibInterface {
}
$transaction_code = 'DC-' . $order->uuid();
return $this->doRequest('POST', "api/v2/companies/$company_code/transactions/$transaction_code/void", [
$this->doRequest('POST', "api/v2/companies/$company_code/transactions/$transaction_code/void", [
'json' => [
'code' => 'DocVoided',
],
......@@ -614,7 +614,7 @@ class AvataxLib implements AvataxLibInterface {
$this->logger->error($e->getMessage());
}
return $response_body;
return !is_array($response_body) ? [] : $response_body;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment