From aa67786443da0465c20e3469b583a4bfe2a25c52 Mon Sep 17 00:00:00 2001 From: Bitpop Date: Tue, 24 Dec 2019 22:28:08 -0800 Subject: [PATCH] All calls now require api key All functions now need api key --- src/SendyPHP.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SendyPHP.php b/src/SendyPHP.php index 65d243a..900bf09 100644 --- a/src/SendyPHP.php +++ b/src/SendyPHP.php @@ -54,6 +54,7 @@ public function subscribe(array $values) $type = 'subscribe'; //Send the subscribe + $values = array_merge($values, array('api_key' => $this->api_key)); //add api key $result = strval($this->buildAndSend($type, $values)); //Handle results @@ -86,7 +87,7 @@ public function unsubscribe($email) $type = 'unsubscribe'; //Send the unsubscribe - $result = strval($this->buildAndSend($type, array('email' => $email))); + $result = strval($this->buildAndSend($type, array('email' => $email, 'api_key' => $this->api_key))); //add api key //Handle results switch ($result) {