123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /**
- * QuhulianController.php UTF-8
- * huosdk_mini_program
- *
- * @date : 2019/3/21 16:33
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : chenbingling <cbl@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace mini\sdk\controller;
- use huolib\status\CommonStatus;
- use mini\common\controller\V2ApiBaseController;
- use think\Log;
- class CpaReversalController extends V2ApiBaseController {
- function _initialize() {
- parent::_initialize();
- Log::write(
- $this->request->scheme().'://'.$this->request->server('HTTP_HOST').$this->request->server('REQUEST_URI').'?'
- .$this->request->getContent(),
- Log::LOG
- );
- }
- /***
- * 趣互联回调信息
- * http://doc.1tsdk.com/159?page_id=7650
- * 【域名】/mp/reversal
- */
- public function index() {
- $_code = get_val($this->rq_data, 'code');
- $_ext = get_val($this->rq_data, 'ext');
- $_game_rq = $this->setGameData();
- if (empty($_code) || empty($_ext)) {
- $_code = CommonStatus::INVALID_PARAMS;
- $this->error(CommonStatus::getMsg($_code), [], $_code);
- }
- $_rs = (new \huomp\controller\cpa_reversal\CpaReversalController())->reversal($_code, $_ext, $_game_rq);
- $this->returnData($_rs);
- }
- }
|