Double store credit refunds when a error is received before redirecting to the buckaroo checkout. #989
Labels
Status: Waiting for info
We are waiting for more information regarding this issue.
System requirements:
Adobe Commerce: 2.4.6-p4
php 8.1
module buckaroo/magento2: v1.46.1
Settings
Working buckaroo account
fill in the following settings:
buckaroo_magento2/account/secret_key
buckaroo_magento2/account/merchant_key
Certificate is not added (buckaroo_magento2/account/certificate_file) reason why is that buckaroo gives back an error before it redirects you as a customer to the buckaroo checkout.
ideal is enabled on test account
Steps to reproduce
Expected result
Actual result
Additional info
If this function (\Magento\Quote\Model\QuoteManagement::submitQuote) receives an error after the order has been created Magento will rollbackAddresses using this function: \Magento\Quote\Model\QuoteManagement::rollbackAddresses.
This than triggers the dispatch the event
sales_model_service_quote_submit_failure
which in turn invokes this observer:\Magento\CustomerBalance\Observer\RevertStoreCreditObserver::execute
Afterwards on the same event Buckaroo has this event:
Which triggers a cancellation of the order which triggers this function (\Magento\Sales\Model\Order::cancel) Which adds the following event
order_cancel_after
which triggers the same observer again:\Magento\CustomerBalance\Observer\RevertStoreCreditObserver::execute
I also added this bug to the magento issues since you could also say this is an issue of magento.
magento/magento2#38815
The text was updated successfully, but these errors were encountered: