Skip to content

Commit

Permalink
Merge pull request #71 from mundipagg/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
michelpl authored Jun 19, 2019
2 parents 7206d55 + 8839679 commit 851e514
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mundipagg/ecommerce-module-core",
"license": "MIT",
"version": "1.10.0",
"version": "1.10.1",
"authors":[
{
"name":"MundiPagg Embeddables Team",
Expand All @@ -19,4 +19,4 @@
"Mundipagg\\Core\\Test\\": "tests"
}
}
}
}
13 changes: 9 additions & 4 deletions src/Kernel/Aggregates/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,20 @@ protected function getAntifraudMinAmount()
* @param int $antifraudMinAmount
* @throws InvalidParamException
*/
public function setAntifraudMinAmount(int $antifraudMinAmount)
public function setAntifraudMinAmount($antifraudMinAmount)
{
if ($antifraudMinAmount < 0) {
$numbers = '/([^0-9])/i';
$replace = '';

$minAmount = preg_replace($numbers, $replace, $antifraudMinAmount);

if ($minAmount < 0) {
throw new InvalidParamException(
'AntifraudMinAmount should be at least 0!',
$antifraudMinAmount
$minAmount
);
}
$this->antifraudMinAmount = $antifraudMinAmount;
$this->antifraudMinAmount = $minAmount;
}

/**
Expand Down
Loading

0 comments on commit 851e514

Please sign in to comment.