|
@@ -21,10 +21,15 @@ class OrderPaySuccess
|
|
|
{
|
|
|
$order = Order::where('trade_no', $trade_no)->first();
|
|
|
\Log::info('OrderPaySuccess_handle:trade_no:'.$trade_no.' transaction_id:'.$transaction_id);
|
|
|
- //订单跨天
|
|
|
- $is_change = self::orderAcrossDay($order);
|
|
|
- $order->transaction_id = $transaction_id;
|
|
|
+
|
|
|
+ if(is_empty($order)){
|
|
|
+ $order= Order::onWriteConnection()->where('trade_no', $trade_no)->first();
|
|
|
+ }
|
|
|
+
|
|
|
if ($order) {
|
|
|
+ $is_change = self::orderAcrossDay($order);
|
|
|
+ //订单跨天
|
|
|
+ $order->transaction_id = $transaction_id;
|
|
|
try {
|
|
|
//添加异步任务队列
|
|
|
$job = new QappOrder($trade_no);
|
|
@@ -33,6 +38,7 @@ class OrderPaySuccess
|
|
|
sendNotice($e->getMessage());
|
|
|
}
|
|
|
if ($order->status == 'PAID') {
|
|
|
+
|
|
|
myLog('pay_notify')->info('has_pay:' . $trade_no);
|
|
|
return true;
|
|
|
}
|