Created
December 4, 2014 03:18
-
-
Save danhstevens/274b020e8213bb95b3bd to your computer and use it in GitHub Desktop.
Kickbox - Catching an error with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
$client = new KickboxClient($api_key); | |
$kickbox = $client->kickbox(); | |
try { | |
$resp = $kickbox->verify($email); | |
print_r($resp->body); | |
} | |
catch (Exception $e) { | |
echo "Code:" . $e->getCode() . "Message:" . $e->getMessage() . PHP_EOL; | |
//Code: 403 Message: Insufficient balance | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment