/** * @param Payone_Api_Response_Authorization_Approved|Payone_Api_Response_Refund_Approved|Payone_Api_Response_Interface $response */ protected function sendAvsMail(Payone_Api_Response_Interface $response) { $storeId = $this->getOrder()->getStore()->getId(); $configMisc = $this->helperConfig()->getConfigMisc($storeId); $configEmailAvs = $configMisc->getEmailAvs(); if ($response instanceof Payone_Api_Response_Refund_Approved || $response instanceof Payone_Api_Response_Authorization_Approved || $response instanceof Payone_Api_Response_Preauthorization_Approved) { if ($configEmailAvs->isResultAvsInConfig($response->getProtectResultAvs())) { // Mailtemplates need an Varien_Object if we want to use Getter from the Object $responseMailObject = new Varien_Object($response->toArray()); $helperEmail = $this->helperEmail(); $helperEmail->setStoreId($storeId); $result = $helperEmail->send($configEmailAvs, array('response' => $responseMailObject)); } } }