Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Util/AuthMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ class AuthMode
public const USSD = 'ussd';
public const AVS = 'avs_noauth';
public const BANKTRANSFER = 'banktransfer';
public const NOAUTH = 'NOAUTH';
}
6 changes: 3 additions & 3 deletions tests/Unit/Service/CardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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" => [
Expand All @@ -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']);

}

Expand Down
Loading