Skip to content

Commit

Permalink
All calls now require api key
Browse files Browse the repository at this point in the history
All functions now need api key
  • Loading branch information
BitPopCoin authored Dec 25, 2019
1 parent 42deb7d commit aa67786
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SendyPHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit aa67786

Please sign in to comment.