feat: ✨ added payment method selection & localized strings
This commit is contained in:
parent
53bc28376e
commit
67ac187f26
BIN
public/images/paypal_logo.png
Normal file
BIN
public/images/paypal_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
public/images/stripe_logo.png
Normal file
BIN
public/images/stripe_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -6,12 +6,14 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1>Store</h1>
|
<h1>{{ _('Store') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
<li class="breadcrumb-item"><a class="" href="{{ route('home') }}">Dashboard</a></li>
|
<li class="breadcrumb-item"><a class=""
|
||||||
<li class="breadcrumb-item"><a class="text-muted" href="{{ route('store.index') }}">Store</a>
|
href="{{ route('home') }}">{{ _('Dashboard') }}</a></li>
|
||||||
|
<li class="breadcrumb-item"><a class="text-muted"
|
||||||
|
href="{{ route('store.index') }}">{{ _('Store') }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +23,7 @@
|
||||||
<!-- END CONTENT HEADER -->
|
<!-- END CONTENT HEADER -->
|
||||||
|
|
||||||
<!-- MAIN CONTENT -->
|
<!-- MAIN CONTENT -->
|
||||||
<section class="content">
|
<section x-data="serverApp()" x-init="$watch('paymentMethod', value => setPaymentRoute(value))" class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -35,7 +37,7 @@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h4>
|
<h4>
|
||||||
<i class="fas fa-globe"></i> {{ config('app.name', 'Laravel') }}
|
<i class="fas fa-globe"></i> {{ config('app.name', 'Laravel') }}
|
||||||
<small class="float-right">Date:
|
<small class="float-right">{{ _('Date') }}:
|
||||||
{{ Carbon\Carbon::now()->isoFormat('LL') }}</small>
|
{{ Carbon\Carbon::now()->isoFormat('LL') }}</small>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,21 +49,21 @@
|
||||||
To
|
To
|
||||||
<address>
|
<address>
|
||||||
<strong>{{ config('app.name', 'Controlpanel.GG') }}</strong><br>
|
<strong>{{ config('app.name', 'Controlpanel.GG') }}</strong><br>
|
||||||
Email: {{ env('PAYPAL_EMAIL', env('MAIL_FROM_NAME')) }}
|
{{ _('Email') }}: {{ env('PAYPAL_EMAIL', env('MAIL_FROM_NAME')) }}
|
||||||
</address>
|
</address>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-sm-4 invoice-col">
|
<div class="col-sm-4 invoice-col">
|
||||||
From
|
{{ _('From') }}
|
||||||
<address>
|
<address>
|
||||||
<strong>{{ Auth::user()->name }}</strong><br>
|
<strong>{{ Auth::user()->name }}</strong><br>
|
||||||
Email: {{ Auth::user()->email }}
|
{{ _('Email') }}: {{ Auth::user()->email }}
|
||||||
</address>
|
</address>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-sm-4 invoice-col">
|
<div class="col-sm-4 invoice-col">
|
||||||
<b>Status</b><br>
|
<b>{{ _('Status') }}</b><br>
|
||||||
<span class="badge badge-warning">Pending</span><br>
|
<span class="badge badge-warning">{{ _('Pending') }}</span><br>
|
||||||
{{-- <b>Order ID:</b> 4F3S8J<br> --}}
|
{{-- <b>Order ID:</b> 4F3S8J<br> --}}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
|
@ -74,10 +76,10 @@
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Quantity</th>
|
<th>{{ _('Quantity') }}</th>
|
||||||
<th>Product</th>
|
<th>{{ _('Product') }}</th>
|
||||||
<th>Description</th>
|
<th>{{ _('Description') }}</th>
|
||||||
<th>Subtotal</th>
|
<th>{{ _('Subtotal') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -99,14 +101,27 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- accepted payments column -->
|
<!-- accepted payments column -->
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<p class="lead">Payment Methods:</p>
|
<p class="lead">{{ __('Payment Methods') }}:</p>
|
||||||
|
|
||||||
<img src="https://www.paypalobjects.com/digitalassets/c/website/logo/full-text/pp_fc_hl.svg"
|
<div>
|
||||||
alt="Paypal">
|
<label class="text-center " for="paypal">
|
||||||
|
<img class="mb-3" height="50"
|
||||||
|
src="{{ url('/images/paypal_logo.png') }}"></br>
|
||||||
|
|
||||||
|
<input x-model="paymentMethod" type="radio" id="paypal" value="paypal"
|
||||||
|
name="payment_method">
|
||||||
|
</input>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="ml-5 text-center " for="stripe">
|
||||||
|
<img class="mb-3" height="50"
|
||||||
|
src="{{ url('/images/stripe_logo.png') }}" /></br>
|
||||||
|
<input x-model="paymentMethod" type="radio" id="stripe" value="stripe"
|
||||||
|
name="payment_method">
|
||||||
|
</input>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">
|
|
||||||
By purchasing this product you agree and accept our terms of service</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
@ -140,15 +155,9 @@
|
||||||
<!-- 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 href="{{ route('payment.PaypalPay', $product->id) }}" type="button"
|
<a type="button" :href="paymentRoute" class="btn btn-success float-right"><i
|
||||||
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"></i> Submit
|
class="far fa-credit-card mr-2"></i>
|
||||||
PayPal
|
{{ __('Submit Payment') }}
|
||||||
Payment
|
|
||||||
</a>
|
|
||||||
<a href="{{ route('payment.StripePay', $product->id) }}" type="button"
|
|
||||||
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"></i> Submit
|
|
||||||
Stripe
|
|
||||||
Payment
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,10 +165,35 @@
|
||||||
<!-- /.invoice -->
|
<!-- /.invoice -->
|
||||||
</div><!-- /.col -->
|
</div><!-- /.col -->
|
||||||
</div><!-- /.row -->
|
</div><!-- /.row -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT -->
|
<!-- END CONTENT -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function serverApp() {
|
||||||
|
return {
|
||||||
|
//loading
|
||||||
|
paymentMethod: '',
|
||||||
|
paymentRoute: '',
|
||||||
|
|
||||||
|
setPaymentRoute(provider) {
|
||||||
|
switch (provider) {
|
||||||
|
case 'paypal':
|
||||||
|
this.paymentRoute = '{{ route('payment.PaypalPay', $product->id) }}';
|
||||||
|
break;
|
||||||
|
case 'stripe':
|
||||||
|
this.paymentRoute = '{{ route('payment.StripePay', $product->id) }}';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.paymentRoute = '{{ route('payment.PaypalPay', $product->id) }}';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
Loading…
Reference in a new issue