|
|
@@ -222,13 +222,9 @@ class Service |
|
|
|
return false; |
|
|
|
} |
|
|
|
try { |
|
|
|
file_put_contents(ROOT_PATH . '/runtime/log/' . date('Ym') ."/".date("d"). '.log', "开始获取参数" . PHP_EOL, FILE_APPEND); |
|
|
|
|
|
|
|
$pay = new Pay(self::getConfig($type)); |
|
|
|
$data = $type == 'wechat' ? file_get_contents("php://input") : request()->post('', null, 'trim'); |
|
|
|
file_put_contents(ROOT_PATH . '/runtime/log/' . date('Ym') ."/".date("d"). '.log', json_encode($data) . PHP_EOL, FILE_APPEND); |
|
|
|
|
|
|
|
$data = $pay->driver($type)->gateway()->verify($data); |
|
|
|
// $data = $pay->driver($type)->gateway()->verify($data); |
|
|
|
|
|
|
|
if ($type == 'alipay') { |
|
|
|
if (in_array($data['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED'])) { |
|
|
|