From 772c5073fc820ddf06936f539ac4b48a7481c203 Mon Sep 17 00:00:00 2001 From: Wisdom Anthony Ebong Date: Thu, 27 Feb 2020 16:54:13 +0100 Subject: [PATCH] Update Invoices.php --- src/Api/Invoices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Invoices.php b/src/Api/Invoices.php index 2828030..6e2e84d 100644 --- a/src/Api/Invoices.php +++ b/src/Api/Invoices.php @@ -194,7 +194,7 @@ public function create(array $parameters) $response = $this->post(self::BASE_PATH, $parameters); if ($response['status'] ?? null) { - $this->fire(PaystackEventType::INVOICE_CREATED, $response['data']); + $this->fire(PaystackEventType::INVOICE_CREATED, $response['data'] ?? null); } else { $this->fire(PaystackEventType::INVOICE_FAILED, $response['data'] ?? null); }