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
supp...@shopmodule.com <mailto:supp...@shopmodule.com>.
------------------------------------------------------------------------
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 <http://www.oxidmodule.com/> Firma:
http://www.shopmodule.com <http://www.shopmodule.com/>
Blog: http://blog.oxidmodule.com <http://blog.oxidmodule.com/> FAQ:
http://faq.oxidmodule.com <http://faq.oxidmodule.com/>
OXID eSales AG
Certified Partner
Business Level
Profihost AG
Enterprise Partner
--
Robert Blank HTML-E-Mail-Signatur
*Robert Blank*
Software Developer OXID Platform
*robert.bl...@oxid-esales.com <mailto:robert.bl...@oxid-esales.com>*
Fon +49 761 36889-233
Fax +49 761 36889-29
*www.oxid-esales.com
<http://www.oxid-esales.com?campaign=emailsignatur/oxid-esales-com&adword=OXSIG_Startseite>*
*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