PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 56 forks source link

klarna base removed by false array key #489

Closed dimaMackert closed 1 year ago

dimaMackert commented 1 year ago

A customer has brought to our attention that the payment method Klarna no longer appears. After debugging, I found the error. \Payone\Core\Model\Plugins\MethodList::checkKlarnaMethods

image

The error is in the for loop. In case of a certain order of the payment methods, an unset is set to the wrong key and the Klarna payment methods do not appear anymore.

The error occurs only when Klarna is in the last position as payment method (klarna base and only one of the klarna payment methods).

Steps to reproduce

  1. Enable multiple payment methods in Payone (Klarna Base included)
  2. activate only one Klarna payment method (one of Klarna "Pay Later", Klarna "Pay Now" or Klarna "Slice It")
  3. klarna should be the last activated payment method, please do not activate any payment methods after klarna
  4. disable the standrad Magento payment methods (checkmo)
  5. go to checkout

Result: All payment methods set in Payone, except Klarna, can be seen

janteuber commented 1 year ago

@dimaMackert ,

Thank you for the pullrequest and the detailed description.

I have just forwarded the issue to the responsible developer. We will get back to you as soon as we have feedback.

janteuber commented 1 year ago

Hello @dimaMackert ,

We have tested your pullrequest and already bookmarked it.

Thanks for your effort and good work.