summaryrefslogtreecommitdiff
path: root/views/mods/mod_prepayment/order_done.phtml
blob: aae0bf29b6da1f38107a12f6e3a4a5c975ac39bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php

	/**
	 * Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
	 * @version 4.6.1
	 */
	
	$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 QR-Code 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 wpsg_ff($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 } ?>