{{ t('checkout_with_paypal') }}

{{ t('paypal_payment') }}

{{ t('complete_payment_paypal') }}

{{ t('invoice_details') }}

{{ $invoice->formattedTotal() }}
{{ t('invoice_number') }}
{{ $invoice->invoice_number ?? format_draft_invoice_number() }}
{{ t('description') }}
{{ $invoice->title }}
{{ t('subtotal') }}
{{ $invoice->formatAmount($invoice->subTotal()) }}
@php // Make sure taxes are calculated and applied if ($invoice->taxes()->count() === 0) { $invoice->applyTaxes(); } // Recalculate tax details after ensuring they're applied $taxDetails = $invoice->getTaxDetails(); $baseAmount = $invoice->formatAmount($invoice->subTotal()); $totalTaxAmount = 0; $taxBreakdown = []; // Calculate total tax amount from tax details foreach ($taxDetails as $tax) { $taxBreakdown[] = $tax['formatted_rate'] . ' ' . $tax['name']; $totalTaxAmount += $tax['amount']; } // Force recalculation of total with taxes $invoice->calculateTotalTaxAmount(); // Use the $remainingCredit variable passed from controller // (similar to Stripe and Razorpay implementations) @endphp @if (count($taxDetails) > 0) @foreach ($taxDetails as $tax)
{{ $tax['name'] }} ({{ $tax['formatted_rate'] }})
@php // Calculate tax amount based on rate and subtotal if it's showing as 0 $taxAmount = $tax['amount']; if ($taxAmount <= 0 && $tax['rate'] > 0) { $taxAmount = $invoice->subTotal() * ($tax['rate'] / 100); } echo $invoice->formatAmount($taxAmount); @endphp
@endforeach @endif @if ($invoice->fee > 0)
{{ t('fee') }}
{{ $invoice->formatAmount($invoice->fee) }}
@endif
{{ t('total_amount') }}
{{ $invoice->formattedTotal() }}
@if ($remainingCredit > 0)
{{ t('total_credit_remaining') }}
{{ '-' . $invoice->formatAmount($remainingCredit) }}
@endif @if ($invoice->hasCoupon())
{{ t('coupon_discount') }} ({{ $invoice->coupon_code }})
@php // Show the actual coupon discount applied after credit deduction $creditAmount = $remainingCredit > 0 ? $remainingCredit : 0; $displayCouponAmount = $invoice->getCouponDiscountAfterCredit($creditAmount); @endphp -{{ $invoice->formatAmount($displayCouponAmount) }}
@endif @if ($remainingCredit > 0 || $invoice->hasCoupon())
{{ t('final_payable_amount') }}
@php $creditAmount = $remainingCredit > 0 ? $remainingCredit : 0; @endphp {{ $invoice->formatAmount($invoice->finalPayableAmount($creditAmount)) }}
@endif
@include('partials.coupon-form', ['invoice' => $invoice])

{{ t('payment_details') }}

{{ t('checkout_with_paypal') }}

{{ t('secure_payment_powered_by_paypal') }}
@push('scripts') @php $paypalMode = get_setting('payment.paypal_mode', 'sandbox'); $paypalSdkUrl = $paypalMode === 'sandbox' ? 'https://www.sandbox.paypal.com/sdk/js' : 'https://www.paypal.com/sdk/js'; @endphp @endpush