Consolidate duplicate send-card error translations into messages.error.cannot_send_card
This commit is contained in:
@@ -52,11 +52,11 @@ class UserService implements UserServiceInterface
|
||||
$lockedSender = User::where('id', $sender->id)->lockForUpdate()->first();
|
||||
|
||||
if ($lockedSender->flag_send == config('constants.FLAG_SEND_DISABLED')) {
|
||||
throw new \App\Exceptions\ThankCardException(__('messages.error.no_send_permission'));
|
||||
throw new \App\Exceptions\ThankCardException(__('messages.error.cannot_send_card'));
|
||||
}
|
||||
|
||||
if ($lockedSender->card < $amount) {
|
||||
throw new \App\Exceptions\ThankCardException(__('messages.error.not_enough_cards'));
|
||||
throw new \App\Exceptions\ThankCardException(__('messages.error.cannot_send_card'));
|
||||
}
|
||||
|
||||
// Lock & check total sent cards to the receiver this month
|
||||
|
||||
Reference in New Issue
Block a user