mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-14 03:11:07 +08:00
Update PaymentService.php
This commit is contained in:
parent
f55f0c137e
commit
ab661096f2
@ -153,7 +153,10 @@ class PaymentService
|
|||||||
$result = empty($notify['result']) ? [] : json_decode($notify['result'], true);
|
$result = empty($notify['result']) ? [] : json_decode($notify['result'], true);
|
||||||
p($result, false, 'wechat_pay_notify');
|
p($result, false, 'wechat_pay_notify');
|
||||||
p('------------------', false, 'wechat_pay_notify');
|
p('------------------', false, 'wechat_pay_notify');
|
||||||
if (empty($result) || !is_array($result)) return response('error', 500);
|
if (empty($result) || !is_array($result)) {
|
||||||
|
empty($data['order']) || self::query($data['order']);
|
||||||
|
return response('error', 500);
|
||||||
|
}
|
||||||
//订单支付通知处理
|
//订单支付通知处理
|
||||||
if ($data['scen'] === 'order' && isset($result['trade_state']) && $result['trade_state'] == 'SUCCESS') {
|
if ($data['scen'] === 'order' && isset($result['trade_state']) && $result['trade_state'] == 'SUCCESS') {
|
||||||
if ($data['order'] !== $result['out_trade_no']) return response('error', 500);
|
if ($data['order'] !== $result['out_trade_no']) return response('error', 500);
|
||||||
@ -184,7 +187,7 @@ class PaymentService
|
|||||||
}
|
}
|
||||||
return response('success');
|
return response('success');
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
empty($data['code']) || self::query($data['code']);
|
empty($data['order']) || self::query($data['order']);
|
||||||
return json(['code' => 'FAIL', 'message' => $exception->getMessage()])->code(500);
|
return json(['code' => 'FAIL', 'message' => $exception->getMessage()])->code(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user