转账钱包phpdemo
差别
这里会显示出您选择的修订版和当前版本之间的差别。
转账钱包phpdemo [2019/12/15 17:32] – 创建 admin | 转账钱包phpdemo [2019/12/17 22:39] (当前版本) – 外部编辑 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
<file php phpDemo.php> | <file php phpDemo.php> | ||
- | | + | <?php |
- | header(" | + | header(" |
- | date_default_timezone_set(' | + | date_default_timezone_set(' |
- | | + | /** |
- | | + | * 转账钱包 PHP Demo |
- | | + | * Class ngapi |
- | | + | * @version (PHP 5 >= 5.3.0, PHP 7) |
- | | + | * www.neapi.com |
- | class newGamingDemo{ | + | */ |
+ | class newngapiDemo{ | ||
- | | + | protected |
- | protected | + | protected |
- | | + | /** |
- | | + | * @var string |
- | | + | * 接口地址 |
- | | + | */ |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | | + | // |
- | protected | + | protected |
- | | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | protected | + | protected |
- | | + | /** |
- | | + | * @param $username |
- | | + | * @return mixed |
- | | + | * 注册 |
- | | + | */ |
- | public function register($username){ | + | public function register($username){ |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @param $username |
- | | + | * @param int $isMobileUrl |
- | | + | * @param string $gameCode |
- | | + | * @return mixed |
- | | + | * 获取游戏登录地址 |
- | | + | */ |
- | public function login($username, | + | public function login($username, |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @param $username |
- | | + | * @param $money |
- | | + | * @param $client_transfer_id |
- | | + | * @return mixed |
- | | + | * 额度转换 |
- | | + | */ |
- | public function trans($username, | + | public function trans($username, |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @param $username |
- | | + | * @param $client_transfer_id |
- | | + | * @return mixed |
- | | + | * 查询转账状态 |
- | | + | */ |
- | public function status($username, | + | public function status($username, |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @param $username |
- | | + | * @return mixed |
- | | + | * 获取用户余额 |
- | | + | */ |
- | public function balance($username){ | + | public function balance($username){ |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @return mixed |
- | | + | * 获取全部平台额度 |
- | | + | */ |
- | public function credit(){ | + | public function credit(){ |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | /** |
- | | + | * @param $startTime |
- | | + | * @param $endTime |
- | | + | * @param int $page |
- | | + | * @param int $limit |
- | | + | * @return mixed |
- | | + | * 获取下注记录 |
- | | + | */ |
- | public function record($startTime, | + | public function record($startTime, |
- | $code = md5($this-> | + | $code = md5($this-> |
- | $data = array( | + | $data = array( |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | ); | + | ); |
- | $res = $this-> | + | $res = $this-> |
- | return $res; | + | return $res; |
- | } | + | } |
- | | + | private function sendRequest($url, |
- | $ch = curl_init(); | + | $ch = curl_init(); |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | curl_setopt($ch, | + | curl_setopt($ch, |
- | $contents = curl_exec($ch); | + | $contents = curl_exec($ch); |
- | curl_close($ch); | + | curl_close($ch); |
- | | + | print_r($contents); |
- | exit(); | + | exit(); |
- | return json_decode ($contents, TRUE); | + | return json_decode ($contents, TRUE); |
- | } | + | } |
- | | + | } |
- | | + | // |
- | $api = new newGamingDemo(); | + | $api = new newngapiDemo(); |
- | $res = $api-> | + | $res = $api-> |
- | print_r($res); | + | print_r($res); |
- | ?> | + | ?> |
</ | </ |
转账钱包phpdemo.1576402364.txt.gz · 最后更改: 2019/12/15 17:32 由 admin