diff --git a/app/Http/Controllers/Server/H5/EarningController.php b/app/Http/Controllers/Server/H5/EarningController.php index 06a3c3a..c2e5fca 100644 --- a/app/Http/Controllers/Server/H5/EarningController.php +++ b/app/Http/Controllers/Server/H5/EarningController.php @@ -273,10 +273,17 @@ class EarningController extends Controller public function MyWithdraws(Request $request) { try { + $appId = config("service_payment.app_id"); + $mchId = config("service_payment.mch_id"); $merchant_id = $request->merchant_id ?? 0; $merchant_user_id = $request->merchant_user_id ?? 0; - $result = MEarningwithdraws::whereIn('status', ['finished', 'freezing', "wait_user_confirm"])->where('m_id', $merchant_id)->where('m_user_id', $merchant_user_id)->paginate(); - return $this->success('ok', $result); + $list = MEarningwithdraws::whereIn('status', ['finished', 'freezing', "wait_user_confirm"])->where('m_id', $merchant_id)->where('m_user_id', $merchant_user_id)->paginate(); + foreach ($list as $item) { + $item->app_id = $appId; + $item->mch_id = $mchId; + } + + return $this->success('ok', $list); } catch (\Exception $e) { $this->getError($e); return $this->failure('服务器休息中,请稍后再试'); @@ -650,7 +657,9 @@ class EarningController extends Controller $withdraw->status = "wait_user_confirm"; $withdraw->save(); DB::commit(); - return $this->success('ok', ['status' => 1, "package_info" => $package_info, "app_id" => "wx36c72a00f1b2be64", "mch_id" => "1581903621"]); + $appId = config("service_payment.app_id"); + $mchId = config("service_payment.mch_id"); + return $this->success('ok', ['status' => 1, "package_info" => $package_info, "app_id" => $appId, "mch_id" => $mchId]); // //修改账号状态 // $earning_account->decrement('frozen_withdraw', $amount);