ctrlpanel/resources/views/store/checkout.blade.php

200 lines
9.1 KiB
PHP
Raw Normal View History

2021-06-05 09:26:32 +00:00
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{ _('Store') }}</h1>
2021-06-05 09:26:32 +00:00
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a class=""
href="{{ route('home') }}">{{ _('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route('store.index') }}">{{ _('Store') }}</a>
2021-12-13 01:48:02 +00:00
</li>
2021-06-05 09:26:32 +00:00
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section x-data="serverApp()" x-init="$watch('paymentMethod', value => setPaymentRoute(value))" class="content">
2021-06-05 09:26:32 +00:00
<div class="container-fluid">
<div class="row">
<div class="col-12">
<!-- Main content -->
<div class="invoice p-3 mb-3">
<!-- title row -->
<div class="row">
<div class="col-12">
<h4>
<i class="fas fa-globe"></i> {{ config('app.name', 'Laravel') }}
<small class="float-right">{{ _('Date') }}:
2021-12-13 01:48:02 +00:00
{{ Carbon\Carbon::now()->isoFormat('LL') }}</small>
2021-06-05 09:26:32 +00:00
</h4>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info">
<div class="col-sm-4 invoice-col">
{{ __('To') }}
2021-06-05 09:26:32 +00:00
<address>
<strong>{{ config('app.name', 'Controlpanel.GG') }}</strong><br>
{{ _('Email') }}: {{ env('PAYPAL_EMAIL', env('MAIL_FROM_NAME')) }}
2021-06-05 09:26:32 +00:00
</address>
</div>
<!-- /.col -->
<div class="col-sm-4 invoice-col">
{{ _('From') }}
2021-06-05 09:26:32 +00:00
<address>
2021-12-13 01:48:02 +00:00
<strong>{{ Auth::user()->name }}</strong><br>
{{ _('Email') }}: {{ Auth::user()->email }}
2021-06-05 09:26:32 +00:00
</address>
</div>
<!-- /.col -->
<div class="col-sm-4 invoice-col">
<b>{{ _('Status') }}</b><br>
<span class="badge badge-warning">{{ _('Pending') }}</span><br>
2021-12-13 01:48:02 +00:00
{{-- <b>Order ID:</b> 4F3S8J<br> --}}
2021-06-05 09:26:32 +00:00
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<!-- Table row -->
<div class="row">
<div class="col-12 table-responsive">
<table class="table table-striped">
<thead>
2021-12-13 01:48:02 +00:00
<tr>
<th>{{ _('Quantity') }}</th>
<th>{{ _('Product') }}</th>
<th>{{ _('Description') }}</th>
<th>{{ _('Subtotal') }}</th>
2021-12-13 01:48:02 +00:00
</tr>
2021-06-05 09:26:32 +00:00
</thead>
<tbody>
2021-12-13 01:48:02 +00:00
<tr>
<td>1</td>
<td><i class="fa fa-coins mr-2"></i>{{ $product->quantity }}
{{ strtolower($product->type) == 'credits' ? CREDITS_DISPLAY_NAME : $product->type }}
</td>
<td>{{ $product->description }}</td>
<td>{{ $product->formatToCurrency($product->price) }}</td>
</tr>
2021-06-05 09:26:32 +00:00
</tbody>
</table>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="row">
<!-- accepted payments column -->
<div class="col-6">
<p class="lead">{{ __('Payment Methods') }}:</p>
2021-06-05 09:26:32 +00:00
<div>
<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>
2021-06-05 09:26:32 +00:00
</div>
<!-- /.col -->
<div class="col-6">
2021-12-13 01:48:02 +00:00
<p class="lead">Amount Due {{ Carbon\Carbon::now()->isoFormat('LL') }}</p>
2021-06-05 09:26:32 +00:00
<div class="table-responsive">
<table class="table">
<tr>
<th style="width:50%">Subtotal:</th>
2021-12-13 01:48:02 +00:00
<td>{{ $product->formatToCurrency($product->price) }}</td>
2021-06-05 09:26:32 +00:00
</tr>
<tr>
2021-12-13 01:48:02 +00:00
<th>Tax ({{ $taxpercent }}%)</th>
<td>{{ $product->formatToCurrency($taxvalue) }}</td>
2021-06-05 09:26:32 +00:00
</tr>
<tr>
<th>Quantity:</th>
<td>1</td>
</tr>
<tr>
<th>Total:</th>
2021-12-13 01:48:02 +00:00
<td>{{ $product->formatToCurrency($total) }}</td>
2021-06-05 09:26:32 +00:00
</tr>
</table>
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<!-- this row will not appear when printing -->
<div class="row no-print">
<div class="col-12">
<a type="button" :href="paymentRoute" class="btn btn-success float-right"><i
class="far fa-credit-card mr-2"></i>
{{ __('Submit Payment') }}
2021-06-05 09:26:32 +00:00
</a>
</div>
</div>
</div>
<!-- /.invoice -->
</div><!-- /.col -->
</div><!-- /.row -->
</div>
</section>
<!-- 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>
2021-06-05 09:26:32 +00:00
@endsection