File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ public function denyPayment(InfoInterface $payment)
454
454
'deny_payment ' ,
455
455
$ payment
456
456
);
457
- return false ;
457
+ return $ this ;
458
458
}
459
459
460
460
/**
Original file line number Diff line number Diff line change @@ -1014,9 +1014,14 @@ public function deny($isOnline = true)
1014
1014
{
1015
1015
$ transactionId = $ isOnline ? $ this ->getLastTransId () : $ this ->getTransactionId ();
1016
1016
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
+ }
1020
1025
1021
1026
if ($ result ) {
1022
1027
$ invoice = $ this ->_getInvoiceForTransactionId ($ transactionId );
You can’t perform that action at this time.
0 commit comments