-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Describe the bug
We adjusted the Hyva Checkout to have 3 Steps
- Shipping
- Payment
- Review
When the Review Step in active the Checkout response with a Payment Method Problem and the Adyen error log says that the Method is missing (AdyenLoggerTest.ERROR: Required object 'paymentMethod' is not provided.). As soon as I deactivate the review step, it works fine.
The Review Step is just about showing an overview and about accepting TOC.
To Reproduce
Steps to reproduce the behavior:
Make a 3 Step Hyva Checkout with a overview step in the end and go through checkout.
Expected behavior
Payment works fine
Magento version
2.4.7
Plugin version
adyen/module-hyva-checkout 1.2.3
adyen/module-payment 9.13.0
Update:
I compared the method \Adyen\Hyva\Magewire\Payment\Method\AdyenPaymentComponent::placeOrder with and without the review step and I could identify that the $datathat is given to the method differs.
This lead me to check where the $data parameter comes from and I found out that the placeOrder method is executed by JavaScript (vendor/adyen/module-hyva-checkout/view/frontend/templates/payment/model/adyen-payment-method.phtml) where the $data is collected. This all happens in the JavaScript File and Method placeOrder(data, publicHash = null).
Since we have the review step added, this JavaScript method is never executed and therefore the call to placeOrder happens the HyvaCheckout native way, without the needed data.