Skip to content

Incorrect email sending #42

@rickeyf

Description

@rickeyf

Email should be send in Ipn controller, not in success page, because it cause sometimes dublicated emails or not sending email at all if user closes the page after payment too fast.

Please adjust the flow of email sending. Something like this in _handleCapture and _handleAuthorization

if (!$this->_order->getEmailSent()) {
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $emailSender = $objectManager->create('\Magento\Sales\Model\Order\Email\Sender\OrderSender');
            $emailSender->send($this->_order);
        }

Also, it would be nice if we have the transaction ID saved somewhere. And payment method information also, like paid with Mastercard or Debit Card or Visa and etc.

$this->_order->setNetopiaId($this->getRealOrderId($this->_objPmReq->objPmNotify->purchaseId));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions