public function createOrder(Vaimo_Konga_Model_Sales_Order $order, array $offers)
{
$billingAddress = $order->getBillingAddress();
$shippingAddress = $order->getShippingAddress();
$data = array(
'commercial_id' => $order->getIncrementId(),
'customer' => array(
'billing_address' => array(
'city' => $billingAddress->getCity(),
'country' => $billingAddress->getCountry(),
'firstname' => $billingAddress->getFirstname(),
'lastname' => $billingAddress->getLastname(),
'phone' => $billingAddress->getTelephone(),
'street_1' => $billingAddress->getStreet1(),
'street_2' => $billingAddress->getRegionCode(),
'zip_code' => Mage::getModel('dropshipareas/area')
->load($billingAddress->getArea())
->getName(),
),
'customer_id' => $order->getCustomerId(),
'email' => $order->getCustomerEmail(),
'firstname' => $order->getCustomerFirstname(),
'lastname' => $order->getCustomerLastname(),
'shipping_address' => array(
'city' => $shippingAddress->getCity(),
'country' => $shippingAddress->getCountry(),
'firstname' => $shippingAddress->getFirstname(),
'lastname' => $shippingAddress->getLastname(),
'phone' => $shippingAddress->getTelephone(),
'street_1' => $shippingAddress->getStreet1(),
'street_2' => $shippingAddress->getRegionCode(),
'zip_code' => Mage::getModel('dropshipareas/area')
->load($shippingAddress->getArea())
->getName(),
'internal_additional_info' => $shippingAddress->getLandmark()
)
),
'offers' => $offers,
'scored' => 'true',
'shipping_zone_code' => $shippingAddress->getRegionId(),
'payment_info' => array(
'payment_type' => $this->getMiraklPaymentStatus($order)
)
);
return $this->_getAdapter()
->setApiCode('OR01')
->setParams($data)
->execute();
}