I'm making a donate feature in my laravel project where user can donate with paypal and credit card.I made the form with basic input and it works but now i have to do it with an select dropdown where you can select the value or a specific amount and that value i have to send it to controller
This is the form and i have to send the amount to controller but it only works with the select input
and when i select other
to type the specific value the form is returning value 0
<form method="POST" id="payment-form" action="{!! URL::to('paypal') !!}">
{{ csrf_field() }}
<div class="form-group form-group-s">
<select class="form-control" id="amount" name="amount">
<option value="50">CHF 50</option>
<option value="200">CHF 200</option>
<option value="500">CHF 500</option>
<option value="2000">CHF 2000</option>
<option id="other">Other</option>
</select>
<div class="form-group otherName" id="amount">
<label for=""></label>
<input type="number" id="amount" name="amount" class="form-control" placeholder="CHF" />
</div>
</div>
<div class=" form-group">
<button class="form-control btn btn-subscribe"><i class="fab fa-paypal"></i> Pay with PayPal</button>
</div>
So here needs to come the amount but it does not recognize 2 amount ids so i dont know what to do..
$item1->setName('Amount')
->setCurrency('EUR')
->setQuantity(1)
->setPrice($request->get('amount'));