diff --git a/src/Entity/SaferPayAssert.php b/src/Entity/SaferPayAssert.php index e5f9a03f..bcbf297e 100755 --- a/src/Entity/SaferPayAssert.php +++ b/src/Entity/SaferPayAssert.php @@ -55,7 +55,7 @@ class SaferPayAssert extends ObjectModel 'primary' => 'id_saferpay_assert', 'fields' => [ 'id_saferpay_order' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], - 'amount' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], + 'amount' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], 'status' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'exp_year' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], 'exp_month' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], diff --git a/src/EntityBuilder/SaferPayAssertBuilder.php b/src/EntityBuilder/SaferPayAssertBuilder.php index 0dcd1933..cc6c6218 100755 --- a/src/EntityBuilder/SaferPayAssertBuilder.php +++ b/src/EntityBuilder/SaferPayAssertBuilder.php @@ -44,7 +44,7 @@ public function createAssert(AssertBody $assertBody, $saferPayOrderId) $assert = new SaferPayAssert(); $assert->id_saferpay_order = $saferPayOrderId; - $assert->amount = $assertBody->getTransaction()->getAmount()->getValue(); + $assert->amount = (int) $assertBody->getTransaction()->getAmount()->getValue(); $assert->status = $assertBody->getTransaction()->getStatus(); $assert->authorized = 1; //If creating assert, it must be authorized. diff --git a/src/EntityBuilder/SaferPayAssertRefundBuilder.php b/src/EntityBuilder/SaferPayAssertRefundBuilder.php index 4dada93a..182e3f17 100755 --- a/src/EntityBuilder/SaferPayAssertRefundBuilder.php +++ b/src/EntityBuilder/SaferPayAssertRefundBuilder.php @@ -45,7 +45,7 @@ public function createAssertRefund(AssertRefundBody $assertBody, $saferPayOrderI $assert = new SaferPayAssert(); $assert->id_saferpay_order = $saferPayOrderId; - $assert->amount = $assertBody->getTransaction()->getAmount()->getValue(); + $assert->amount = (int) $assertBody->getTransaction()->getAmount()->getValue(); $assert->status = $assertBody->getTransaction()->getStatus(); $assert->authorized = 1; //If creating assert, it must be authorized.