Skip to content

Commit

Permalink
Merge pull request #34 from BitpopCoin/patch-1
Browse files Browse the repository at this point in the history
All calls now require api key
  • Loading branch information
JacobBennett authored Jan 22, 2021
2 parents 42deb7d + aa67786 commit 590ae66
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 590ae66

Please sign in to comment.