Skip to content

Commit

Permalink
Remove isCancelled check
Browse files Browse the repository at this point in the history
- Status '11' is indicating payment error not cancelled
  • Loading branch information
Lee Siong Chan committed Apr 5, 2016
1 parent 22f2ca4 commit b626d82
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
8 changes: 0 additions & 8 deletions src/Message/CompletePurchaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ public function isCallbackNotification()
return '1' === $this->getRequest()->getNBCB();
}

/**
* {@inheritdoc}
*/
public function isCancelled()
{
return '11' === $this->getRequest()->getStatus();
}

/**
* {@inheritdoc}
*/
Expand Down
14 changes: 0 additions & 14 deletions tests/Message/CompletePurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ public function testSendSuccess()
$this->assertTrue($response->isSuccessful());
}

public function testSendCancel()
{
$this->request->setStatus('11');
$this->request->setSKey('1298d6c091a476a8e995051eb9d66805');

$response = $this->request->send();

$this->assertEquals('000001', $response->getTransactionReference());
$this->assertTrue($response->isCancelled());
$this->assertFalse($response->isPending());
$this->assertFalse($response->isRedirect());
$this->assertFalse($response->isSuccessful());
}

public function testSendPending()
{
$this->request->setStatus('22');
Expand Down
7 changes: 0 additions & 7 deletions tests/Message/CompletePurchaseResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ public function testCompletePurchaseSuccess()
$this->assertEquals('000001', $this->response->getTransactionReference());
}

public function testCompletePurchaseCancel()
{
$this->getMockRequest()->shouldReceive('getStatus')->andReturn('11');

$this->assertTrue($this->response->isCancelled());
}

public function testCompletePurchasePending()
{
$this->getMockRequest()->shouldReceive('getStatus')->andReturn('22');
Expand Down

0 comments on commit b626d82

Please sign in to comment.