diff --git a/app/controller/api/WithdrawController.php b/app/controller/api/WithdrawController.php index 1de19f4..3b8c714 100644 --- a/app/controller/api/WithdrawController.php +++ b/app/controller/api/WithdrawController.php @@ -164,9 +164,14 @@ class WithdrawController Log::info('Payment Callback Received:', $callbackData); $orderId = $callbackData['TrackingNumber'] ?? null; $failedMessage = $callbackData['FailedMessage'] ?? null; + $amount = $callbackData['Amount'] ?? null; + $withdraw = Withdraw::where('order_number', $orderId)->first(); //$failedMessage为null就是成功 if ($failedMessage != null) { + $rate = ExchangeRate::where('type', 'BDT')->get(); + $money = $amount * 100 / $rate[0]['points'] + 300; + UserRewardDao::base($withdraw->user_id, 1, $money, '提现失败返还'); $withdraw->update([ 'status' => 5, 'status_text' => '支付失败: ' . $failedMessage,