修复 支付
This commit is contained in:
parent
5dc942ea1c
commit
8cd9cce185
@ -88,30 +88,6 @@ public function show(Balance $balance)
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return $pay;
|
return $pay;
|
||||||
|
|
||||||
|
|
||||||
// $result = false;
|
|
||||||
// try {
|
|
||||||
// $result = $this->checkAndCharge($balance, true);
|
|
||||||
// // if ($responseChecker->success($result)) {
|
|
||||||
// // $html = $result->body;
|
|
||||||
// // return view('pay', compact('html'));
|
|
||||||
// // }
|
|
||||||
// } catch (Exception $e) {
|
|
||||||
// Log::error($e);
|
|
||||||
// return $this->error($e->getMessage());
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if ($result) {
|
|
||||||
|
|
||||||
|
|
||||||
// return response($pay);
|
|
||||||
// } else {
|
|
||||||
// return $this->error('支付失败');
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// return $this->success($balance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function notify(Request $request)
|
public function notify(Request $request)
|
||||||
@ -129,7 +105,7 @@ public function notify(Request $request)
|
|||||||
// 检测订单是否已支付
|
// 检测订单是否已支付
|
||||||
if ($balance->paid_at !== null) {
|
if ($balance->paid_at !== null) {
|
||||||
// return $this->success('订单已支付');
|
// return $this->success('订单已支付');
|
||||||
return view('pay_success');
|
return view('pay_process');
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = Pay::alipay()->callback();
|
$data = Pay::alipay()->callback();
|
||||||
@ -148,11 +124,9 @@ public function notify(Request $request)
|
|||||||
throw new ChargeException('商户不匹配');
|
throw new ChargeException('商户不匹配');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->checkAndCharge($balance)) {
|
$this->checkAndCharge($balance);
|
||||||
return $this->success();
|
|
||||||
} else {
|
return view('pay_process');
|
||||||
return $this->error();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkAndCharge(Balance $balance, $check = false)
|
public function checkAndCharge(Balance $balance, $check = false)
|
||||||
@ -176,7 +150,7 @@ public function checkAndCharge(Balance $balance, $check = false)
|
|||||||
return $this->error('无法验证支付结果');
|
return $this->error('无法验证支付结果');
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('pay_success');
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>支付结果</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<p>无法完成支付,请联系我们。</p>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
13
resources/views/pay_process.blade.php
Normal file
13
resources/views/pay_process.blade.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>支付进度</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<p>非常感谢。我们正在处理您的支付,稍后您就可以在交易记录中看到了。</p>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -1,13 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>支付结果</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<p>非常感谢。您现在可以关闭页面并继续刚才的操作了。</p>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue
Block a user