@@ -56,8 +56,8 @@ |
||
| 56 | 56 | /** |
| 57 | 57 | * Set the unified purse. |
| 58 | 58 | * |
| 59 | - * @param string $purse merchant purse |
|
| 60 | 59 | * |
| 60 | + * @param string $value |
|
| 61 | 61 | * @return self |
| 62 | 62 | */ |
| 63 | 63 | public function setPurse($value) |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function getAssetDir() |
| 30 | 30 | { |
| 31 | - return dirname(__DIR__) . '/assets'; |
|
| 31 | + return dirname(__DIR__).'/assets'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * |
| 93 | 93 | * @return \Omnipay\ePayService\Message\PurchaseRequest |
| 94 | 94 | */ |
| 95 | - public function purchase(array $parameters = []) |
|
| 95 | + public function purchase(array $parameters = [ ]) |
|
| 96 | 96 | { |
| 97 | 97 | return $this->createRequest('\Omnipay\ePayService\Message\PurchaseRequest', $parameters); |
| 98 | 98 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | * @return \Omnipay\ePayService\Message\CompletePurchaseRequest |
| 104 | 104 | */ |
| 105 | - public function completePurchase(array $parameters = []) |
|
| 105 | + public function completePurchase(array $parameters = [ ]) |
|
| 106 | 106 | { |
| 107 | 107 | return $this->createRequest('\Omnipay\ePayService\Message\CompletePurchaseRequest', $parameters); |
| 108 | 108 | } |
@@ -64,9 +64,9 @@ |
||
| 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()); |
|
| 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 | 71 | } |
| 72 | 72 | } |
@@ -51,12 +51,12 @@ |
||
| 51 | 51 | { |
| 52 | 52 | $data = $this->request->getData(); |
| 53 | 53 | |
| 54 | - $this->assertSame($this->purse, $data['EPS_GUID']); |
|
| 55 | - $this->assertSame($this->returnUrl, $data['EPS_SUCCESS_URL']); |
|
| 56 | - $this->assertSame($this->cancelUrl, $data['EPS_FAIL_URL']); |
|
| 57 | - $this->assertSame($this->notifyUrl, $data['EPS_RESULT_URL']); |
|
| 58 | - $this->assertSame($this->description, $data['EPS_DESCRIPTION']); |
|
| 59 | - $this->assertSame($this->amount, $data['EPS_AMOUNT']); |
|
| 54 | + $this->assertSame($this->purse, $data[ 'EPS_GUID' ]); |
|
| 55 | + $this->assertSame($this->returnUrl, $data[ 'EPS_SUCCESS_URL' ]); |
|
| 56 | + $this->assertSame($this->cancelUrl, $data[ 'EPS_FAIL_URL' ]); |
|
| 57 | + $this->assertSame($this->notifyUrl, $data[ 'EPS_RESULT_URL' ]); |
|
| 58 | + $this->assertSame($this->description, $data[ 'EPS_DESCRIPTION' ]); |
|
| 59 | + $this->assertSame($this->amount, $data[ 'EPS_AMOUNT' ]); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function testSendData() |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | parent::setUp(); |
| 35 | 35 | |
| 36 | - $httpRequest = new HttpRequest([], [ |
|
| 36 | + $httpRequest = new HttpRequest([ ], [ |
|
| 37 | 37 | 'check_key' => $this->hash, |
| 38 | 38 | 'EPS_DESCRIPTION' => $this->description, |
| 39 | 39 | 'EPS_GUID' => $this->purse, |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $data = $this->request->getData(); |
| 57 | 57 | |
| 58 | - $this->assertSame($this->description, $data['EPS_DESCRIPTION']); |
|
| 59 | - $this->assertSame($this->transactionId, $data['EPS_TRID']); |
|
| 60 | - $this->assertSame($this->hash, $data['check_key']); |
|
| 61 | - $this->assertSame($this->amount, $data['EPS_AMOUNT']); |
|
| 62 | - $this->assertSame($this->purse, $data['EPS_GUID']); |
|
| 58 | + $this->assertSame($this->description, $data[ 'EPS_DESCRIPTION' ]); |
|
| 59 | + $this->assertSame($this->transactionId, $data[ 'EPS_TRID' ]); |
|
| 60 | + $this->assertSame($this->hash, $data[ 'check_key' ]); |
|
| 61 | + $this->assertSame($this->amount, $data[ 'EPS_AMOUNT' ]); |
|
| 62 | + $this->assertSame($this->purse, $data[ 'EPS_GUID' ]); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function testSendData() |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function testGateway() |
| 39 | 39 | { |
| 40 | - $this->assertSame($this->purse, $this->gateway->getPurse()); |
|
| 41 | - $this->assertSame($this->secret, $this->gateway->getSecret()); |
|
| 42 | - $this->assertSame($this->testMode, $this->gateway->getTestMode()); |
|
| 40 | + $this->assertSame($this->purse, $this->gateway->getPurse()); |
|
| 41 | + $this->assertSame($this->secret, $this->gateway->getSecret()); |
|
| 42 | + $this->assertSame($this->testMode, $this->gateway->getTestMode()); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function testCompletePurchase() |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | 'transactionId' => $this->transactionId, |
| 49 | 49 | ]); |
| 50 | 50 | |
| 51 | - $this->assertSame($this->purse, $request->getPurse()); |
|
| 52 | - $this->assertSame($this->secret, $request->getSecret()); |
|
| 53 | - $this->assertSame($this->testMode, $request->getTestMode()); |
|
| 51 | + $this->assertSame($this->purse, $request->getPurse()); |
|
| 52 | + $this->assertSame($this->secret, $request->getSecret()); |
|
| 53 | + $this->assertSame($this->testMode, $request->getTestMode()); |
|
| 54 | 54 | $this->assertSame($this->transactionId, $request->getTransactionId()); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | ]); |
| 65 | 65 | |
| 66 | 66 | $this->assertSame($this->transactionId, $request->getTransactionId()); |
| 67 | - $this->assertSame($this->description, $request->getDescription()); |
|
| 68 | - $this->assertSame($this->currency, $request->getCurrency()); |
|
| 69 | - $this->assertSame($this->amount, $request->getAmount()); |
|
| 67 | + $this->assertSame($this->description, $request->getDescription()); |
|
| 68 | + $this->assertSame($this->currency, $request->getCurrency()); |
|
| 69 | + $this->assertSame($this->amount, $request->getAmount()); |
|
| 70 | 70 | } |
| 71 | 71 | } |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function getHash() |
| 34 | 34 | { |
| 35 | - return strtolower($this->data['check_key']); |
|
| 35 | + return strtolower($this->data[ 'check_key' ]); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function calculateHash() |
| 39 | 39 | { |
| 40 | - return md5($this->data['EPS_AMOUNT'] . $this->data['EPS_GUID'] . $this->data['secret']); |
|
| 40 | + return md5($this->data[ 'EPS_AMOUNT' ].$this->data[ 'EPS_GUID' ].$this->data[ 'secret' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function isSuccessful() |
@@ -47,21 +47,21 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function getTransactionId() |
| 49 | 49 | { |
| 50 | - return $this->data['EPS_TRID']; |
|
| 50 | + return $this->data[ 'EPS_TRID' ]; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function getTransactionReference() |
| 54 | 54 | { |
| 55 | - return $this->data['EPS_ACCNUM']; |
|
| 55 | + return $this->data[ 'EPS_ACCNUM' ]; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | public function getAmount() |
| 59 | 59 | { |
| 60 | - return $this->data['EPS_AMOUNT']; |
|
| 60 | + return $this->data[ 'EPS_AMOUNT' ]; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function getTestMode() |
| 64 | 64 | { |
| 65 | - return (bool) $this->data['testMode']; |
|
| 65 | + return (bool) $this->data[ 'testMode' ]; |
|
| 66 | 66 | } |
| 67 | 67 | } |