CREDITS_DISPLAY_NAME
This commit is contained in:
parent
3f78d7dd1d
commit
e9bc2e8827
1 changed files with 2 additions and 2 deletions
|
@ -143,14 +143,14 @@ class VoucherController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->user()->credits + $voucher->credits >= 99999999) throw ValidationException::withMessages([
|
if ($request->user()->credits + $voucher->credits >= 99999999) throw ValidationException::withMessages([
|
||||||
'code' => "You can't redeem this voucher because you would exceed the credit limit"
|
'code' => "You can't redeem this voucher because you would exceed the ".CREDITS_DISPLAY_NAME." limit"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
#redeem voucher
|
#redeem voucher
|
||||||
$voucher->redeem($request->user());
|
$voucher->redeem($request->user());
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => "{$voucher->credits} credits have been added to your balance!"
|
'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME." have been added to your balance!"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue