mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-06 20:50:01 +00:00
完善 人工支付 处理逻辑
This commit is contained in:
@@ -50,11 +50,19 @@ class Manual extends AbstractPayment
|
||||
{
|
||||
$code = $request->input('sign');
|
||||
$status = $request->input('status');
|
||||
if ($code && $status) {
|
||||
if (isset($status, $code)) {
|
||||
$payment = Payment::findOrFail((int) string_decrypt($code));
|
||||
if ($payment && $payment->order) {
|
||||
$payment->order->complete();
|
||||
if ($payment && $payment->order && $payment->order->status === 1) {
|
||||
if ($status) {
|
||||
$payment->order->complete();
|
||||
} else {
|
||||
$payment->order->close();
|
||||
}
|
||||
|
||||
exit('success');
|
||||
}
|
||||
exit('fail');
|
||||
}
|
||||
exit('No enough information');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class PaymentConfirm extends Notification
|
||||
$order = $this->order;
|
||||
$goods = $this->order->goods;
|
||||
$sign = string_encrypt($order->payment->id);
|
||||
$message = sprintf("🛒 人工支付\n————————\n\t💰 金额:%s\n\t📦 商品:%s\n\t", $order->amount, $goods->name ?? '余额充值');
|
||||
$message = sprintf("🛒 人工支付\n———————————————\n\t\tℹ️账号:%s\n\t\t💰 金额:%s\n\t\t📦 商品:%s\n\t\t", $order->user->username, $order->amount, $goods->name ?? '余额充值');
|
||||
foreach (User::role('Super Admin')->get() as $admin) {
|
||||
if (! $admin->telegram_user_id) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user