Skip to content

Commit 8216074

Browse files
committed
Test for PR #78 hashSecret set at AIM gateway level
1 parent 97862b7 commit 8216074

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/AIMGatewayTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public function setUp()
1919

2020
$this->gateway = new AIMGateway($this->getHttpClient(), $this->getHttpRequest());
2121

22+
$this->gateway->initialize([
23+
'hashSecret' => 'HASHYsecretyThang',
24+
]);
25+
2226
$this->purchaseOptions = array(
2327
'amount' => '10.00',
2428
'card' => $this->getValidCard(),
@@ -60,6 +64,15 @@ public function testDeveloperEndpoint()
6064
);
6165
}
6266

67+
// Added for PR #78
68+
public function testHashSecret()
69+
{
70+
$this->assertEquals(
71+
'HASHYsecretyThang',
72+
$this->gateway->getHashSecret()
73+
);
74+
}
75+
6376
private function getExpiry($card)
6477
{
6578
return str_pad($card['expiryMonth'] . $card['expiryYear'], 6, '0', STR_PAD_LEFT);

0 commit comments

Comments
 (0)