diff --git a/webapp/classes/OrderCtrl.php b/webapp/classes/OrderCtrl.php index b47067a..3f42834 100644 --- a/webapp/classes/OrderCtrl.php +++ b/webapp/classes/OrderCtrl.php @@ -6,7 +6,7 @@ use phpcommon; class OrderCtrl { - protected function getRedis() + private function getRedis() { $redis_conf = getGlobalRedisConfig(); $r = new phpcommon\Redis(array( @@ -17,7 +17,7 @@ class OrderCtrl { return $r; } - protected function getMysql() + private function getMysql() { $mysql_conf = getMysqlConfig(); $conn = new phpcommon\Mysql(array( @@ -30,6 +30,11 @@ class OrderCtrl { return $conn; } + public function genOrderId($account_id) + { + + } + public function getOrderByCpOrderId($orderid) { $conn = $this->getMysql(); diff --git a/webapp/sdkwarpper/UnifiedWeiXin.php b/webapp/sdkwarpper/UnifiedWeiXin.php index 063eb65..9caa489 100644 --- a/webapp/sdkwarpper/UnifiedWeiXin.php +++ b/webapp/sdkwarpper/UnifiedWeiXin.php @@ -34,7 +34,7 @@ class UnifiedWeiXin extends BaseSdk { $this->real_channel = phpcommon\extractChannelId($_REQUEST['account_id']); $this->loadConfig(); - $cp_orderid = $this->order_ctrl->genOrderId(); + $cp_orderid = $this->order_ctrl->genOrderId($_REQUEST['account_id']); { $this->order_ctrl->addPreOrder( array( @@ -42,6 +42,7 @@ class UnifiedWeiXin extends BaseSdk { 'account_id' => $_REQUEST['account_id'], 'roleid' => '', 'server_id' => 0, + 'price' => 101, 'poly_sdk_channel' => $this->poly_sdk_channel, 'unified_channel' => $this->unified_channel, 'itemid' => $itemid,