Skip to content

Commit

Permalink
Merge pull request #111 from vippsas/publication-2.2.16
Browse files Browse the repository at this point in the history
VIPPS-390: Skip Capture for discounted order lines set to amount null
  • Loading branch information
voleye authored Aug 27, 2021
2 parents 4676f3a + 522f862 commit 4388612
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Gateway/Command/CaptureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ public function execute(array $commandSubject)
$amount = $this->subjectReader->readAmount($commandSubject);
$amount = (int)round($this->formatPrice($amount) * 100);

if ($amount === 0) {
return true;
}

$orderId = $this->subjectReader->readPayment($commandSubject)->getOrder()->getOrderIncrementId();
$transaction = $this->paymentDetailsProvider->get($orderId);

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "magento2-module",
"description": "Vipps Payment Method",
"license": "proprietary",
"version": "2.2.15",
"version": "2.2.16",
"require": {
"magento/framework": "101.0.*",
"magento/module-sales": "101.0.*",
Expand Down

0 comments on commit 4388612

Please sign in to comment.