Created
May 3, 2012 23:04
-
-
Save kevinwritescode/2590235 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
| // 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