Wiki-Quellcode von Bezahlart Giropay
Version 1.1 von MACH ProForms GmbH am 24.11.2024
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | Zum 31.12.2024 wird die Bezahlart Giropay abgeschaltet. In diesem Zuge finden Sie nachstehend eine Datenbankabfrage, welche alle Mandanten auflistet, die diese Bezahlart in der Modulkonfiguration konfiguriert haben. | ||
2 | |||
3 | Das Skript basiert auf der neuen Mongo-Shell und kann direkt in der Konsole und/oder über ein entsprechenden Datenbanktool auf der Mongo-Datenbank ausgeführt werden. | ||
4 | |||
5 | {{code language="shell"}} | ||
6 | use administrationCenter; | ||
7 | |||
8 | function findPaymenttype() { | ||
9 | try { | ||
10 | |||
11 | const collection = db.getCollection("organizationConfiguration"); | ||
12 | |||
13 | const documents = collection.find(); | ||
14 | |||
15 | documents.forEach(function(document){ | ||
16 | |||
17 | console.log('Document: ', document._id); | ||
18 | |||
19 | document.moduleConfigurations.forEach(function(moduleConfiguration){ | ||
20 | |||
21 | //console.log('Class: ', moduleConfiguration._class); | ||
22 | |||
23 | if (moduleConfiguration._class == "de.formsolutions.payment.configuration.EPaymentKivGiropayConfiguration" || | ||
24 | moduleConfiguration._class == "de.formsolutions.payment.configuration.EPayBLGiropayConfiguration" || | ||
25 | moduleConfiguration._class == "de.formsolutions.payment.configuration.GirocheckoutGiropayConfiguration" || | ||
26 | moduleConfiguration._class == "de.formsolutions.payment.configuration.InfomaGiropayConfiguration") { | ||
27 | |||
28 | fs.writeFileSync("./analyze-paymenttyp.json", document._id + ";" + moduleConfiguration._class + "\n", { flag: 'a+' }); | ||
29 | |||
30 | } | ||
31 | |||
32 | }); | ||
33 | }); | ||
34 | |||
35 | } catch (error) { | ||
36 | console.error('Error ', error); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | console.log('Start....'); | ||
41 | findPaymenttype(); | ||
42 | console.log('Finished....'); | ||
43 | {{/code}} |