| @@ -13,10 +13,7 @@ | ||
| 13 | 13 | |
| 14 | 14 | use GuzzleHttp\Client; | 
| 15 | 15 | use Illuminate\Support\Facades\Config; | 
| 16 | -use Olaoluwa98\Payant\Exceptions\ApiRequestError; | |
| 17 | -use Olaoluwa98\Payant\Exceptions\InvalidCredentials; | |
| 18 | 16 | use Olaoluwa98\Payant\Exceptions\InvalidFeeBearer; | 
| 19 | -use Olaoluwa98\Payant\Exceptions\InvalidParameterType; | |
| 20 | 17 | use Olaoluwa98\Payant\Exceptions\IsInvalid; | 
| 21 | 18 | use Olaoluwa98\Payant\Exceptions\IsNull; | 
| 22 | 19 | use Olaoluwa98\Payant\Exceptions\IsNullOrInvalid; | 
| @@ -245,7 +245,7 @@ discard block | ||
| 245 | 245 | |
| 246 | 246 |          if(!$fee_bearer){ | 
| 247 | 247 |              throw new IsNull("Error Processing Request - Null Fee Bearer"); | 
| 248 | -        }elseif (!in_array($fee_bearer, $valid_fee_bearers)) { | |
| 248 | +        } elseif (!in_array($fee_bearer, $valid_fee_bearers)) { | |
| 249 | 249 |              throw new InvalidFeeBearer("Invalid Fee Bearer - Use either 'account' or 'client'"); | 
| 250 | 250 | } | 
| 251 | 251 | |
| @@ -387,7 +387,7 @@ discard block | ||
| 387 | 387 | |
| 388 | 388 |          if(!$channel){ | 
| 389 | 389 |              throw new IsNull("Error Processing Request - Null/Invalid amount"); | 
| 390 | -        }elseif (!in_array(ucfirst($channel), $valid_channels)) { | |
| 390 | +        } elseif (!in_array(ucfirst($channel), $valid_channels)) { | |
| 391 | 391 |              throw new IsInvalid("Invalid Channel - Cash, BankTransfer, POS or Cheque"); | 
| 392 | 392 | } | 
| 393 | 393 | |
| @@ -490,7 +490,7 @@ discard block | ||
| 490 | 490 | |
| 491 | 491 |          if(!$type){ | 
| 492 | 492 |              throw new IsNull("Error Processing Request - Null/Invalid type"); | 
| 493 | -        }elseif (!in_array(strtolower($type), $valid_product_type)) { | |
| 493 | +        } elseif (!in_array(strtolower($type), $valid_product_type)) { | |
| 494 | 494 |              throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'"); | 
| 495 | 495 | } | 
| 496 | 496 | |
| @@ -547,7 +547,7 @@ discard block | ||
| 547 | 547 | |
| 548 | 548 |          if(!$product_type){ | 
| 549 | 549 |              throw new IsNull("Error Processing Request - Null/Invalid type"); | 
| 550 | -        }elseif (!in_array($product_type, $valid_product_type)) { | |
| 550 | +        } elseif (!in_array($product_type, $valid_product_type)) { | |
| 551 | 551 |              throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'"); | 
| 552 | 552 | } | 
| 553 | 553 | |
| @@ -607,17 +607,16 @@ discard block | ||
| 607 | 607 |          try{ | 
| 608 | 608 |              if (strtolower($method) == 'get'){ | 
| 609 | 609 |                  $result = $this->client->request('GET', $url); | 
| 610 | -            }elseif (strtolower($method) == 'post'){ | |
| 610 | +            } elseif (strtolower($method) == 'post'){ | |
| 611 | 611 |                  $result = $this->client->request('POST', $url, $params); | 
| 612 | -            }elseif (strtolower($method) == 'put'){ | |
| 612 | +            } elseif (strtolower($method) == 'put'){ | |
| 613 | 613 |                  $result = $this->client->request('PUT', $url, $params); | 
| 614 | -            }elseif (strtolower($method) == 'delete'){ | |
| 614 | +            } elseif (strtolower($method) == 'delete'){ | |
| 615 | 615 |                  $result = $this->client->request('DELETE', $url); | 
| 616 | 616 | } | 
| 617 | 617 | |
| 618 | 618 | return cleanResponse($result); | 
| 619 | - } | |
| 620 | -        catch( Exception $e){ | |
| 619 | +        } catch( Exception $e){ | |
| 621 | 620 | throw $e; | 
| 622 | 621 | } | 
| 623 | 622 | } |