| @@ -2,7 +2,6 @@ | ||
| 2 | 2 | namespace Olaoluwa98\Payant; | 
| 3 | 3 | |
| 4 | 4 | use \Exception as phpException; | 
| 5 | -use Olaoluwa98\Payant\Exception; | |
| 6 | 5 | |
| 7 | 6 |  if (! function_exists('array_get')) | 
| 8 | 7 |  { | 
| @@ -237,7 +237,7 @@ discard block | ||
| 237 | 237 | |
| 238 | 238 |          if(!$fee_bearer){ | 
| 239 | 239 |              throw new Exception\IsNull("Error Processing Request - Null Fee Bearer"); | 
| 240 | -        }elseif (!in_array($fee_bearer, $valid_fee_bearers)) { | |
| 240 | +        } elseif (!in_array($fee_bearer, $valid_fee_bearers)) { | |
| 241 | 241 |              throw new Exception\InvalidFeeBearer("Invalid Fee Bearer - Use either 'account' or 'client'"); | 
| 242 | 242 | } | 
| 243 | 243 | |
| @@ -379,7 +379,7 @@ discard block | ||
| 379 | 379 | |
| 380 | 380 |          if(!$channel){ | 
| 381 | 381 |              throw new Exception\IsNull("Error Processing Request - Null/Invalid amount"); | 
| 382 | -        }elseif (!in_array(ucfirst($channel), $valid_channels)) { | |
| 382 | +        } elseif (!in_array(ucfirst($channel), $valid_channels)) { | |
| 383 | 383 |              throw new Exception\IsInvalid("Invalid Channel - Cash, BankTransfer, POS or Cheque"); | 
| 384 | 384 | } | 
| 385 | 385 | |
| @@ -482,7 +482,7 @@ discard block | ||
| 482 | 482 | |
| 483 | 483 |          if(!$type){ | 
| 484 | 484 |              throw new Exception\IsNull("Error Processing Request - Null/Invalid type"); | 
| 485 | -        }elseif (!in_array(strtolower($type), $valid_product_type)) { | |
| 485 | +        } elseif (!in_array(strtolower($type), $valid_product_type)) { | |
| 486 | 486 |              throw new Exception\IsInvalid("Invalid Type - Available options: 'product' or 'service'"); | 
| 487 | 487 | } | 
| 488 | 488 | |
| @@ -539,7 +539,7 @@ discard block | ||
| 539 | 539 | |
| 540 | 540 |          if(!$product_type){ | 
| 541 | 541 |              throw new Exception\IsNull("Error Processing Request - Null/Invalid type"); | 
| 542 | -        }elseif (!in_array($product_type, $valid_product_type)) { | |
| 542 | +        } elseif (!in_array($product_type, $valid_product_type)) { | |
| 543 | 543 |              throw new Exception\IsInvalid("Invalid Type - Available options: 'product' or 'service'"); | 
| 544 | 544 | } | 
| 545 | 545 | |
| @@ -599,17 +599,16 @@ discard block | ||
| 599 | 599 |          try{ | 
| 600 | 600 |              if (strtolower($method) == 'get'){ | 
| 601 | 601 |                  $result = $this->client->request('GET', $url); | 
| 602 | -            }elseif (strtolower($method) == 'post'){ | |
| 602 | +            } elseif (strtolower($method) == 'post'){ | |
| 603 | 603 |                  $result = $this->client->request('POST', $url, $params); | 
| 604 | -            }elseif (strtolower($method) == 'put'){ | |
| 604 | +            } elseif (strtolower($method) == 'put'){ | |
| 605 | 605 |                  $result = $this->client->request('PUT', $url, $params); | 
| 606 | -            }elseif (strtolower($method) == 'delete'){ | |
| 606 | +            } elseif (strtolower($method) == 'delete'){ | |
| 607 | 607 |                  $result = $this->client->request('DELETE', $url); | 
| 608 | 608 | } | 
| 609 | 609 | |
| 610 | 610 | return cleanResponse($result); | 
| 611 | - } | |
| 612 | -        catch( Exception $e){ | |
| 611 | +        } catch( Exception $e){ | |
| 613 | 612 | throw $e; | 
| 614 | 613 | } | 
| 615 | 614 | } |