Skip to content

Commit 7a9dc11

Browse files
committed
fixed compare of int and double in Saman verifyTransaction return result
1 parent 3629d1e commit 7a9dc11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Provider/SamanProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function verifyTransaction(): bool
106106
);
107107

108108
if (isset($response)) {
109-
if ($response === $this->getTransaction()->getPayableAmount()) {
109+
if ($response > 0 && ($response - $this->getTransaction()->getPayableAmount() < PHP_FLOAT_EPSILON)) {
110110
// double check the amount by transaction amount
111111
$this->getTransaction()->setCardNumber($this->getParameters('SecurePan'), false); // no save()
112112
$this->getTransaction()->setVerified(true); // save()

0 commit comments

Comments
 (0)