Rev 8375 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
*/
$formatIBAN = function($iban) {
$iban = preg_replace('/\040/', '', $iban);
$iban_formated = '';
for ($i = 0; $i < ceil(strlen($iban) / 4); $i ++) $iban_formated .= substr($iban, $i * 4, 4).' ';
return trim($iban_formated);
}
?>
<?php echo wpsg_translate(__('Sie haben die Zahlungsart "Vorkasse" gewählt. Überweisen Sie daher den Rechnungsbetrag von #1# auf folgendes Konto:', 'wpsg'), wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency'))); ?>
<br /><br />
<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br />
<?php echo wpsg_translate(__('IBAN: #1#', 'wpsg'), $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')))); ?><br />
<?php echo wpsg_translate(__('Bank: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?><br />
<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?>
<br /><br />
<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?>
<br /><br />
<?php if (isset($this->view['wpsg_mod_prepayment']['subject']) && $this->get_option('wpsg_mod_prepayment_qrcode') == true) { ?>
<?php require_once WPSG_PATH_LIB.'phpgirocode.class.php'; ?>
<!-- Girocode (EPC) -->
<p>
<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
</p>
<?php
$img = [
'title' => __('Girocode', 'wpsg'),
'invoiceAmount' => $this->view['basket']['sum']['preis_gesamt_brutto'],
'referenceNumber' => $this->view['wpsg_mod_prepayment']['subject'],
'hash' => $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
$this->view['o_id'],
$this->view['wpsg_mod_prepayment']['subject'],
$this->view['basket']['sum']['preis_gesamt_brutto'],
10,
PhpGirocode::OUTPUT_BASE64
])
];
?>
<div class="wpsg_mod_prepayment_girocode">
<div class="wpsg_mod_prepayment_girocode_left" >
<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
<?php echo '<img class="wpsg_mod_prepayment_girocode_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
<br>
<div class="wpsg_mod_prepayment_girocode_left_wrap">
<div class="wpsg_mod_prepayment_girocode_left_currency">
<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
<?php echo $this->get_option('wpsg_currency'); ?>
</div>
<div class="wpsg_mod_prepayment_girocode_left_amount">
<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
</div>
</div>
</div>
<div class="wpsg_mod_prepayment_girocode_right">
<h4 style="margin-bottom:30px;"><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
IBAN: <strong><?php echo $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?></strong><br />
Kontoinhaber: <strong><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?></strong><br /><br />
Betreff: <strong><?php echo $img['referenceNumber']; ?></strong>
</div>
</div>
<?php } ?>