@@ -632,9 +632,14 @@ const photoboothTools = (function () {
632632 api . printPayment = function ( imageSrc , copies , cb ) {
633633 const priceCents = Number ( config . payments ?. price_cents || 0 ) ;
634634 const priceEuro = ( priceCents / 100 ) . toFixed ( 2 ) . replace ( '.' , ',' ) ;
635- const paymentMessage = ( config . payments ?. message || 'Bitte zahlen Sie %price% â¬' ) . replace ( '%price%' , priceEuro ) ;
636-
637- api . overlay . show ( 'ð ' + paymentMessage ) ;
635+ const paymentMessage = ( config . payments ?. message || api . getTranslation ( 'payments_message' ) ) . replace (
636+ '%price%' ,
637+ priceEuro
638+ ) ;
639+ const paymentQrMsg = api . getTranslation ( 'payments_qr_message' ) ;
640+ const paymentTerminalMsg = api . getTranslation ( 'payments_terminal_message' ) ;
641+
642+ api . overlay . show ( paymentMessage ) ;
638643 api . isPrinting = true ;
639644 if ( typeof remoteBuzzerClient !== 'undefined' ) {
640645 remoteBuzzerClient . inProgress ( 'print' ) ;
@@ -651,15 +656,15 @@ const photoboothTools = (function () {
651656 api . isPrinting = false ;
652657 api . printImage ( imageSrc , copies , cb ) ;
653658 } else if ( data . status === 'success' ) {
654- api . overlay . show ( data . message || 'â
Zahlung erfolgreich â Druck startet...' ) ;
659+ api . overlay . show ( data . message || api . getTranslation ( 'payments_success' ) ) ;
655660 setTimeout ( ( ) => {
656661 api . overlay . close ( ) ;
657662 api . isPrinting = false ;
658663 api . printImage ( imageSrc , copies , cb ) ;
659664 } , 1200 ) ;
660665 } else if ( data . status === 'qr' || data . status === 'both' ) {
661666 if ( ! data . payment_url ) {
662- api . overlay . showError ( 'QR-Zahlungslink fehlt' ) ;
667+ api . overlay . showError ( api . getTranslation ( 'payments_url_missing' ) ) ;
663668 api . resetPrintErrorMessage ( cb , notificationTimeout ) ;
664669 return ;
665670 }
@@ -668,20 +673,20 @@ const photoboothTools = (function () {
668673 encodeURIComponent ( data . payment_url ) ;
669674 api . overlay . show ( `
670675 <div style="text-align:center;">
671- <div style="font-size:1.4em; margin-bottom:12px;">ð ${ paymentMessage } </div>
672- <div style="margin-bottom:10px;">QR-Code scannen und bezahlen </div>
676+ <div style="font-size:1.4em; margin-bottom:12px;">${ paymentMessage } </div>
677+ <div style="margin-bottom:10px;">${ paymentQrMsg } </div>
673678 <img src="${ qrUrl } " alt="QR Code" style="max-width:300px; width:80%; height:auto; background:#fff; padding:10px; border-radius:12px;">
674- ${ data . status === 'both' ? ' <div style="margin-top:12px;">Oder direkt am Terminal bezahlen </div>' : '' }
679+ ${ data . status === 'both' ? ` <div style="margin-top:12px;">${ paymentTerminalMsg } </div>` : '' }
675680 </div>
676681 ` ) ;
677682 api . isPrinting = false ;
678683 } else {
679- api . overlay . showError ( data . error || 'Zahlung fehlgeschlagen' ) ;
684+ api . overlay . showError ( data . error || api . getTranslation ( 'payments_failed' ) ) ;
680685 api . resetPrintErrorMessage ( cb , notificationTimeout ) ;
681686 }
682687 } ,
683688 error : ( ) => {
684- api . overlay . showError ( 'Zahlungsfehler' ) ;
689+ api . overlay . showError ( api . getTranslation ( 'payments_error' ) ) ;
685690 api . resetPrintErrorMessage ( cb , notificationTimeout ) ;
686691 }
687692 } ) ;
0 commit comments