Esempio n. 1
0
 /**
  * Class constructor
  */
 private function __construct()
 {
     $this->billingSaleDao = BOL_BillingSaleDao::getInstance();
     $this->billingGatewayDao = BOL_BillingGatewayDao::getInstance();
     $this->billingGatewayConfigDao = BOL_BillingGatewayConfigDao::getInstance();
     $this->billingGatewayProductDao = BOL_BillingGatewayProductDao::getInstance();
     $this->billingProductDao = BOL_BillingProductDao::getInstance();
 }
Esempio n. 2
0
 public function getSaleList($page, $onPage)
 {
     $first = ($page - 1) * $onPage;
     $gatewayDao = BOL_BillingGatewayDao::getInstance();
     $pluginDao = BOL_PluginDao::getInstance();
     $sql = "SELECT `s`.*, `gw`.`gatewayKey`, `p`.`title` AS `pluginTitle` \n            FROM `" . $this->getTableName() . "` AS `s`\n            LEFT JOIN `" . $gatewayDao->getTableName() . "` AS `gw` ON (`s`.`gatewayId` = `gw`.`id`)\n            LEFT JOIN `" . $pluginDao->getTableName() . "` AS `p` ON (`s`.`pluginKey` = `p`.`key`)\n            WHERE `s`.`status` = 'delivered'\n            ORDER BY `timeStamp` DESC\n            LIMIT :first, :limit";
     return $this->dbo->queryForList($sql, array('first' => $first, 'limit' => $onPage));
 }
 public function addConfig($gatewayKey, $name, $value)
 {
     if (!mb_strlen($gatewayKey) || !mb_strlen($name)) {
         return false;
     }
     $gateway = BOL_BillingGatewayDao::getInstance()->findByKey($gatewayKey);
     if ($gateway) {
         $config = new BOL_BillingGatewayConfig();
         $config->gatewayId = $gateway->id;
         $config->name = $name;
         $config->value = $value;
         $this->save($config);
         return true;
     }
     return false;
 }