Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Nov 11, 2023
1 parent fb1249e commit 7431054
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions tests/GatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Omnipay\ECPay\Tests;

use Omnipay\Common\Message\NotificationInterface;
use Omnipay\ECPay\Gateway;
use Omnipay\ECPay\Tests\Stubs\StubGateway;
use Omnipay\Tests\GatewayTestCase;
Expand Down Expand Up @@ -89,11 +90,11 @@ public function testAcceptNotification()
'TradeNo' => '1909021549160081',
'CheckMacValue' => 'E7EC8DDC6C5C51B1A4D8BEA261246066858B38184C55FD3DD3D6DFF53F535A64',
]);
$response = $this->gateway->acceptNotification()->send();
$notification = $this->gateway->acceptNotification();

self::assertTrue($response->isSuccessful());
self::assertEquals('Succeeded', $response->getMessage());
self::assertEquals('1|OK', $response->getReply());
self::assertEquals(NotificationInterface::STATUS_COMPLETED, $notification->getTransactionStatus());
self::assertEquals('Succeeded', $notification->getMessage());
self::assertEquals('1|OK', $notification->getReply());
}

public function testFetchTransaction()
Expand Down
8 changes: 4 additions & 4 deletions tests/Message/AcceptNotificationRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ public function testInvalidCheckMacValue()
];

$this->getHttpRequest()->request->add($data);
$request = new AcceptNotificationRequest($this->getHttpClient(), $this->getHttpRequest());
$request->initialize([
$notification = new AcceptNotificationRequest($this->getHttpClient(), $this->getHttpRequest());
$notification->initialize([
'HashKey' => '5294y06JbISpM5x9',
'HashIV' => 'v77hoKGq4kWxNNIS',
'EncryptType' => '1',
'MerchantID' => '2000132',
]);
$request->setTestMode(true);
$request->send();
$notification->setTestMode(true);
$notification->getTransactionStatus();
}
}

0 comments on commit 7431054

Please sign in to comment.