@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | parent::setUp(); |
33 | 33 | |
34 | - $httpRequest = new HttpRequest([], [ |
|
34 | + $httpRequest = new HttpRequest([ ], [ |
|
35 | 35 | 'check_key' => $this->hash, |
36 | 36 | 'EPS_DESCRIPTION' => $this->description, |
37 | 37 | 'EPS_GUID' => $this->purse, |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | { |
55 | 55 | $data = $this->request->getData(); |
56 | 56 | |
57 | - $this->assertSame($this->description, $data['EPS_DESCRIPTION']); |
|
58 | - $this->assertSame($this->transactionId, $data['EPS_TRID']); |
|
59 | - $this->assertSame($this->hash, $data['check_key']); |
|
60 | - $this->assertSame($this->amount, $data['EPS_AMOUNT']); |
|
61 | - $this->assertSame($this->purse, $data['EPS_GUID']); |
|
62 | - $this->assertSame($this->currency, $data['EPS_CURRENCY']); |
|
57 | + $this->assertSame($this->description, $data[ 'EPS_DESCRIPTION' ]); |
|
58 | + $this->assertSame($this->transactionId, $data[ 'EPS_TRID' ]); |
|
59 | + $this->assertSame($this->hash, $data[ 'check_key' ]); |
|
60 | + $this->assertSame($this->amount, $data[ 'EPS_AMOUNT' ]); |
|
61 | + $this->assertSame($this->purse, $data[ 'EPS_GUID' ]); |
|
62 | + $this->assertSame($this->currency, $data[ 'EPS_CURRENCY' ]); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | public function testSendData() |
@@ -64,10 +64,10 @@ |
||
64 | 64 | ]); |
65 | 65 | |
66 | 66 | $this->assertTrue($response->isSuccessful()); |
67 | - $this->assertSame($this->transactionId, $response->getTransactionId()); |
|
68 | - $this->assertSame($this->transactionReference, $response->getTransactionReference()); |
|
69 | - $this->assertSame($this->amount, $response->getAmount()); |
|
70 | - $this->assertSame($this->hash, $response->getHash()); |
|
71 | - $this->assertSame($this->currency, $response->getCurrency()); |
|
67 | + $this->assertSame($this->transactionId, $response->getTransactionId()); |
|
68 | + $this->assertSame($this->transactionReference, $response->getTransactionReference()); |
|
69 | + $this->assertSame($this->amount, $response->getAmount()); |
|
70 | + $this->assertSame($this->hash, $response->getHash()); |
|
71 | + $this->assertSame($this->currency, $response->getCurrency()); |
|
72 | 72 | } |
73 | 73 | } |
@@ -31,41 +31,41 @@ |
||
31 | 31 | |
32 | 32 | public function getHash() |
33 | 33 | { |
34 | - return strtolower($this->data['check_key']); |
|
34 | + return strtolower($this->data[ 'check_key' ]); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function calculateHash() |
38 | 38 | { |
39 | - return md5($this->data['EPS_AMOUNT'] . $this->data['EPS_GUID'] . $this->data['secret']); |
|
39 | + return md5($this->data[ 'EPS_AMOUNT' ].$this->data[ 'EPS_GUID' ].$this->data[ 'secret' ]); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function isSuccessful() |
43 | 43 | { |
44 | - return $this->data['EPS_RESULT'] === 'done'; |
|
44 | + return $this->data[ 'EPS_RESULT' ] === 'done'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getTransactionId() |
48 | 48 | { |
49 | - return $this->data['EPS_TRID']; |
|
49 | + return $this->data[ 'EPS_TRID' ]; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function getTransactionReference() |
53 | 53 | { |
54 | - return $this->data['EPS_ACCNUM']; |
|
54 | + return $this->data[ 'EPS_ACCNUM' ]; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | public function getAmount() |
58 | 58 | { |
59 | - return $this->data['EPS_AMOUNT']; |
|
59 | + return $this->data[ 'EPS_AMOUNT' ]; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | public function getTestMode() |
63 | 63 | { |
64 | - return (bool) $this->data['testMode']; |
|
64 | + return (bool) $this->data[ 'testMode' ]; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function getCurrency() |
68 | 68 | { |
69 | - return $this->data['EPS_CURRENCY']; |
|
69 | + return $this->data[ 'EPS_CURRENCY' ]; |
|
70 | 70 | } |
71 | 71 | } |