I have a website in magento(1.9.3) with multiple vendor and paytm as an payment solution. The problem that i am facing is when i am placing the order a order confirmation mail is being sent to the vendor even before the payment is being made and if the order is success from paytm, this time the admin and the user receive a invoice mail but not the vendor.

So if i stop the mail at the time of order placement from admin, the vendor won't receive any mail of order and so he won't be notified.

So is there a way to send invoice mail to all the vendor, user and admin after the successful payment from paytm.

Thank you.

  • You can create a module to capture the payment success full and send the email there in the observer.
    – Mujahidh
    Commented Mar 23, 2017 at 5:02
  • Please share paytm model folder codes
    – Amit Bera
    Commented Mar 23, 2017 at 18:51
  • than how you get information related to pepoles who faced problems in paytm payment page ? Commented Apr 5, 2017 at 6:08

2 Answers 2


You can create a new custom module. In the event observer capture the even checkout_onepage_controller_success_action and create a method in the observer and complete your logic in the method.

1 ) here is custom config.xml for call observer file

<?xml version="1.0"?>

2 ) create observer.php file inside your module/Model directory and paste this code

class Namespace_Modulename_Model_Observer{
public function customFunction(Varien_Event_Observer $observer){
$order = $observer->getEvent()->getOrder();
 //here you can add your custom code

for further reading use this link


You can checkout_onepage_controller_success_action event as Mujahidh says.

checkout_onepage_controller_success_action event give only array of order ids order_ids.

Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)));

public function [YourFunction]($observer)

        foreach ($order_ids as $eachOrderId) {

            if($order->getPayment()->getMethodInstance()->getCode()== [PAYTM)_PAYMENT_METHOD_CODE] )
              // SEND ORDER EMAIL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.