I am working on magento 1.9.1 and want to ask you that how I place a order in test mode.
I have replaced the details with the test details that you provided in your WP plugin. but after that It take me to a page where many banks are listed. I am confused.
What to do?
One more thing when I use your plugin then I am not able to capture the payment by my observer
her is my observer code
public function implementOrderStatus($observer) {
$order = $observer->getEvent()->getOrder();
$orders = Mage::getModel('sales/order_invoice')->getCollection()
->addAttributeToFilter('order_id', array('eq' => $order->getId()));
$orders->getSelect()->limit(1);
if ((int) $orders->count() !== 0) {
return $this;
}
if ($order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
try {
if (!$order->canInvoice()) {
$order->addStatusHistoryComment('Inchoo_Invoicer: Order cannot be invoiced.', false);
$order->save();
}
//START Handle Invoice
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
$invoice->register();
$invoice->getOrder()->setCustomerNoteNotify(false);
$invoice->getOrder()->setIsInProcess(true);
$order->addStatusHistoryComment('Automatically INVOICED by Inchoo_Invoicer.', false);
$transactionSave = Mage::getModel('core/resource_transaction')
->addObject($invoice)
->addObject($invoice->getOrder());
$transactionSave->save();
//END Handle Invoice
//START Handle Shipment
$shipment = $order->prepareShipment();
$shipment->register();
$order->setIsInProcess(true);
$order->addStatusHistoryComment('Automatically SHIPPED by Inchoo_Invoicer.', false);
$transactionSave = Mage::getModel('core/resource_transaction')
->addObject($shipment)
->addObject($shipment->getOrder())
->save();
//END Handle Shipment
$order->setState(Mage_Sales_Model_Order::STATE_COMPLETE, true);
$order->save();
} catch (Exception $e) {
$order->addStatusHistoryComment('Inchoo_Invoicer: Exception occurred during automaticallyInvoiceShipCompleteOrder action. Exception message: ' . $e->getMessage(), false);
$order->save();
}
}
return $this;
}
I am working on magento 1.9.1 and want to ask you that how I place a order in test mode.
I have replaced the details with the test details that you provided in your WP plugin. but after that It take me to a page where many banks are listed. I am confused.
What to do?
One more thing when I use your plugin then I am not able to capture the payment by my observer
her is my observer code