@if ($user == null)
User not found/not registered
@else
@php
$payment_amount = $user->ticket_type;
if ($payment_amount == '8000') {
$amount = 8000;
$currency = 'KSH';
$description = 'Regular Delegate (Full Access 3-Day Pass) – KES 8,000 /=';
} elseif ($payment_amount == '10000') {
$amount = 10000;
$currency = 'KSH';
$description = 'Regular Delegate (Full Access 3-Day Pass) – KES 10,000 /=';
} elseif ($payment_amount == '12000') {
$amount = 12000;
$currency = 'KSH';
$description = 'Regular Delegate (Full Access 3-Day Pass) – KES 12,000 /=';
} elseif ($payment_amount == '2000') {
$amount = 2000;
$currency = 'KSH';
$description = 'Students (Full Access 3-Day Pass) – KES 2,000 /=';
} elseif ($payment_amount == '3000') {
$amount = 3000;
$currency = 'KSH';
$description = '1-Day Pass (Single Day Attendees) – KES 3,000 /=';
} elseif ($payment_amount == '4000') {
$amount = 4000;
$currency = 'KSH';
$description = 'Regular Delegate (Single Day Attendees) – KES 4,000 /=';
} elseif (strpos($payment_amount, 'usd-') === 0) {
// Check if payment_amount starts with 'usd-'
$amount = (int) str_replace('usd-', '', $payment_amount);
$currency = 'USD';
if ($amount == 60) {
//International Delegate (Full Access 3-Day Pass) - $60
$description = 'International Delegate (Full Access 3-Day Pass) - USD 60';
} elseif ($amount == 50) {
$description = 'Full Access 3-Day Pass - USD 50 per attendee (from USD 150 per group)';
} elseif ($amount == 15) {
$description = 'Full Access 1-Day Pass - USD 15 per attendee (from USD 45 per group)';
} elseif ($amount == 50) {
$description = 'Full Access 3-Day Pass - USD 50 per attendee (from USD 150 per group)';
} elseif ($amount == 80) {
$description = 'International Delegate (Full Access 3-Day Pass) - USD 80';
} elseif ($amount == 30) {
$description = 'International Delegate (1-Day Pass) - USD 30';
} else {
$description = 'Unknown';
}
} elseif ($payment_amount == '7000') {
$amount = 7000;
$currency = 'KSH';
$description = '3-Day Pass – KES 7,000 /= per attendee (from KES 21,000 /= per group)';
} elseif ($payment_amount == '2500') {
$amount = 2500;
$currency = 'KSH';
$description = '1-Day Pass – KES 2,500 /= per attendee (from KES 7,500 /= per group)';
} else {
// Default description and amount if none of the conditions match
$amount = 0; // You can set a default amount here
$currency = 'KSH'; // Default currency is KSH
$description = 'Unknown Payment Amount';
}
@endphp
@if ($user->payment == null)
Package: {{ $description }}
- Name:
{{ $user->name }}
- Payment
mode:
{{ $currency == 'USD' ? 'PayPal' : 'M-Pesa' }}
Scan new
@else
@php
if ($currency == 'KSH') {
$paymentdetails = $user->mpesa;
} else {
$paymentdetails = $user->paypal;
}
@endphp
- Ticket:
{{ $description }}
- Payment mode:
{{ $currency == 'USD' ? 'PayPal' : 'M-Pesa' }}
- Payment date:
{{ date('jS M Y \a\t h:m A', strtotime(optional($paymentdetails)->created_at)) }}
- Country:
{{ $user->country->country }}
- County:
{{ $user->county->county }}
Scan new
@endif
@endif