|
15 | 15 | if (empty($config['payments']['enabled'])) { |
16 | 16 | echo json_encode([ |
17 | 17 | 'status' => 'disabled', |
18 | | - 'error' => 'Zahlungssystem ist deaktiviert', |
| 18 | + 'error' => 'Payment system disabled', |
19 | 19 | ]); |
20 | 20 | exit; |
21 | 21 | } |
|
68 | 68 | http_response_code(500); |
69 | 69 | echo json_encode([ |
70 | 70 | 'status' => 'error', |
71 | | - 'error' => 'Anbieter ist nicht SumUp', |
| 71 | + 'error' => 'Payment provider is not SumUp', |
72 | 72 | ]); |
73 | 73 | exit; |
74 | 74 | } |
|
77 | 77 | http_response_code(500); |
78 | 78 | echo json_encode([ |
79 | 79 | 'status' => 'error', |
80 | | - 'error' => 'SumUp Merchant Code fehlt', |
| 80 | + 'error' => 'SumUp Merchant Code missing', |
81 | 81 | ]); |
82 | 82 | exit; |
83 | 83 | } |
|
86 | 86 | http_response_code(500); |
87 | 87 | echo json_encode([ |
88 | 88 | 'status' => 'error', |
89 | | - 'error' => 'Preis (Cent) ist ungültig oder fehlt', |
| 89 | + 'error' => 'Price (cents) is invalid or missing', |
90 | 90 | ]); |
91 | 91 | exit; |
92 | 92 | } |
|
96 | 96 | http_response_code(500); |
97 | 97 | echo json_encode([ |
98 | 98 | 'status' => 'error', |
99 | | - 'error' => 'SumUp Reader ID fehlt', |
| 99 | + 'error' => 'SumUp Reader ID missing', |
100 | 100 | ]); |
101 | 101 | exit; |
102 | 102 | } |
|
105 | 105 | http_response_code(500); |
106 | 106 | echo json_encode([ |
107 | 107 | 'status' => 'error', |
108 | | - 'error' => 'SumUp Affiliate Key fehlt', |
| 108 | + 'error' => 'SumUp Affiliate Key missing', |
109 | 109 | ]); |
110 | 110 | exit; |
111 | 111 | } |
|
114 | 114 | http_response_code(500); |
115 | 115 | echo json_encode([ |
116 | 116 | 'status' => 'error', |
117 | | - 'error' => 'sumup_solo.py wurde nicht gefunden', |
| 117 | + 'error' => 'sumup_solo.py not found', |
118 | 118 | ]); |
119 | 119 | exit; |
120 | 120 | } |
|
141 | 141 | if ($returnVar === 0) { |
142 | 142 | echo json_encode([ |
143 | 143 | 'status' => 'success', |
144 | | - 'message' => 'Zahlung erfolgreich - Druck startet...', |
| 144 | + 'message' => 'Payment successful - printing starts...', |
145 | 145 | ]); |
146 | 146 | exit; |
147 | 147 | } |
148 | 148 |
|
149 | 149 | echo json_encode([ |
150 | 150 | 'status' => 'error', |
151 | | - 'error' => 'Zahlung fehlgeschlagen oder abgebrochen', |
| 151 | + 'error' => 'Payment failed or was cancelled', |
152 | 152 | 'log' => implode("\n", $output), |
153 | 153 | ]); |
154 | 154 | exit; |
|
159 | 159 | http_response_code(500); |
160 | 160 | echo json_encode([ |
161 | 161 | 'status' => 'error', |
162 | | - 'error' => 'ngrok URL / webhook_url fehlt', |
| 162 | + 'error' => 'ngrok URL / webhook_url missing', |
163 | 163 | ]); |
164 | 164 | exit; |
165 | 165 | } |
|
168 | 168 | http_response_code(500); |
169 | 169 | echo json_encode([ |
170 | 170 | 'status' => 'error', |
171 | | - 'error' => 'create_checkout.py wurde nicht gefunden', |
| 171 | + 'error' => 'create_checkout.py not found', |
172 | 172 | ]); |
173 | 173 | exit; |
174 | 174 | } |
|
202 | 202 | http_response_code(500); |
203 | 203 | echo json_encode([ |
204 | 204 | 'status' => 'error', |
205 | | - 'error' => 'QR-Zahlungslink konnte nicht erstellt werden', |
| 205 | + 'error' => 'The QR payment link could not be generated.', |
206 | 206 | 'log' => implode("\n", $checkoutOutput), |
207 | 207 | ]); |
208 | 208 | exit; |
|
229 | 229 | echo json_encode([ |
230 | 230 | 'status' => 'qr', |
231 | 231 | 'payment_url' => $paymentUrl, |
232 | | - 'message' => 'QR-Zahlung bereit', |
| 232 | + 'message' => 'QR payment ready', |
233 | 233 | ]); |
234 | 234 | exit; |
235 | 235 | } |
|
238 | 238 | http_response_code(500); |
239 | 239 | echo json_encode([ |
240 | 240 | 'status' => 'error', |
241 | | - 'error' => 'SumUp Reader ID fehlt', |
| 241 | + 'error' => 'SumUp Reader ID missing', |
242 | 242 | ]); |
243 | 243 | exit; |
244 | 244 | } |
|
247 | 247 | http_response_code(500); |
248 | 248 | echo json_encode([ |
249 | 249 | 'status' => 'error', |
250 | | - 'error' => 'SumUp Affiliate Key fehlt', |
| 250 | + 'error' => 'SumUp Affiliate Key missing', |
251 | 251 | ]); |
252 | 252 | exit; |
253 | 253 | } |
|
256 | 256 | http_response_code(500); |
257 | 257 | echo json_encode([ |
258 | 258 | 'status' => 'error', |
259 | | - 'error' => 'sumup_solo.py wurde nicht gefunden', |
| 259 | + 'error' => 'sumup_solo.py not found', |
260 | 260 | ]); |
261 | 261 | exit; |
262 | 262 | } |
|
280 | 280 | echo json_encode([ |
281 | 281 | 'status' => 'both', |
282 | 282 | 'payment_url' => $paymentUrl, |
283 | | - 'message' => 'QR-Zahlung bereit, Terminal wurde im Hintergrund gestartet', |
| 283 | + 'message' => 'QR payment ready, Terminal started in background', |
284 | 284 | ]); |
285 | 285 | exit; |
286 | 286 | } |
287 | 287 |
|
288 | 288 | http_response_code(500); |
289 | 289 | echo json_encode([ |
290 | 290 | 'status' => 'error', |
291 | | - 'error' => 'Ungültiger Zahlungsmodus', |
| 291 | + 'error' => 'Invalid payment method', |
292 | 292 | ]); |
293 | 293 | } catch (\Throwable $e) { |
294 | 294 | http_response_code(500); |
|
0 commit comments