Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Merge 16c8494 into c4d616e
Browse files Browse the repository at this point in the history
  • Loading branch information
stsepelin committed Jun 11, 2019
2 parents c4d616e + 16c8494 commit d99e7c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Bitpay/Client/Client.php
Expand Up @@ -197,6 +197,8 @@ public function createInvoice(InvoiceInterface $invoice)
$error_message = (!empty($body['error'])) ? $body['error'] : $error_message;
$error_message = (!empty($body['errors'])) ? $body['errors'] : $error_message;
$error_message = (is_array($error_message)) ? implode("\n", $error_message) : $error_message;

$data = isset($body['data']) ? $body['data'] : null;
if (false !== $error_message || !is_array($data)) {
throw new \Bitpay\Client\BitpayException($error_message);
}
Expand Down

0 comments on commit d99e7c6

Please sign in to comment.