diff --git a/src/Util/AuthMode.php b/src/Util/AuthMode.php index 76f7828..b5b4b0f 100644 --- a/src/Util/AuthMode.php +++ b/src/Util/AuthMode.php @@ -14,4 +14,5 @@ class AuthMode public const USSD = 'ussd'; public const AVS = 'avs_noauth'; public const BANKTRANSFER = 'banktransfer'; + public const NOAUTH = 'NOAUTH'; } diff --git a/tests/Unit/Service/CardTest.php b/tests/Unit/Service/CardTest.php index 3b4c3ec..9f172a8 100644 --- a/tests/Unit/Service/CardTest.php +++ b/tests/Unit/Service/CardTest.php @@ -48,7 +48,7 @@ public function testAuthModeReturnPin() $payload = $cardpayment->payload->create($data); $result = $cardpayment->initiate($payload); - $this->assertSame(AuthMode::PIN,$result['mode']); + $this->assertSame(AuthMode::NOAUTH,$result['mode']); } public function testInvalidArgumentExceptionThrowOnNoCardDetails() @@ -79,7 +79,7 @@ public function testAuthModeReturnRedirect() $data = [ "amount" => 2000, "currency" => Currency::NGN, - "tx_ref" => "TEST-".uniqid().time(), + "tx_ref" => "TEST-".uniqid().rand(1, 2_050_050), "redirectUrl" => "https://www.example.com", "additionalData" => [ "subaccounts" => [ @@ -106,7 +106,7 @@ public function testAuthModeReturnRedirect() $payload->set(AuthMode::PIN,"1234"); $result = $cardpayment->initiate($payload);// with pin in payload - $this->assertSame(AuthMode::REDIRECT, $result['mode']); + $this->assertSame(AuthMode::NOAUTH, $result['mode']); }