Upgrading to 3.0.0
Introduction
This migration guide helps developers using our Adyen Magento 2
integration to upgrade to version 3.0.0.
The main and the most important change is the value of an order ID.
orderId is now incrementId instead of entityId
We don't want to share entityId
of order object to the frontend. That's why we decided to switch value of orderId to the incrementId
New signatures of hooks
We decided to modify arguments of these two hooks to objects so it will be much easier to introduce new values without breaking changes in the future.
Where to update | Old signature | New signature |
---|---|---|
[!] middleware.config.js | buildRedirectUrlAfterAuth: (orderId: number, request: Request) => string | buildRedirectUrlAfterAuth: (params: { orderId: string, request: Request }) => string |
[!] middleware.config.js | buildRedirectUrlAfterError: (err: Error, request: Request, orderId?: number) => string; | buildRedirectUrlAfterError: (params: { err: Error, request: Request, orderId: string }) => string; |
incrementId available in afterPay
Now, when you access order.id
in afterPay
props of PaymentAdyenProvider.vue
- it will be an incrementId
instead of entityId
from Magento2.
const afterPay = async ({ order }) => {
console.log('Magento incrementId: ', order.id);
};