Skip to content

Commit 0782bb1

Browse files
author
Viktor Tymchynskyi
committed
MAGETWO-32931: Accepting and Rejecting Transactions Marked as "Held for Review" by Gateway
- Add soap authorize, sale, subscription, accept commands
1 parent d490812 commit 0782bb1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/code/Magento/Payment/Model/Method/Adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public function denyPayment(InfoInterface $payment)
454454
'deny_payment',
455455
$payment
456456
);
457-
return false;
457+
return $this;
458458
}
459459

460460
/**

app/code/Magento/Sales/Model/Order/Payment.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,14 @@ public function deny($isOnline = true)
10141014
{
10151015
$transactionId = $isOnline ? $this->getLastTransId() : $this->getTransactionId();
10161016

1017-
$result = $isOnline ?
1018-
$this->getMethodInstance()->setStore($this->getOrder()->getStoreId())->denyPayment($this) :
1019-
(bool)$this->getNotificationResult();
1017+
if ($isOnline) {
1018+
/** @var \Magento\Payment\Model\Method\AbstractMethod $method */
1019+
$method = $this->getMethodInstance();
1020+
$method->setStore($this->getOrder()->getStoreId());
1021+
$result = $method->denyPayment($this);
1022+
} else {
1023+
$result = (bool)$this->getNotificationResult();
1024+
}
10201025

10211026
if ($result) {
10221027
$invoice = $this->_getInvoiceForTransactionId($transactionId);

0 commit comments

Comments
 (0)