summaryrefslogtreecommitdiff
path: root/views/mods/mod_prepayment/order_done.phtml
blob: b8caa25af84b8bb8de108f28e979fc06d2595105 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?php

	/**
	 * Template welches bei der Zahlungsart "Vorkasse" nach Abschluss einer Bestellung angezeigt wird
	 */
	
	//wpsg_debug($this->view['wpsg_mod_prepayment']['subject']);
    
?>

<?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'), $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 return; 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'; ?>

	<?php if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') { ?>
		
		<!-- Girocode und QR-Rechnung -->

		<?php 
 
		try {
			
			$img = array();
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 		
		?>
 
		<div class="wpsg_mod_prepayment_info_wrap">
			<?php foreach ($img as $i) { ?>
				<div class="wpsg_mod_prepayment_info">
					<div class="wpsg_mod_prepayment_info_left">
                    <div class="wpsg_mod_prepayment_info_left_qr-download">
						<h4><?php echo wpsg_translate(__($i['title'], 'wpsg')); ?></h4>
						<?php if (isset($i['filepath'])) { ?><a title="Downloadlink für die QR-Rechnung" target="_blank" href="<?php echo $this->callMod('wpsg_mod_prepayment', 'getFrontendLink', [$i['order_id']]); ?>"><i class="fa fa-download" aria-hidden="true"></i></a><?php } ?>
                    </div>	
                        <br />
						<?php echo '<img class="wpsg_mod_prepayment_info_left_qrcodeimg" src="data:image/png;base64,'.$i['hash'].'" />'; ?>
						<br />
						<div class="wpsg_mod_prepayment_info_left_wrap">
							<div class="wpsg_mod_prepayment_info_left_currency">
								<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
								<?php echo $this->get_option('wpsg_currency'); ?>
							</div>
							<div class="wpsg_mod_prepayment_info_left_amount">
								<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
								<?php echo sprintf("%.2f", $i['invoiceAmount']); ?>
							</div>
						</div>
					</div>
					<div class="wpsg_mod_prepayment_info_right">
						<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
						<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
						<?php if (!empty($i['referenceNumber'])) { ?>
							<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
							<?php echo $i['referenceNumber']; ?><br />
						<?php } ?>
						<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
						<?php echo $i['additionalInformation']; ?><br /> 
						<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
						<?php echo $i['customerdata']['vname'].' '.$i['customerdata']['name']; ?><br />
						<?php echo $i['customerdata']['strasse'].' '.$i['customerdata']['nr']; ?><br />
						<?php echo $i['customerdata']['plz'].' '.$i['customerdata']['ort']; ?><br />
					</div>
				</div>
			<?php } ?>
		</div>

		<?php } catch (\Exception $e) { wpsg_debug($e); } ?>

	<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') { ?>

		<!-- Girocode (EPC) -->

		<p>
			<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
		</p>

		<?php 
		
			$img = array();
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));

		?>

		<div class="wpsg_mod_prepayment_girocode">
			<div class="wpsg_mod_prepayment_girocode_left" >
				<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
				<br />
				<?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><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
				<?php if (!empty($img['referenceNumber'])) { ?>
					<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
					<?php echo $img['referenceNumber']; ?><br />
				<?php } ?>
				<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
				<?php echo $img['additionalInformation']; ?><br /> 
				<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
				<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
				<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
				<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
			</div>
		</div>

	<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') { ?>

		<!-- QR-Rechnung (SWISS) -->

		<?php 

			$img = array();
			$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket'])); 
		
		?>
		
		<div class="wpsg_mod_prepayment_qrrechnung">
			<div class="wpsg_mod_prepayment_qrrechnung_left">
				<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
				<br />
				<?php echo '<img class="wpsg_mod_prepayment_qrrechnung_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
				<br>
				<div class="wpsg_mod_prepayment_qrrechnung_left_wrap">
					<div class="wpsg_mod_prepayment_qrrechnung_left_currency">
						<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
						<?php echo $this->get_option('wpsg_currency'); ?>
					</div>
					<div class="wpsg_mod_prepayment_qrrechnung_left_amount">
						<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
						<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
					</div>
				</div>
			</div>
			<div class="wpsg_mod_prepayment_qrrechnung_right">
				<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
				<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
				<?php if (!empty($img['referenceNumber'])) { ?>
					<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
					<?php echo $img['referenceNumber']; ?><br />
				<?php } ?>
				<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
				<?php echo $img['additionalInformation']; ?><br /> 
				<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
				<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
				<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
				<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
			</div>
		</div>

	<?php } ?>
	
<?php } ?>