Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 211 forks source link

Make VaultMigration compatible with disabled/removed Magento PayPal module #2806

Open fahu opened 4 days ago

fahu commented 4 days ago

Issue The installation/upgrade of the Adyen Payment plugin fails with the following error:

Column not found: 1054 Unknown column 'method_code' in 'where clause', query was: SELECT `paypal_billing_agreement`.* FROM `paypal_billing_agreement` WHERE (method_code = 'adyen_oneclick') AND (status = 'active')

Cause The Adyen Payment module re-creates the table during migration by adding the agreement_data field (via db_schema.xml). However, when attempting to migrate the billing agreements to the vault, the process fails to query the table using the method_code and status because these fields do not exist in the table.

Solution Ensure VaultMigration does not fail if the paypal_billing_agreement table is missing or required fields are missing.

candemiralp commented 4 days ago

Hello @fahu,

Thank you for your contribution and providing a fix for token migration issue. We will review and merge this PR if there is no issue.

Best Regards, Can