Wiki-Quellcode von Bezahlart Giropay
Zuletzt geändert von MACH formsolutions am 26.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 | document.moduleConfigurations.forEach(function(moduleConfiguration){ | ||
| 18 | |||
| 19 | if (moduleConfiguration._class == "de.formsolutions.payment.configuration.EPaymentKivGiropayConfiguration" || | ||
| 20 | moduleConfiguration._class == "de.formsolutions.payment.configuration.EPayBLGiropayConfiguration" || | ||
| 21 | moduleConfiguration._class == "de.formsolutions.payment.configuration.GirocheckoutGiropayConfiguration" || | ||
| 22 | moduleConfiguration._class == "de.formsolutions.payment.configuration.InfomaGiropayConfiguration") { | ||
| 23 | |||
| 24 | // Variante 1: Write to file | ||
| 25 | //fs.writeFileSync("./analyze-paymenttyp.json", document._id + ";" + moduleConfiguration._class + "\n", { flag: 'a+' }); | ||
| 26 | |||
| 27 | // Variante 2: Print into console | ||
| 28 | print(document._id + ";" + moduleConfiguration._class); | ||
| 29 | } | ||
| 30 | |||
| 31 | }); | ||
| 32 | }); | ||
| 33 | |||
| 34 | } catch (error) { | ||
| 35 | print('Error ', error); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | |||
| 39 | print('Start....'); | ||
| 40 | findPaymenttype(); | ||
| 41 | print('Finished....'); | ||
| 42 | {{/code}} |