I am trying to get the customer's name, email, and order number to pass to a payment gateway once the customer hits the place order button. So far I have managed to get the total using
$total = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
I tried using
Mage::getSingleton('customer/session')->getCustomer();
$email = $customer->getEmail();
$firstname = $customer->getFirstname();
$lastname= $customer->getLastname();
but they don't seem to return a value. I know this because I echo the variables after, and none of them work but the $total. Help would be greatly appreciated.
The best way to do this is to create a Custom Payment Gateway module.
See
http://www.excellencemagentoblog.com/magento-create-custom-payment-method
Magento Custom Payment Gateway
http://roysimkes.net/blog/2009/11/creating-your-own-payment-gateway-for-magento-part-1/
http://roysimkes.net/blog/2009/11/creating-your-own-payment-gateway-for-magento-%E2%80%93-part-2/