Hallo,
die Antwort ist für mich wirklich schwer zu akzeptieren. "We want really all database transactions to be rolled back, if a problem during e.g. the payment execution occurs." Es passiert eine payment transaktion! Wie soll auf so ein Fall korrekt reagiert werden? Beispiel: Eine Bestellung ist komplett durchgeführt inkl erfolgreiche Bezahlung per Paymentanbieter. Nun kann jedoch die Mail an den Kunden nicht geschickt werden. Es erfolgt ein komplettes rollback! Wie soll nun ein Paymentmodul korrekt darauf reagieren können? Es gibt keine transaktionslog-Infos mehr. Zumal es völlig sinnfrei ist, eine Bestellung nur wegen einer nicht verschickbaren Mail komplett zu verwerfen. Aber darum geht es gar nicht. Es gibt aktuell keine Möglichkeit auf ein rollback korrekt zu reagieren, da nicht überladbar. -> \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->startTransaction(); Es muss doch von OXID eine Möglichkeit geben auf so ein Ereignis korrekt reagieren zu können, ohne dass man die eigenen log/transaktions-Daten in Dateien abspeichern muss! Mit freundlichen Grüßen Thomas Dartsch [email protected] Original Message processed by david® Re: oxid V6 MySQL transactions (27-Nov-2017 16:00) From: Robert Blank To:[email protected] Hi, in your use-case this may sound strange, but this is by design. First by OXID eShop design: We want really _all_ database transactions to be rolled back, if a problem during e.g. the payment execution occurs. Then there is the design of the underlying DBAL: As we us Doctrine DBAL, we cannot provide savepoints or partial rollbacks, as Doctrine DBAL does not provide this functionality: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/transactions.html#transaction-nesting You should also not try to bypass this behavior as it will break the nested transaction handling of Doctrine. In you case I fear, there is no other way as to store your log data into a file. Best regards Robert Blank On 20.11.2017 15:13, oxid mailinglist wrote: Hello guys, with oxid Version 6.0 the shop is using MySQL transactions. -> https://dev.mysql.com/doc/refman/5.7/en/commit.html For example this is used in OxidEsales\Eshop\Application\Model\Order::recalculateOrder (formally known as oxorder::recalculateOrder). https://github.com/OXID-eSales/oxideshop_ce/blob/472ce3d73e5f0e46a29566f5290a85d631bd00db/source/Application/Model/Order.php#L1354 In the process of Order::finalizeOrder, the PaymentGateway::executePayment() allows modules to perform module based validations. https://github.com/OXID-eSales/oxideshop_ce/blob/472ce3d73e5f0e46a29566f5290a85d631bd00db/source/Application/Model/Order.php#L916 Some payment provider will create transactions and send it back to the shop. A module will be willing to save/log these transactions to the database. If there are a failed transaction and the module save his object via shop standard BaseModel::save() and the PaymentGateway::executePayment() return a false, the complete MySQL transaction will be ROLLBACK'ed. (Order::recalculateOrder()) https://github.com/OXID-eSales/oxideshop_ce/blob/472ce3d73e5f0e46a29566f5290a85d631bd00db/source/Application/Model/Order.php#L1374 So the module lost all informations/transactions, which are saved during the transaction. How is oxid's suggestion to save these transactions from ROLLBACK? best regards Kristian Hempel -- Richten Sie Fehlermeldungen und Supportanfragen bitte an [email protected]. Fresh ideas for your business D³ Data Development (Inh. Thomas Dartsch) Stollberger Straße 23 · D-09380 Thalheim Fon 03721 268090 · Fax 03721 265234 Shop: http://www.oxidmodule.com Firma: http://www.shopmodule.com Blog: http://blog.oxidmodule.com FAQ: http://faq.oxidmodule.com OXID eSales AG Certified Partner Business Level Profihost AG Enterprise Partner -- Robert Blank Software Developer OXID Platform [email protected] Fon +49 761 36889-233 Fax +49 761 36889-29 www.oxid-esales.com OXID eSales AG Bertoldstraße 48 79098 Freiburg Deutschland Vorstand: Roland Fesenmayr (Vorsitzender), Dr. Oliver Ciupke Vorsitzender des Aufsichtsrats: Michael Schlenk, Sitz: Freiburg Amtsgericht Freiburg i. Br., HRB 701648, USt-IdNr.: DE231450866
