Handling credit card details when you shouldn't and who needs SSL anyways:
if ($payment && $payment->getMethod() == Mage::getModel('authorizenet/directpost')->getCode()) {
$requestToPaygate = $payment->getMethodInstance()->generateRequestFromOrder($order);
$requestToPaygate->setControllerActionName('onepage');
$requestToPaygate->setIsSecure((string)Mage::app()->getStore()->isCurrentlySecure());
$dataToDPM = $requestToPaygate->getData();
$year = $paymentData['cc_exp_year'];
if (strlen($year) > 2) {
$year = substr($year, -2);
}
$month = $paymentData['cc_exp_month'];
if (strlen($month) < 10) {
$month = '0' . $month;
}
$dataToDPM['x_exp_date'] = $month . '/' . $year;
$dataToDPM['x_card_num'] = $paymentData['cc_number'];
$requestQuery = http_build_query($dataToDPM);
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded"));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $order->getPayment()->getMethodInstance()->getCgiUrl());
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestQuery);
$httpResponse = curl_exec($ch);
return $this->_processAuthorizenetDirectPostResponse($httpResponse);
}