yoco updated to use webhook
This commit is contained in:
@@ -0,0 +1,424 @@
|
||||
|
||||
|
||||
<?php $__env->startSection('title', 'Order #' . $order->order_number . ' - Order Details'); ?>
|
||||
|
||||
<?php $__env->startSection('styles'); ?>
|
||||
<style>
|
||||
/* Page-specific typography overrides */
|
||||
h1 {
|
||||
font-family: 'Abril Fatface', cursive;
|
||||
font-size: 2.5rem;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: 'Abril Fatface', cursive;
|
||||
font-size: 1.6rem;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: var(--font-sans);
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.page-intro {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.page-intro p {
|
||||
color: var(--text-secondary);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* Card styles */
|
||||
.card {
|
||||
padding: var(--spacing-lg);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
padding-bottom: var(--spacing-lg);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.card-section:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.content-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
/* Order items styling */
|
||||
.order-item {
|
||||
padding: var(--spacing-md);
|
||||
background-color: white;
|
||||
border-radius: 20px;
|
||||
margin-bottom: var(--spacing-md);
|
||||
border: 1px solid var(--border-color);
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.order-item:hover {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.item-price {
|
||||
font-weight: 700;
|
||||
color: var(--accent-dark);
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.item-meta {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Payment action styling */
|
||||
.payment-action-box {
|
||||
padding: var(--spacing-lg);
|
||||
border-radius: 20px;
|
||||
margin-top: var(--spacing-lg);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.payment-action-box.pending {
|
||||
background-color: var(--accent-light);
|
||||
border: 2px solid var(--accent-dark);
|
||||
}
|
||||
|
||||
.payment-action-box.failed {
|
||||
background-color: var(--accent-light);
|
||||
border: 2px solid var(--accent-dark);
|
||||
}
|
||||
|
||||
.payment-action-box.success {
|
||||
background-color: var(--accent-light);
|
||||
border: 2px solid var(--accent-dark);
|
||||
}
|
||||
|
||||
.payment-amount {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.payment-amount-label {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.payment-amount-value {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.pending .payment-amount-value {
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.failed .payment-amount-value {
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.success .payment-amount-value {
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 1rem 2rem;
|
||||
background-color: var(--accent-dark);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 20px;
|
||||
font-weight: 600;
|
||||
transition: var(--transition);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: var(--accent-pink);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-pending {var(--accent-dark);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-failed {
|
||||
background-color: var(--accent-dark)
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.success-check {
|
||||
font-sivar(--accent-dark)m;
|
||||
color: #28a745;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
padding: 0.4rem 0.8rem;
|
||||
border-radius: 20px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.status-badge.paid {var(--accent-light);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.status-badge.pending {
|
||||
background-color: var(--accent-light);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.status-badge.failed {
|
||||
background-color: var(--accent-light);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.status-badge.processing {
|
||||
background-color: var(--accent-light);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.status-badge.shipped {
|
||||
background-color: var(--accent-light);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
|
||||
.status-badge.delivered {
|
||||
background-color: var(--accent-light);
|
||||
color: var(--accent-dark)or: #d4edda;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.content-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.payment-action-box {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.payment-amount {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container">
|
||||
<div class="page-intro">
|
||||
<h1>Order Details</h1>
|
||||
<p>Order #<?php echo e($order->order_number); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="content-grid">
|
||||
<!-- Main Content -->
|
||||
<div>
|
||||
<!-- Order Status -->
|
||||
<div class="card">
|
||||
<h2>Order Status</h2>
|
||||
<div class="card-section">
|
||||
<span class="status-badge <?php echo e($order->status); ?>">
|
||||
<?php echo e(str_replace('_', ' ', ucfirst($order->status))); ?>
|
||||
|
||||
</span>
|
||||
<p style="margin-top: var(--spacing-sm); color: var(--text-secondary); font-size: 0.9rem;">
|
||||
Ordered on <?php echo e($order->created_at->format('d M Y \a\t H:i')); ?>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order Items -->
|
||||
<div class="card">
|
||||
<h2>Order Items</h2>
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $order->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div class="order-item">
|
||||
<div class="item-header">
|
||||
<div>
|
||||
<div class="item-name"><?php echo e($item->product->name); ?></div>
|
||||
<div class="item-meta"><?php echo e($item->type); ?></div>
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item->length): ?>
|
||||
<div class="item-meta">Length: <?php echo e($item->length); ?>m</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item->width && $item->height): ?>
|
||||
<div class="item-meta">Dimensions: <?php echo e($item->width); ?>m × <?php echo e($item->height); ?>m</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="item-price">R <?php echo e(number_format($item->price, 2)); ?></div>
|
||||
<div class="item-meta" style="text-align: right;">Qty: <?php echo e($item->quantity); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Shipping Details -->
|
||||
<div class="card">
|
||||
<h2>Delivery Details</h2>
|
||||
|
||||
<div class="card-section">
|
||||
<h3>Customer Information</h3>
|
||||
<dl style="color: var(--text-secondary);">
|
||||
<div class="spec-group">
|
||||
<dt>Name:</dt>
|
||||
<dd><?php echo e($order->customer_name); ?></dd>
|
||||
</div>
|
||||
<div class="spec-group">
|
||||
<dt>Email:</dt>
|
||||
<dd><?php echo e($order->customer_email); ?></dd>
|
||||
</div>
|
||||
<div class="spec-group">
|
||||
<dt>Phone:</dt>
|
||||
<dd><?php echo e($order->customer_phone); ?></dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="card-section">
|
||||
<h3>Shipping Address</h3>
|
||||
<p style="color: var(--text-secondary); line-height: 1.6;"><?php echo e($order->shipping_address); ?></p>
|
||||
</div>
|
||||
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->notes): ?>
|
||||
<div class="card-section">
|
||||
<h3>Order Notes</h3>
|
||||
<p style="color: var(--text-secondary);"><?php echo e($order->notes); ?></p>
|
||||
</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div>
|
||||
<!-- Order Summary & Payment -->
|
||||
<div class="card">
|
||||
<h2>Order Summary</h2>
|
||||
|
||||
<div class="card-section">
|
||||
<div class="payment-row" style="display: flex; justify-content: space-between; margin-bottom: var(--spacing-sm); color: var(--text-secondary);">
|
||||
<span>Subtotal:</span>
|
||||
<span>R <?php echo e(number_format($order->total, 2)); ?></span>
|
||||
</div>
|
||||
<div class="payment-row total" style="display: flex; justify-content: space-between; border-top: 2px solid var(--border-color); padding-top: var(--spacing-md); font-weight: 700; font-size: 1.2rem;">
|
||||
<span>Total:</span>
|
||||
<span>R <?php echo e(number_format($order->total, 2)); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 style="margin-top: var(--spacing-lg); margin-bottom: var(--spacing-md);">Payment Status</h3>
|
||||
|
||||
<div style="padding: var(--spacing-sm); background-color: var(--accent-light); border-radius: 20px; margin-bottom: var(--spacing-lg);">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<strong>Payment</strong>
|
||||
<span class="status-badge <?php echo e($order->payment_status); ?>"><?php echo e(ucfirst($order->payment_status)); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Payment Actions -->
|
||||
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->payment_status === 'pending' && $order->yoco_redirect_url): ?>
|
||||
<div class="payment-action-box pending">
|
||||
<div>
|
||||
<h3 style="margin-top: 0; color: var(--accent-dark);">Payment Required</h3>
|
||||
<p style="color: var(--accent-dark); margin: var(--spacing-sm) 0 0 0;">Click below to complete your payment.</p>
|
||||
<a href="<?php echo e($order->yoco_redirect_url); ?>"
|
||||
target="_blank"
|
||||
class="btn btn-pending"
|
||||
style="margin-top: var(--spacing-md);">
|
||||
Pay Now
|
||||
</a>
|
||||
</div>
|
||||
<div class="payment-amount">
|
||||
<div class="payment-amount-label">Amount Due</div>
|
||||
<div class="payment-amount-value">R <?php echo e(number_format($order->total, 2)); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif($order->payment_status === 'failed' && $order->yoco_redirect_url): ?>
|
||||
<div class="payment-action-box failed">
|
||||
<div>
|
||||
<h3 style="margin-top: 0; color: var(--accent-dark);">Payment Failed</h3>
|
||||
<p style="color: var(--accent-dark); margin: var(--spacing-sm) 0 0 0;">Please try your payment again.</p>
|
||||
<a href="<?php echo e($order->yoco_redirect_url); ?>"
|
||||
target="_blank"
|
||||
class="btn btn-failed"
|
||||
style="margin-top: var(--spacing-md);">
|
||||
Retry Payment
|
||||
</a>
|
||||
</div>
|
||||
<div class="payment-amount">
|
||||
<div class="payment-amount-label">Amount Due</div>
|
||||
<div class="payment-amount-value">R <?php echo e(number_format($order->total, 2)); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif($order->payment_status === 'paid'): ?>
|
||||
<div class="payment-action-box success">
|
||||
<div style="display: flex; gap: var(--spacing-md); align-items: flex-start;">
|
||||
<div class="success-check">✓</div>
|
||||
<div>
|
||||
<h3 style="margin-top: 0; color: var(--accent-dark);">Payment Received</h3>
|
||||
<p style="color: var(--accent-dark); margin: var(--spacing-sm) 0 0 0; font-size: 0.9rem;">Thank you! Your order is being processed.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Back Link -->
|
||||
<div style="text-align: center; margin-top: var(--spacing-lg);">
|
||||
<a href="<?php echo e(route('my-orders')); ?>" style="color: var(--accent-dark); text-decoration: none; font-weight: 600;">
|
||||
← Back to Orders
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/account/order-detail.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user