mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Require integer & min:1 on ACH verification fields
This commit is contained in:
parent
f2d3c88094
commit
754ac46017
@ -95,8 +95,12 @@ class ACH
|
|||||||
return render('gateways.stripe.ach.verify', $data);
|
return render('gateways.stripe.ach.verify', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processVerification($request, ClientGatewayToken $token)
|
public function processVerification(Request $request, ClientGatewayToken $token)
|
||||||
{
|
{
|
||||||
|
$request->validate([
|
||||||
|
'transactions.*' => ['integer', 'min:1'],
|
||||||
|
]);
|
||||||
|
|
||||||
if (isset($token->meta->state) && $token->meta->state === 'authorized') {
|
if (isset($token->meta->state) && $token->meta->state === 'authorized') {
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('client.payment_methods.show', $token->hashed_id)
|
->route('client.payment_methods.show', $token->hashed_id)
|
||||||
|
@ -11,11 +11,23 @@
|
|||||||
<input type="hidden" name="source" value="{{ $token->token }}">
|
<input type="hidden" name="source" value="{{ $token->token }}">
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => '#1 ' . ctrans('texts.amount_cents')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => '#1 ' . ctrans('texts.amount_cents')])
|
||||||
<input type="text" name="transactions[]" class="w-full input" required dusk="verification-1st">
|
<input type="text" name="transactions[]" class="w-full input" required dusk="verification-1st" value="{{ old('transactions.0') }}">
|
||||||
|
|
||||||
|
@error('transactions.0')
|
||||||
|
<div class="validation validation-fail">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.components.general.card-element', ['title' => '#2 ' . ctrans('texts.amount_cents')])
|
@component('portal.ninja2020.components.general.card-element', ['title' => '#2 ' . ctrans('texts.amount_cents')])
|
||||||
<input type="text" name="transactions[]" class="w-full input" required dusk="verification-2nd">
|
<input type="text" name="transactions[]" class="w-full input" required dusk="verification-2nd" value="{{ old('transactions.1') }}">
|
||||||
|
|
||||||
|
@error('transactions.1')
|
||||||
|
<div class="validation validation-fail">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
@component('portal.ninja2020.gateways.includes.pay_now', ['type' => 'submit'])
|
@component('portal.ninja2020.gateways.includes.pay_now', ['type' => 'submit'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user