Commit 806b68f3 authored by rikterbeek's avatar rikterbeek

don't send mail after order creation and update module to version 1.0.0

parent d60631ae
...@@ -168,6 +168,13 @@ class Cc extends \Magento\Payment\Model\Method\Cc ...@@ -168,6 +168,13 @@ class Cc extends \Magento\Payment\Model\Method\Cc
throw new \Magento\Framework\Exception\LocalizedException(__('The authorize action is not available.')); throw new \Magento\Framework\Exception\LocalizedException(__('The authorize action is not available.'));
} }
/*
* do not send order confirmation mail after order creation wait for
* Adyen AUTHORIISATION notification
*/
$order = $payment->getOrder();
$order->setCanSendNewEmailFlag(false);
// do not let magento set status to processing // do not let magento set status to processing
$payment->setLastTransId($this->getTransactionId())->setIsTransactionPending(true); $payment->setLastTransId($this->getTransactionId())->setIsTransactionPending(true);
......
...@@ -146,6 +146,14 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -146,6 +146,14 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
public function initialize($paymentAction, $stateObject) public function initialize($paymentAction, $stateObject)
{ {
/*
* do not send order confirmation mail after order creation wait for
* Adyen AUTHORIISATION notification
*/
$payment = $this->getInfoInstance();
$order = $payment->getOrder();
$order->setCanSendNewEmailFlag(false);
$state = \Magento\Sales\Model\Order::STATE_NEW; $state = \Magento\Sales\Model\Order::STATE_NEW;
$stateObject->setState($state); $stateObject->setState($state);
$stateObject->setStatus($this->_adyenHelper->getAdyenAbstractConfigData('order_status')); $stateObject->setStatus($this->_adyenHelper->getAdyenAbstractConfigData('order_status'));
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*/ */
--> -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="0.1.0"> <module name="Adyen_Payment" setup_version="1.0.0">
<sequence> <sequence>
<module name="Magento_Sales"/> <module name="Magento_Sales"/>
<module name="Magento_Quote"/> <module name="Magento_Quote"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment