Skip to content

Commit 78f0a64

Browse files
authored
Update payment messages and error handling
1 parent 109386b commit 78f0a64

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

assets/js/tools.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ const photoboothTools = (function () {
635635
const paymentMessage = (config.payments?.message || api.getTranslation('payments_message')).replace('%price%', priceEuro);
636636
const paymentQrMsg = api.getTranslation('payments_qr_message');
637637
const paymentTerminslMsg = api.getTranslation('payments_terminal_message');
638+
638639
api.overlay.show(paymentMessage);
639640
api.isPrinting = true;
640641
if (typeof remoteBuzzerClient !== 'undefined') {
@@ -670,19 +671,19 @@ const photoboothTools = (function () {
670671
api.overlay.show(`
671672
<div style="text-align:center;">
672673
<div style="font-size:1.4em; margin-bottom:12px;">${paymentMessage}</div>
673-
<div style="margin-bottom:10px;">QR-Code scannen und bezahlen</div>
674+
<div style="margin-bottom:10px;">${paymentQrMsg}</div>
674675
<img src="${qrUrl}" alt="QR Code" style="max-width:300px; width:80%; height:auto; background:#fff; padding:10px; border-radius:12px;">
675-
${data.status === 'both' ? '<div style="margin-top:12px;">Oder direkt am Terminal bezahlen</div>' : ''}
676+
${data.status === 'both' ? `<div style="margin-top:12px;">${paymentTerminalMsg}</div>` : ''}
676677
</div>
677678
`);
678679
api.isPrinting = false;
679680
} else {
680-
api.overlay.showError(data.error || api.getTranslation('payments_error'));
681+
api.overlay.showError(data.error || api.getTranslation('payments_failed'));
681682
api.resetPrintErrorMessage(cb, notificationTimeout);
682683
}
683684
},
684685
error: () => {
685-
api.overlay.showError(api.getTranslation('payments_failed'));
686+
api.overlay.showError(api.getTranslation('payments_error'));
686687
api.resetPrintErrorMessage(cb, notificationTimeout);
687688
}
688689
});

0 commit comments

Comments
 (0)