Skip to content

Commit 0f4a8a2

Browse files
authored
Merge pull request #9 from aimeoscom/master
Fixes isSuccessful() which returned true in almost all cases
2 parents c9705e6 + 985c582 commit 0f4a8a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Messages/NotificationValuesTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public function getApprovalCode()
168168
*/
169169
public function isSuccessful()
170170
{
171-
return $this->getTransactionState() === static::TRANSACTION_STATE_BILLED
172-
|| $this->getOperationStatus() === static::OPERATION_STATUS_OK;
171+
return $this->getOperation() === 'CONFIRMATION' && $this->getTransactionState() === static::TRANSACTION_STATE_BILLED
172+
|| $this->getReturnCode() === 'PROFILE_USED' && $this->getOperationStatus() === static::OPERATION_STATUS_OK;
173173
}
174174

175175
/**

0 commit comments

Comments
 (0)