@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | |
247 | 247 | if (!$fee_bearer) { |
248 | 248 | throw new IsNull("Error Processing Request - Null Fee Bearer"); |
249 | - }elseif (!in_array($fee_bearer, $valid_fee_bearers)) { |
|
249 | + } elseif (!in_array($fee_bearer, $valid_fee_bearers)) { |
|
250 | 250 | throw new InvalidFeeBearer("Invalid Fee Bearer - Use either 'account' or 'client'"); |
251 | 251 | } |
252 | 252 | |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | |
502 | 502 | if(!$channel){ |
503 | 503 | throw new IsNull("Error Processing Request - Null/Invalid amount"); |
504 | - }elseif (!in_array(ucfirst($channel), $valid_channels)) { |
|
504 | + } elseif (!in_array(ucfirst($channel), $valid_channels)) { |
|
505 | 505 | throw new IsInvalid("Invalid Channel - Cash, BankTransfer, POS or Cheque"); |
506 | 506 | } |
507 | 507 | |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | |
605 | 605 | if(!$type){ |
606 | 606 | throw new IsNull("Error Processing Request - Null/Invalid type"); |
607 | - }elseif (!in_array(strtolower($type), $valid_product_type)) { |
|
607 | + } elseif (!in_array(strtolower($type), $valid_product_type)) { |
|
608 | 608 | throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'"); |
609 | 609 | } |
610 | 610 | |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | |
662 | 662 | if (!$product_type) { |
663 | 663 | throw new IsNull("Error Processing Request - Null/Invalid type"); |
664 | - }elseif (!in_array($product_type, $valid_product_type)) { |
|
664 | + } elseif (!in_array($product_type, $valid_product_type)) { |
|
665 | 665 | throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'"); |
666 | 666 | } |
667 | 667 | |
@@ -721,17 +721,16 @@ discard block |
||
721 | 721 | try{ |
722 | 722 | if (strtolower($method) == 'get'){ |
723 | 723 | $result = $this->client->request('GET', $url); |
724 | - }elseif (strtolower($method) == 'post'){ |
|
724 | + } elseif (strtolower($method) == 'post'){ |
|
725 | 725 | $result = $this->client->request('POST', $url, $params); |
726 | - }elseif (strtolower($method) == 'put'){ |
|
726 | + } elseif (strtolower($method) == 'put'){ |
|
727 | 727 | $result = $this->client->request('PUT', $url, $params); |
728 | - }elseif (strtolower($method) == 'delete'){ |
|
728 | + } elseif (strtolower($method) == 'delete'){ |
|
729 | 729 | $result = $this->client->request('DELETE', $url); |
730 | 730 | } |
731 | 731 | |
732 | 732 | return cleanResponse($result); |
733 | - } |
|
734 | - catch( Exception $e){ |
|
733 | + } catch( Exception $e){ |
|
735 | 734 | throw $e; |
736 | 735 | } |
737 | 736 | } |