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) {