Summary:
Add variables from order to pass to Authorize.Net form
Detailed Description:
I added some code to implement this feature as follows to do this to the GetForm
function of the AuthNetSim class. I am using Orders 1.15.3 and AuthNetSim 1.03
if( isset($this->_data['description']) )
{
$parms['x_description'] = $this->_data['description'];
}
//Added 2/27/2014 passes all available to data to appropriate Authorize.net
fields
$order =& $this->GetModuleInstance('Orders');
if( $order ){
$orderinfo = $order->get_portable_order($this->_data['orderid']);
}
if( isset($orderinfo) )
{
$parms['x_first_name'] = $orderinfo["billing_first_name"];
$parms['x_last_name'] = $orderinfo["billing_last_name"];
$parms['x_company'] = $orderinfo["billing_company"];
$parms['x_address'] = $orderinfo["billing_address1"];
$parms['x_city'] = $orderinfo["billing_city"];
$parms['x_state'] = $orderinfo["billing_state"];
$parms['x_zip'] = $orderinfo["billing_postal"];
$parms['x_country'] = $orderinfo["billing_country"];
$parms['x_phone'] = $orderinfo["billing_phone"];
$parms['x_fax'] = $orderinfo["billing_fax"];
$parms['x_email'] = $orderinfo["billing_email"];
$parms['x_ship_to_first_name'] =
$orderinfo["shipping"][0]["shipping_first_name"];
$parms['x_ship_to_last_name'] =
$orderinfo["shipping"][0]["shipping_last_name"];
$parms['x_ship_to_company'] = $orderinfo["shipping"][0]["shipping_company"];
$parms['x_ship_to_address'] = $orderinfo["shipping"][0]["shipping_address1"];
$parms['x_ship_to_city'] = $orderinfo["shipping"][0]["shipping_city"];
$parms['x_ship_to_state'] = $orderinfo["shipping"][0]["shipping_state"];
$parms['x_ship_to_zip'] = $orderinfo["shipping"][0]["shipping_postal"];
$parms['x_ship_to_country'] = $orderinfo["shipping"][0]["shipping_country"];
}