Exemplo n.º 1
0
 public function paymentselectedAction()
 {
     echo '<pre>';
     if ($this->_request->getParam('pending')) {
         $cart = new jCart();
         //print_r($this->_request->getParams());
         $orderId = $this->_request->getParam('orderId');
         $tblOrder = new Kutu_Core_Orm_table_Order();
         $items = $tblOrder->getOrderDetail($orderId);
         for ($i = 0; $i < count($items); $i++) {
             $_SESSION['jCart']->total = $items[$i]['orderTotal'];
             $_SESSION['jCart']->itemcount = count($items);
             $_SESSION['jCart']->items[$i] = $items[$i]['itemId'];
             $_SESSION['jCart']->itemprices[$_SESSION['jCart']->items[$i]] = $items[$i]['price'];
             $_SESSION['jCart']->itemqtys[$_SESSION['jCart']->items[$i]] = $items[$i]['qty'];
             $_SESSION['jCart']->iteminfo[$_SESSION['jCart']->items[$i]] = $items[$i]['documentName'];
             $data['taxNumber'] = $items[$i]['taxNumber'];
             $data['taxCompany'] = $items[$i]['taxCompany'];
             $data['taxAddress'] = $items[$i]['taxAddress'];
             $data['taxCity'] = $items[$i]['taxCity'];
             $data['taxZip'] = $items[$i]['taxZip'];
             $data['taxProvince'] = $items[$i]['taxProvince'];
             $data['taxCountry'] = $items[$i]['taxCountryId'];
             $data['method'] = 'paypal';
             $_SESSION['_orderIdNumber'] = $orderId;
             $_SESSION['_method'] = 'paypal';
         }
         $cart =& $_SESSION['jCart'];
     } else {
         $cart =& $_SESSION['jCart'];
         if (!is_object($cart)) {
             $cart = new jCart();
         }
         $data = array();
         foreach ($this->_request->getParams() as $key => $value) {
             $data[$key] = $value;
         }
     }
     $this->view->cart = $cart;
     $this->view->data = $data;
     //print_r($_SESSION['jCart']);
 }
Exemplo n.º 2
0
 public function confirmAction()
 {
     $this->_checkAuth();
     $userId = $this->_userInfo->userId;
     $tblOrder = new Kutu_Core_Orm_table_Order();
     $tblSetting = new Kutu_Core_Orm_Table_PaymentSetting();
     $rowset = $tblOrder->getTransactionToConfirm($userId);
     //,$limit,$offset);
     $numCount = $tblOrder->getTransactionToConfirmCount($userId);
     $bankAccount = $tblSetting->fetchAll($tblSetting->select()->where("settingKey = 'bankAccount'"));
     if ($this->_request->get('sended') == 1) {
         $this->view->sended = 'Payment Confirmation Sent';
     }
     $this->view->numCount = $numCount;
     $this->view->rowset = $rowset;
     $this->view->bankAccount = $bankAccount;
     /*echo'<pre>';
     		print_r($this->_userDetailInfo);
             echo'</pre>';*/
 }