mollie / magento2-subscriptions

BSD 2-Clause "Simplified" License
3 stars 5 forks source link

Uncaught TypeError implement PaymentMethodInterface wrong instance given in PaymentMethodManagementPlugin.php #6

Closed breakerh closed 3 years ago

breakerh commented 3 years ago

Describe the bug Upon checkout I get to see no payment methods...

Used versions

To Reproduce Steps to reproduce the behavior:

  1. Add subscription to cart
  2. Register
  3. Go to checkout
  4. Fill in details
  5. No payment methods appear and we have an error in report/api/*

Expected behavior Get payment methods to continue.

Actual behavior No payment methods

Screenshots Not needed

Additional context

Fatal Error: 
    'Uncaught TypeError: Argument 1 passed to 
        Mollie\\Subscriptions\\Plugin\\Quote\\Api\\PaymentMethodManagementPlugin::Mollie\\Subscriptions\\Plugin\\Quote\\Api\\{closure}()
    must implement interface 
        Magento\\Quote\\Api\\Data\\PaymentMethodInterface, 
    instance of 
        Magento\\Payment\\Model\\Method\\Adapter\\Interceptor 
    given in
        .../Mollie/Subscriptions/Plugin/Quote/Api/PaymentMethodManagementPlugin.php:55

Stack trace:\n#0 [internal function]: Mollie\\Subscriptions\\Plugin\\Quote\\Api\\PaymentMethodManagementPlugin->Mollie\\Subscriptions\\Plugin\\Quote\\Api\\{closure}(Object(Magento\\Payment\\Model\\Method\\Adapter\\Interceptor))\n#1 /home/admin/domains/rebuildbodyplan.com/public_html/app/code/Mollie/Subscriptions/Plugin/Quote/Api/PaymentMethodManagementPlugin.php(57): array_filter(Array, Object(Closure))\n#2 /home/admin/domains/rebuildbodyplan.com/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Mollie\\Subscriptions\\Plugin\\Quote\\Api\\PaymentMethodManagementPlugin->afterGetList' in '/home/admin/domains/rebuildbodyplan.com/public_html/app/code/Mollie/Subscriptions/Plugin/Quote/Api/PaymentMethodManagementPlugin.php' on line 55
Frank-Magmodules commented 3 years ago

HI @breakerh ,

We are happy to share that we've just released the new 1.0.2 version where we've implemented your fix for this issue. Thank you for the detailed issue report and PR. We are closing this issue now but please feel free to reopen the issue if this still occurs.