<%= t('customer.public_voucher.title', 'Voucher Hotspot') %>
<%= settings.company_header || 'OPEN-ISP' %> — <%= t('customer.public_voucher.subtitle', 'beli & kirim ke WhatsApp') %>
<% if (error) { %>
<% } else if (String(order.status) === 'paid') { %>
<% } %>
<%= error %>
<% } %>
<% if (info) { %> <%= info %>
<% } %>
<% if (order) { %>
<%= t('customer.public_voucher.order_status', 'Status Pesanan') %>
Order #<%= order.id %> • WA: <%= order.buyer_phone %>
<% const st = String(order.status || 'pending'); %>
<% if (st === 'fulfilled') { %> <%= t('customer.public_voucher.st_done', 'Selesai') %>
<% } else if (st === 'paid') { %> <%= t('customer.public_voucher.st_process', 'Diproses') %>
<% } else { %> <%= t('customer.public_voucher.st_wait', 'Menunggu') %><% } %>
<%= t('customer.public_voucher.pkg', 'Paket') %>: <%= order.profile_name %> •
<%= t('customer.public_voucher.duration', 'Durasi') %>: <%= order.validity || '-' %> •
<%= t('customer.public_voucher.price', 'Harga') %>: Rp <%= Number(order.price || 0).toLocaleString('id-ID') %>
<% if (String(order.status) === 'fulfilled' && order.voucher_code) { %>
<%= t('customer.public_voucher.ready', 'Voucher Siap') %>
User<%= order.voucher_code %>
Pass<%= order.voucher_password %>
<% if (Number(order.wa_sent || 0) === 1) { %>
<%= t('customer.public_voucher.sent_wa', 'Voucher berhasil dikirim ke WhatsApp pembeli.') %>
<% } else if (order.wa_error) { %>
<%= t('customer.public_voucher.wa_fail', 'WhatsApp gagal terkirim') %>: <%= order.wa_error %>
<%= t('customer.public_voucher.backup', 'Cadangan: simpan kode voucher yang tampil di halaman ini.') %>
<% } else { %>
<%= t('customer.public_voucher.fallback', 'Jika WhatsApp gagal terkirim, kode voucher tetap tampil di halaman ini.') %>
<% } %>
<%= t('customer.public_voucher.paid_processing', 'Pembayaran berhasil — voucher sedang dibuat di MikroTik. Halaman ini diperbarui otomatis.') %>
<% } else if (String(order.status) === 'pending' && (String(order.payment_gateway || '') === 'qris_static' || order.qris_amount_unique)) { %>
<% if (orderToken) { %>
<%= t('customer.public_voucher.open_qris', 'Buka QRIS Statis') %>
<% } else { %>
<%= t('customer.public_voucher.qris_na', 'Link QRIS tidak tersedia.') %>
<% } %>
<% } else if (String(order.status) === 'pending' && order.payment_link) { %>
<%= t('customer.public_voucher.continue_pay', 'Lanjutkan Pembayaran') %>
<% } %>
<% } %>
© <%= new Date().getFullYear() %> <%= settings.company_header || '' %>