Skip to content

Commit

Permalink
Check on var instead of and add empty check on payment
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinverschoor committed Jan 14, 2021
1 parent ba5a4cf commit 006151e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Controller/Checkout/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ public function execute()

return $this->result->setContents('TRUE| Ignoring: order has already been paid');
}
if ($_REQUEST["action"] == 'capture') {
if ($action == 'capture') {
$payment = $order->getPayment();
if ($payment->getAdditionalInformation('manual_capture')) {
if(!empty($payment) && $payment->getAdditionalInformation('manual_capture')){
$this->logger->debug('Already captured.');

return $this->result->setContents('TRUE| Already captured.');
}
}
}

if ($transaction->isPaid() || $transaction->isAuthorized()) {
Expand Down

0 comments on commit 006151e

Please sign in to comment.