public function displayPaysiteButton(GWF_Module $module, GWF_Order $order, GWF_Orderable $gdo, GWF_User $user)
 {
     $lang_iso = GWF_Language::getCurrentISO();
     $action = self::RECEIVE_MONEY_URL;
     $hidden = GWF_Form::hidden('ap_purchasetype', 'item') . GWF_Form::hidden('ap_merchant', $this->cfgSeller()) . GWF_Form::hidden('ap_itemname', $gdo->getOrderItemName($module, $lang_iso)) . GWF_Form::hidden('ap_currency', $order->getOrderCurrency()) . GWF_Form::hidden('ap_returnurl', Common::getAbsoluteURL($gdo->getOrderSuccessURL($user), false)) . GWF_Form::hidden('ap_itemcode', $order->getOrderToken()) . GWF_Form::hidden('ap_quantity', $order->getOrderAmount()) . GWF_Form::hidden('ap_description', $gdo->getOrderDescr($module, $lang_iso)) . GWF_Form::hidden('ap_amount', $order->getOrderPriceTotal()) . GWF_Form::hidden('ap_cancelurl', Common::getAbsoluteURL($gdo->getOrderCancelURL($user), false));
     //		echo GWF_HTML::display($hidden);
     return Module_Payment::tinyform('pay_ap', 'img/' . GWF_ICON_SET . 'buy_ap.png', $action, $hidden);
 }
Beispiel #2
0
 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;
 }