|
@@ -702,6 +702,11 @@ class OrdersController extends BaseController
|
|
|
$order_info = OrderService::getByTradeNo($order);
|
|
|
if ($order_info && $order_info->status == 'PAID') {
|
|
|
return response()->success();
|
|
|
+ }else{
|
|
|
+ $result = $this->queryWechatPayResult($order);
|
|
|
+ if ($result){
|
|
|
+ return response()->success();
|
|
|
+ }
|
|
|
}
|
|
|
return response()->success($order);
|
|
|
}
|
|
@@ -776,4 +781,23 @@ class OrdersController extends BaseController
|
|
|
$res = UserChargeService::getTemplate($this->uid,$send_order_id,$this->distribution_channel_id);
|
|
|
return response()->success($res);
|
|
|
}
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 微信订单支付查询
|
|
|
+ * name: queryWechatPayResult
|
|
|
+ * @param mixed $order 订单号
|
|
|
+ * @return bool
|
|
|
+ * date 2022/07/29 11:11
|
|
|
+ */
|
|
|
+ private function queryWechatPayResult($order = ""): bool
|
|
|
+ {
|
|
|
+ $config = PayMerchantService::findPayConfig($this->h5_pay_merchat_id);
|
|
|
+ $app = PayFactory::official($config);
|
|
|
+ $result = $app->query($order);
|
|
|
+ if ($result){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|