feat: ✨ Added conditional payment methods options
This commit is contained in:
parent
a6f200ca55
commit
9d8361641b
|
@ -104,22 +104,25 @@
|
||||||
<p class="lead">{{ __('Payment Methods') }}:</p>
|
<p class="lead">{{ __('Payment Methods') }}:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="text-center " for="paypal">
|
@if (env('PAYPAL_SANDBOX_SECRET') || env('PAYPAL_SECRET'))
|
||||||
<img class="mb-3" height="50"
|
<label class="text-center " for="paypal">
|
||||||
src="{{ url('/images/paypal_logo.png') }}"></br>
|
<img class="mb-3" height="50"
|
||||||
|
src="{{ url('/images/paypal_logo.png') }}"></br>
|
||||||
|
|
||||||
<input x-model="paymentMethod" type="radio" id="paypal" value="paypal"
|
<input x-model="paymentMethod" type="radio" id="paypal" value="paypal"
|
||||||
name="payment_method">
|
name="payment_method">
|
||||||
</input>
|
</input>
|
||||||
</label>
|
</label>
|
||||||
|
@endif
|
||||||
<label class="ml-5 text-center " for="stripe">
|
@if (env('STRIPE_TEST_SECRET') || env('STRIPE_SECRET'))
|
||||||
<img class="mb-3" height="50"
|
<label class="ml-5 text-center " for="stripe">
|
||||||
src="{{ url('/images/stripe_logo.png') }}" /></br>
|
<img class="mb-3" height="50"
|
||||||
<input x-model="paymentMethod" type="radio" id="stripe" value="stripe"
|
src="{{ url('/images/stripe_logo.png') }}" /></br>
|
||||||
name="payment_method">
|
<input x-model="paymentMethod" type="radio" id="stripe" value="stripe"
|
||||||
</input>
|
name="payment_method">
|
||||||
</label>
|
</input>
|
||||||
|
</label>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -135,7 +138,7 @@
|
||||||
<td>{{ $product->formatToCurrency($product->price) }}</td>
|
<td>{{ $product->formatToCurrency($product->price) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Tax ({{ $taxpercent }}%)</th>
|
<th>{{ __('Tax') }} ({{ $taxpercent }}%)</th>
|
||||||
<td>{{ $product->formatToCurrency($taxvalue) }}</td>
|
<td>{{ $product->formatToCurrency($taxvalue) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -143,7 +146,7 @@
|
||||||
<td>1</td>
|
<td>1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Total:</th>
|
<th>{{ __('Total') }}:</th>
|
||||||
<td>{{ $product->formatToCurrency($total) }}</td>
|
<td>{{ $product->formatToCurrency($total) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -156,7 +159,8 @@
|
||||||
<!-- this row will not appear when printing -->
|
<!-- this row will not appear when printing -->
|
||||||
<div class="row no-print">
|
<div class="row no-print">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a type="button" :href="paymentRoute" class="btn btn-success float-right"><i
|
<a type="button" :href="paymentRoute" :disabled="!paymentRoute"
|
||||||
|
:class="!paymentRoute ? 'disabled' : ''" class="btn btn-success float-right"><i
|
||||||
class="far fa-credit-card mr-2"></i>
|
class="far fa-credit-card mr-2"></i>
|
||||||
{{ __('Submit Payment') }}
|
{{ __('Submit Payment') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue