예제 #1
0
파일: GWF_Order.php 프로젝트: sinfocol/gwf3
 public static function insertOrder(GWF_Module $module, GWF_Orderable $gdo, GWF_PaymentModule $paysite, GWF_User $user, $price_total, $cartid = 0)
 {
     $token = self::generateToken();
     $order = new self(array('order_cartid' => $cartid, 'order_uid' => $user->getID(), 'order_token' => $token, 'order_xtoken' => '', 'order_date_paid' => '00000000000000', 'order_date_ordered' => GWF_Time::getDate(GWF_Date::LEN_SECOND), 'order_price' => $gdo->getOrderPrice($user), 'order_price_total' => $price_total, 'order_currency' => Module_Payment::getShopCurrencyS(), 'order_amount' => 1, 'order_email' => '', 'order_site' => $paysite->getSiteNameToken(), 'order_title' => $gdo->getOrderItemName($module, GWF_Language::getCurrentISO()), 'order_title_admin' => $gdo->getOrderItemName($module, GWF_LANG_ADMIN), 'order_descr' => $gdo->getOrderDescr($module, GWF_Language::getCurrentISO()), 'order_descr_admin' => $gdo->getOrderDescr($module, GWF_LANG_ADMIN), 'order_status' => self::CREATED, 'order_data' => serialize($gdo), 'order_module' => $gdo->getOrderModuleName()));
     if (false === $order->insert()) {
         return false;
     }
     return $order;
 }