From ca93ec643ab999f2ea7e9ef46b1c520698faac30 Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Fri, 5 Feb 2016 18:18:38 +0000 Subject: [PATCH 1/3] added CompletePurchaseResponse::getCurrency --- src/Message/CompletePurchaseResponse.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Message/CompletePurchaseResponse.php b/src/Message/CompletePurchaseResponse.php index 0e0bf4e..6d54a90 100644 --- a/src/Message/CompletePurchaseResponse.php +++ b/src/Message/CompletePurchaseResponse.php @@ -55,6 +55,11 @@ public function getAmount() return $this->data['LMI_PAYMENT_AMOUNT']; } + public function getCurrency() + { + return $this->request->getCurrencyByPurse($this->data['LMI_PAYEE_PURSE']); + } + public function getTestMode() { return (bool) $this->getMode(); From 42a90030b5f8ca76efcf6689630339f8ef5c8cea Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Sat, 6 Feb 2016 15:34:15 +0000 Subject: [PATCH 2/3] + test for CompletePurchaseResponse::getCurrency --- tests/Message/CompletePurchaseResponseTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Message/CompletePurchaseResponseTest.php b/tests/Message/CompletePurchaseResponseTest.php index 75b0f8b..7360f29 100644 --- a/tests/Message/CompletePurchaseResponseTest.php +++ b/tests/Message/CompletePurchaseResponseTest.php @@ -90,6 +90,7 @@ public function testSuccess() $this->assertSame('892', $response->getTransactionReference()); $this->assertSame('Z123428476799', $response->getMerchantPurse()); $this->assertSame('14.65', $response->getAmount()); + $this->assertSame('USD', $response->getCurrency()); $this->assertTrue($response->getTestMode()); $this->assertSame('1', $response->getMode()); $this->assertSame('0B12E75431284D6FCC05D8AF02B90AC28A0788FB95C9FF6B655344022F0746E5', $response->getHash()); @@ -122,6 +123,7 @@ public function testSha256Hash() $this->assertSame('892', $response->getTransactionReference()); $this->assertSame('Z123428476799', $response->getMerchantPurse()); $this->assertSame('14.65', $response->getAmount()); + $this->assertSame('USD', $response->getCurrency()); $this->assertTrue($response->getTestMode()); $this->assertSame('1', $response->getMode()); $this->assertSame('sha256', $response->getHashType()); @@ -155,6 +157,7 @@ public function testMd5Hash() $this->assertSame('892', $response->getTransactionReference()); $this->assertSame('Z123428476799', $response->getMerchantPurse()); $this->assertSame('14.65', $response->getAmount()); + $this->assertSame('USD', $response->getCurrency()); $this->assertTrue($response->getTestMode()); $this->assertSame('1', $response->getMode()); $this->assertSame('md5', $response->getHashType()); From 67b7b20e612330cc23562d54ed2658264ae5d00c Mon Sep 17 00:00:00 2001 From: Andrii Vasyliev Date: Tue, 9 Feb 2016 07:09:47 +0000 Subject: [PATCH 3/3] changed composer.json to require satooshi/php-coveralls version 1.0.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c675925..13d18d6 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "omnipay/tests": "~2.0", - "satooshi/php-coveralls": "dev-master" + "satooshi/php-coveralls": "1.0.0" }, "extra": { "branch-alias": {