123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- 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
- );
- }
-
- 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);
- }
- }
|