Skip to content

Commit

Permalink
Merge pull request #9 from aimeoscom/master
Browse files Browse the repository at this point in the history
Fixes isSuccessful() which returned true in almost all cases
  • Loading branch information
judgej authored Jun 12, 2020
2 parents c9705e6 + 985c582 commit 0f4a8a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Messages/NotificationValuesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ public function getApprovalCode()
*/
public function isSuccessful()
{
return $this->getTransactionState() === static::TRANSACTION_STATE_BILLED
|| $this->getOperationStatus() === static::OPERATION_STATUS_OK;
return $this->getOperation() === 'CONFIRMATION' && $this->getTransactionState() === static::TRANSACTION_STATE_BILLED
|| $this->getReturnCode() === 'PROFILE_USED' && $this->getOperationStatus() === static::OPERATION_STATUS_OK;
}

/**
Expand Down

0 comments on commit 0f4a8a2

Please sign in to comment.