|
@@ -8,6 +8,7 @@ use addons\third\model\Third; |
|
@@ -8,6 +8,7 @@ use addons\third\model\Third; |
8
|
use app\common\library\Auth;
|
8
|
use app\common\library\Auth;
|
9
|
use Exception;
|
9
|
use Exception;
|
10
|
use think\addons\Controller;
|
10
|
use think\addons\Controller;
|
|
|
11
|
+use think\Db;
|
11
|
use think\Response;
|
12
|
use think\Response;
|
12
|
use think\Session;
|
13
|
use think\Session;
|
13
|
use Yansongda\Pay\Exceptions\GatewayException;
|
14
|
use Yansongda\Pay\Exceptions\GatewayException;
|
|
@@ -244,13 +245,10 @@ class Api extends Controller |
|
@@ -244,13 +245,10 @@ class Api extends Controller |
244
|
return;
|
245
|
return;
|
245
|
}
|
246
|
}
|
246
|
$data = $pay->verify();
|
247
|
$data = $pay->verify();
|
247
|
- file_put_contents("pcl_pay_log.log", date("Y-m-d H:i:s") . "::" . json_encode($data, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND);
|
|
|
248
|
$payamount = $type == 'alipay' ? $data['total_amount'] : $data['total_fee'] / 100;
|
248
|
$payamount = $type == 'alipay' ? $data['total_amount'] : $data['total_fee'] / 100;
|
249
|
$out_trade_no = $data['out_trade_no'];
|
249
|
$out_trade_no = $data['out_trade_no'];
|
250
|
//你可以在此编写订单逻辑
|
250
|
//你可以在此编写订单逻辑
|
251
|
//判断是否已更新过支付状态
|
251
|
//判断是否已更新过支付状态
|
252
|
- file_put_contents("pcl_pay_logsssssssssssssssqwe.log", date("Y-m-d H:i:s") . "::" . json_encode($out_trade_no, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND);
|
|
|
253
|
-
|
|
|
254
|
$cks = Db::name('order')
|
252
|
$cks = Db::name('order')
|
255
|
->where(['order_no' => $data['out_trade_no']])
|
253
|
->where(['order_no' => $data['out_trade_no']])
|
256
|
->find();
|
254
|
->find();
|