cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9.3.2 order confirmation emails not sending for paypal orders

SOLVED

Re: Magento 1.9.3.2 order confirmation emails not sending for paypal orders

hi @vpatel93

 

Maybe you are not adding the correct path but path you mention there is no php file in that or any kind of other file.

Find helpful ? Consider Giving Kudos to this post.
Problem solved? Click Accept as Solution!"
Qaisar Satti

Re: Magento 1.9.3.2 order confirmation emails not sending for paypal orders

Hi @qaisar_satti so sorry the correct path is:

 

/app/code/core/Mage/Paypal/Model/ipn.php

 

Removing the lines I did skips check to see if invoice exists.

 

Maybe in my payment.php I can check using:

 

!$this->_order->getEmailSent()

 

When payment captured and send order confirmation then somehow?

 

 

 

 

Re: Magento 1.9.3.2 order confirmation emails not sending for paypal orders

Hi @qaisar_satti I have reverted aforementioned changes and amended the registerCaptureNotification function in my payment.php to the following:

 

 $status = true;
    $letsEmail = false;
    if ($this->getIsTransactionPending()) {
        $message = Mage::helper('sales')->__('Capturing amount of %s is pending approval on gateway.', $this->_formatPrice($amount));
        $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
        $letsEmail = true;
        if ($this->getIsFraudDetected()) {
            $message = Mage::helper('sales')->__('Order is suspended as its capture amount %s is suspected to be fraudulent.', $this->_formatPrice($amount, $this->getCurrencyCode()));
            $status = Mage_Sales_Model_Order::STATUS_FRAUD;
            $letsEmail = false;
        }
    } else {
        $message = Mage::helper('sales')->__('Registered notification about captured amount of %s.', $this->_formatPrice($amount));
        $state = Mage_Sales_Model_Order::STATE_NEW;
        $letsEmail = true;
        if ($this->getIsFraudDetected()) {
            $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
            $message = Mage::helper('sales')->__('Order is suspended as its capture amount %s is suspected to be fraudulent.', $this->_formatPrice($amount, $this->getCurrencyCode()));
            $status = Mage_Sales_Model_Order::STATUS_FRAUD;
            $letsEmail = false;
        }
    }

    $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice, true);
    $message = $this->_prependMessage($message);
    $message = $this->_appendTransactionToMessage($transaction, $message);
    $order->setState($state, $status, $message);
    if ($letsEmail === true && !$order->getEmailSent()){
	     $order->queueNewOrderEmail()->addStatusHistoryComment(
                Mage::helper('paypal')->__('Notified Customer')
            )
            ->setIsCustomerNotified(true)
            ->save();
    }