|
|
|
|
@ -627,7 +627,7 @@ class OrdersController extends CommonController
|
|
|
|
|
public function recharge()
|
|
|
|
|
{
|
|
|
|
|
Log::channel("daily_customer_order_request")->info($this->customer->openid);
|
|
|
|
|
$order = (new Orders())->with("project")->find(request()->order_id);
|
|
|
|
|
$order = (new Orders())->with(["project", "wechatpayAccount"])->find(request()->order_id);
|
|
|
|
|
|
|
|
|
|
$openid = $this->customer->openid;
|
|
|
|
|
$unifiedOrder = new \UnifiedOrderPub($order->project_id);
|
|
|
|
|
@ -637,7 +637,7 @@ class OrdersController extends CommonController
|
|
|
|
|
"money" => request()->money,
|
|
|
|
|
"order_id" => request()->order_id,
|
|
|
|
|
"payment" => "weixin",
|
|
|
|
|
"merchant_id" => env("WEIXINPAY_MCHID")
|
|
|
|
|
"merchant_id" => $order->wechatpayAccount->mch_id
|
|
|
|
|
]);
|
|
|
|
|
$recharge = $recharge->getSerial();
|
|
|
|
|
|
|
|
|
|
@ -657,7 +657,7 @@ class OrdersController extends CommonController
|
|
|
|
|
$unifiedOrder->setParameter("notify_url", get_http_type() . $_SERVER["HTTP_HOST"] . "/customer/pay-callback");//通知地址
|
|
|
|
|
$unifiedOrder->setParameter("trade_type", "JSAPI");//交易类型
|
|
|
|
|
} catch (\Exception $exception) {
|
|
|
|
|
Log::channel("daily_customer_order_request")->info("order_id:".request()->order_id.":".$exception->getMessage());
|
|
|
|
|
Log::channel("daily_customer_order_request")->info("order_id:" . request()->order_id . ":" . $exception->getMessage());
|
|
|
|
|
return response()->json([
|
|
|
|
|
"errorcode" => $exception->getCode(),
|
|
|
|
|
"errormsg" => $exception->getMessage()
|
|
|
|
|
|