Subversion Repositories wpShopGermany4

Rev

Rev 8375 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1105 daniel 1
<?php
2
 
3
	/**
7110 thomas 4
	 * Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
1105 daniel 5
	 */
6
 
8477 daniel 7
	$formatIBAN = function($iban) {
8
 
9
		$iban = preg_replace('/\040/', '', $iban);
10
		$iban_formated = '';
11
 
12
		for ($i = 0; $i < ceil(strlen($iban) / 4); $i ++) $iban_formated .= substr($iban, $i * 4, 4).' ';
13
 
14
		return trim($iban_formated);
15
 
16
	}
17
 
1105 daniel 18
?>
8341 karl 19
 
7920 daniel 20
<?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'))); ?>
1105 daniel 21
<br /><br />
3748 daniel 22
<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br />
8477 daniel 23
<?php echo wpsg_translate(__('IBAN: #1#', 'wpsg'), $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')))); ?><br />
3748 daniel 24
<?php echo wpsg_translate(__('Bank: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_bank'))); ?><br />
25
<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?>
1618 david 26
<br /><br />
6664 thomas 27
<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?>
8341 karl 28
<br /><br />
6664 thomas 29
 
8477 daniel 30
<?php if (isset($this->view['wpsg_mod_prepayment']['subject']) && $this->get_option('wpsg_mod_prepayment_qrcode') == true) { ?>
8332 karl 31
 
8336 karl 32
	<?php require_once WPSG_PATH_LIB.'phpgirocode.class.php'; ?>
8375 daniel 33
 
8477 daniel 34
	<!-- Girocode (EPC) -->
8336 karl 35
 
8477 daniel 36
	<p>
37
		<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
38
	</p>
8336 karl 39
 
8477 daniel 40
	<?php
41
 
42
		$img = [
43
			'title' => __('Girocode', 'wpsg'),
44
			'invoiceAmount' => $this->view['basket']['sum']['preis_gesamt_brutto'],
45
			'referenceNumber' => $this->view['wpsg_mod_prepayment']['subject'],
46
			'hash' => $this->callMod('wpsg_mod_prepayment', 'genQRCode', [
47
				$this->view['o_id'],
48
				$this->view['wpsg_mod_prepayment']['subject'],
49
				$this->view['basket']['sum']['preis_gesamt_brutto'],
50
				10,
51
				PhpGirocode::OUTPUT_BASE64
52
			])
53
		];
8336 karl 54
 
8477 daniel 55
	?>
8341 karl 56
 
8477 daniel 57
	<div class="wpsg_mod_prepayment_girocode">
58
		<div class="wpsg_mod_prepayment_girocode_left" >
59
			<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
60
			<?php echo '<img class="wpsg_mod_prepayment_girocode_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
61
			<br>
62
			<div class="wpsg_mod_prepayment_girocode_left_wrap">
63
				<div class="wpsg_mod_prepayment_girocode_left_currency">
64
					<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
65
					<?php echo $this->get_option('wpsg_currency'); ?>
8341 karl 66
				</div>
8477 daniel 67
				<div class="wpsg_mod_prepayment_girocode_left_amount">
68
					<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
69
					<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
8341 karl 70
				</div>
71
			</div>
72
		</div>
8477 daniel 73
		<div class="wpsg_mod_prepayment_girocode_right">
74
			<h4 style="margin-bottom:30px;"><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
75
			IBAN: <strong><?php echo $formatIBAN($this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban'))); ?></strong><br />
76
			Kontoinhaber: <strong><?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?></strong><br /><br />
77
			Betreff: <strong><?php echo $img['referenceNumber']; ?></strong>
78
		</div>
79
	</div>
7335 daniel 80
 
6664 thomas 81
<?php } ?>