In the module of adyen no magento, I wanted to block any notification that is made through a bank slip. The ProcessNotification.php file from the following path: app/code/community/Adyen/Payment/Model is responsible for processing any notification from the Adyen servers and from the following code, I can block all notification, whatever the method of payment.
Code:
$eventCode = trim($params->getData('eventCode'));
if ($eventCode == Adyen_Payment_Model_Event:: AUTHORISATION) {
$this->_debugData['processResponse info'] = 'Skip notification REPORT_AVAILABLE';
$this->_debug($storeId);
return;
}
With the following code, from the event of payment confirmation, I block all notification, but it ends up that includes notifications that are shopping from credit card and I wanted to block only the notifications that are from bank slip.
The code that I did to solve this question was the following:
$eventCode = trim($params->getData('eventCode'));
if ($eventCode == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION){
$payment = $params->getData('paymentMethod');
if($payment == "boletobancario_santander") {
$this->_debugData['processResponse info'] = 'Skip notification REPORT_AVAILABLE';
$this->_debug($storeId);
return;
}
}