12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- namespace api\sdk\controller;
- use api\common\controller\V2ApiBaseController;
- use huo\controller\pay\Sdk;
- use huolib\status\OrderStatus;
- class WapController extends V2ApiBaseController {
- public function _initialize() {
- parent::_initialize();
- }
-
- public function member() {
- $_back_url = $this->request->server('HTTP_REFERER');
- $_channel_rq = $this->setChannelData();
- $this->assign('agentgame', $_channel_rq->getAgentGame());
- $this->assign('back_url', $_back_url);
- return $this->fetch('member/index');
- }
-
- public function forgetPwdPage() {
- return $this->fetch('member/forgetpwd');
- }
-
- public function pay() {
- $this->checkLogin();
- $_order_rq = $this->setOrderData();
- $_pay_token = get_val($this->rq_data, 'pay_token', '');
- $_rs = $_order_rq->checkPayToken($_pay_token);
- if (false == $_rs) {
- $_code = OrderStatus::TOKEN_ARGS_ERROR;
- $this->error(OrderStatus::getMsg($_code), [], $_code);
- }
- $_order_id = $_order_rq->getOrderId();
- $_rdata = (new Sdk())->getPayInfo($_order_id, true);
- $this->assign($_rdata['data']);
- return $this->fetch('order/index');
- }
- }
|