Skip to content

Commit

Permalink
Merge branch 'hotfix/1.10.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
legithubdeaymeric committed Oct 10, 2018
2 parents 996295c + e9eaf9b commit 2bdb70a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 1.10.1

- Fix of amount which is not a float type in api maintenance



# Version 1.10.0

- [#39](https://github.com/hipay/hipay-fullservice-sdk-php/pull/39) Merge pull request #39 (#39)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"payment method"
],
"homepage" : "https://hipay.com/product-enterprise/",
"version" : "1.10.0",
"version" : "1.10.1",
"license" : "Apache-2.0",
"authors" : [{
"name" : "HiPay",
Expand Down
4 changes: 2 additions & 2 deletions lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public function requestMaintenanceOperation(
}

if (!is_null($amount)) {
if (!is_float($amount) || $amount < 0.01) {
throw new InvalidArgumentException("Amount must be a float type and greater than 0.01");
if (is_float($amount) && $amount < 0.01) {
throw new InvalidArgumentException("Amount must be a greater than 0.01");
} else {
$maintenanceRequest->amount = $amount;
}
Expand Down

0 comments on commit 2bdb70a

Please sign in to comment.