Skip to content

Instantly share code, notes, and snippets.

@kevinwritescode
Created May 3, 2012 23:04
Show Gist options
  • Select an option

  • Save kevinwritescode/2590235 to your computer and use it in GitHub Desktop.

Select an option

Save kevinwritescode/2590235 to your computer and use it in GitHub Desktop.
<?php
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BEGIN LOGIC TO ADD ACCOUNT
try {
$accountRes = self::createAccount($productDef, '1' . $phone, $productDef['apiServiceId'], $amount, true);
} catch (Exception $e) {
switch ($e->getCode()) {
case XXXX:
// Blocked Phone Number
Plugin_Log::debug('Blocked Phone Number');
return array(
'transResult' => false,
'transCode' => 600,
'transDetail' => 'Blocked phone number.'
);
default:
//something bad must of happened while trying to talk to the NetIP API
Plugin_Log::debug('Communication error with Digitalk while creating account.');
return array(
'transResult' => false,
'transCode' => 404,
'transDetail' => 'Communication error with service while creating pin.'
);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment