/** * Format the data properly for the Gateway post * * @param type $customer_data * @return Varien_Object $customer */ protected function _prepareCustomerForGateway($customer_data) { $state = $customer_data['cc_billing_state']; if (isset($customer_data['cc_billing_state_id']) && !empty($customer_data['cc_billing_state_id'])) { $state = $this->_getStateById($customer_data['cc_billing_state_id']); } $customer = new Varien_Object($customer_data); $customer->setCcBillingState($state); //->setEmail(Mage::getModel('customer/session')->getCustomer()->getEmail()) //->setId(Mage::getModel('customer/session')->getCustomer()->getId()) //->setDescription('Magento Customer ID: ' . Mage::getModel('customer/session')->getCustomer()->getId()) return $customer; }