Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
PaymentPlugin Class Reference

Public Member Functions

 __construct (GuaranteeCancelingServiceInterface $guaranteeCancelingService)
 
 afterDenyPayment (MethodInterface $subject, $result, InfoInterface $payment)
 

Detailed Description

Plugin for Magento\Payment\Model\MethodInterface.

See also
MethodInterface

Definition at line 17 of file PaymentPlugin.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( GuaranteeCancelingServiceInterface  $guaranteeCancelingService)
Parameters
GuaranteeCancelingServiceInterface$guaranteeCancelingService

Definition at line 27 of file PaymentPlugin.php.

29  {
30  $this->guaranteeCancelingService = $guaranteeCancelingService;
31  }

Member Function Documentation

◆ afterDenyPayment()

afterDenyPayment ( MethodInterface  $subject,
  $result,
InfoInterface  $payment 
)

Performs Signifyd guarantee cancel operation after payment denying.

See also
MethodInterface::denyPayment @SuppressWarnings(PHPMD.UnusedFormalParameter)
Parameters
MethodInterface$subject
MethodInterface | bool$result
InfoInterface$payment
Returns
bool|MethodInterface

Definition at line 44 of file PaymentPlugin.php.

45  {
46  if ($this->isPaymentDenied($payment, $result)) {
47  $this->guaranteeCancelingService->cancelForOrder($payment->getParentId());
48  }
49 
50  return $result;
51  }
$payment
Definition: order.php:17

The documentation for this class was generated from the following file: