From 46182a7742460144e1dadb9ef5510ab00f8ac7e3 Mon Sep 17 00:00:00 2001 From: Miracle Chibuzo Date: Fri, 16 Sep 2022 16:24:06 +0100 Subject: [PATCH] upgraded minimum php version from 7.2 to 7.4 to ensure type hinting is not hindered --- composer.json | 2 +- src/Kudaping.php | 10 ++-------- src/Traits/BankList.php | 9 +++++++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index b34ac4e..762480b 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "minimum-stability": "dev", "require": { - "php": "^7.2|^8.0", + "php": "^7.4|^8.0", "illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0" }, "require-dev": { diff --git a/src/Kudaping.php b/src/Kudaping.php index 5cd4a66..fdac8a7 100644 --- a/src/Kudaping.php +++ b/src/Kudaping.php @@ -34,17 +34,11 @@ final class Kudaping public function __construct() { - /*$this->emailAddress = config('kudaping.emailAddress'); + $this->emailAddress = config('kudaping.emailAddress'); $this->apiKey = config('kudaping.apiKey'); $this->environment = config('kudaping.environment'); $this->transactionPrefix = config('kudaping.transactionPrefix'); $this->liveUrl = "https://kuda-openapi.kuda.com/v2"; - $this->testUrl = "https://kuda-openapi-uat.kudabank.com/v1";*/ - $this->emailAddress = env('KUDA_EMAIL_ADDRESS'); - $this->apiKey = env('KUDA_API_KEY'); - $this->environment = 'live'; - $this->transactionPrefix = 'kuda'; - $this->liveUrl = "https://kuda-openapi.kuda.com/v2"; - $this->testUrl = "https://kuda-openapi-uat.kudabank.com/v2"; + $this->testUrl = "https://kuda-openapi-uat.kudabank.com/v1"; } } diff --git a/src/Traits/BankList.php b/src/Traits/BankList.php index 758da61..8844027 100644 --- a/src/Traits/BankList.php +++ b/src/Traits/BankList.php @@ -8,14 +8,19 @@ trait BankList { - public function getBankList() + public function getBankList($reference = null) { + if (is_null($reference)){ + $reference = $this->generateRequestReference(); + } return [ 'body'=>$this->sendRequestWithRef( 'BANK_LIST', - $this->generateRequestReference(), + $reference, [] ), + 'param'=>[], + 'reference'=>$reference ]; } }