|
|
<?php
|
|
|
|
|
|
namespace app\common\controller;
|
|
|
|
|
|
use EasyWeChat\Foundation\Application;
|
|
|
use app\common\library\Auth;
|
|
|
use think\Config;
|
...
|
...
|
@@ -14,7 +15,9 @@ use think\Response; |
|
|
use think\Route;
|
|
|
use think\Validate;
|
|
|
use think\Db;
|
|
|
|
|
|
//use EasyWeChat\Factory;
|
|
|
|
|
|
/**
|
|
|
* API控制器基类
|
|
|
*/
|
...
|
...
|
@@ -327,7 +330,7 @@ class Api |
|
|
protected function IsToken($token)
|
|
|
{
|
|
|
if (empty($token['token'])) {
|
|
|
$this->error('请登录后在操作');
|
|
|
$this->error('请登录后在操作', '', 401);
|
|
|
}
|
|
|
$is_token = Db::name('user')->where(['token' => $token['token']])->find();
|
|
|
if (!$is_token) {
|
...
|
...
|
@@ -388,9 +391,10 @@ class Api |
|
|
$PayOrder = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(), -5) . substr(microtime(), 2, 5) . sprintf('%02d', rand(0, 99));
|
|
|
return $PayOrder;
|
|
|
}
|
|
|
|
|
|
|
|
|
public function Tuikuan($OrderSn){
|
|
|
|
|
|
|
|
|
public function Tuikuan($OrderSn)
|
|
|
{
|
|
|
$PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn)->where('type', 1)->find();
|
|
|
$TuiMoney = $PayOrderInfo['UpMoney'] + $PayOrderInfo['Money'];
|
|
|
//配置
|
...
|
...
|
|