6
0
Fork 0
release
李静 2021-12-31 18:45:09 +08:00
parent e08be76805
commit 2f78529cbd
1 changed files with 14 additions and 0 deletions

View File

@ -119,6 +119,20 @@ class WalletController extends Controller
throw new PayPasswordIncorrectException();
}
switch ($validated['pay_way']) {
case PayLog::PAY_WAY_WALLET:
if ($user->wallet->is_frozen) {
throw new WalletFrozenException();
}
break;
case PayLog::PAY_WAY_BALANCE:
if ($user->balance->is_frozen) {
throw new BalanceFrozenException();
}
break;
}
try {
DB::transaction(function () use ($user, $validated) {
$payLog = PayLog::where('pay_sn', $validated['pay_sn'])