Closed MatthijsBreed closed 2 years ago
HI @MatthijsBreed ,
We are happy to share that we've just released the new 2.9.0 version where we have fixed this issue. Thank you for opening this issue and for the detailed issue report.
We are closing this issue now but please feel free to reopen the issue if this still occurs.
Describe the bug The
Mollie\Payment\Observer\CheckoutSubmitAllAfter\StartTransactionForInstantPurchaseOrders
uses a class constant ofMagento\InstantPurchase\Model\QuoteManagement\PaymentConfiguration
on line 49:$instantPurchase = $payment->getAdditionalInformation(PaymentConfiguration::MARKER);
If Magento_InstantPurchase is not installed, this results in an error when trying to place an order:
Error: Class 'Magento\InstantPurchase\Model\QuoteManagement\PaymentConfiguration' not found in <magento_root>/vendor/mollie/magento2/Observer/CheckoutSubmitAllAfter/StartTransactionForInstantPurchaseOrders.php:49
Used versions
To Reproduce Steps to reproduce the behavior:
"magento/module-instant-purchase": "*",
in thereplace
node of composer.jsonExpected behavior When clicking in 'Place Order' in the checkout, redirection to the mollie payment portal
Actual behavior The call to
<base_url>/rest/nl/V1/carts/mine/payment-information
returns 500 with the abovementioned error. The subsequent call to<base_url>/rest/nl/V1/carts/mine/totals
also returns an error that the current customer has no active cart. The order is created with the status 'Payment Review'Additional context Judging by the fix for issue 470, dependency on the Magento_InstantPurchase is not intended and/or documented.
Locally editing the class constant to the literal string it represents ('instant-purchase') creates a workaround to restore normal functionality. But this would not be best practice for a permanent fix. A potential fix could be to check if the Magento_InstantPurchase module is enabled via the Magento ModuleManager