I added this code to the checkout_process.php in includes/modules. When I tested with money order payment, I get expected result but when I tested with paypal standard payment, I didn't get the expected result; it looks like the entire block of code I added was skipped so I am trying to figure out what the problem is.
$order->send_order_email($insert_id, 2);
//added block start
if(strpos($order->info['payment_method'],"Postal") === false)
{
include(DIR_WS_MODULES."smiffysSubmitOrder.php");
smiffys();
file_put_contents(DIR_FS_CATALOG."tmp/order_".date("YmdHis").".txt", print_r($order,true));
}
//added block end