Adyen / adyen-shopware6

Adyen Payment plugin for Shopware 6
MIT License
21 stars 22 forks source link

Type error upon calling payment-methods store-api (headless) as PaymentMethodRouteResponseSubscriber sets an object for an expected array #531

Open AndreasA opened 3 months ago

AndreasA commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

Versions Shopware version: 6.5.8.12 Plugin version: 3.16.0

To Reproduce Steps to reproduce the behavior:

  1. Call store-api for payment methods (headless)

Expected behavior No type error and correct response.

Code info At https://github.com/Adyen/adyen-shopware6/blob/3.16.0/src/Subscriber/Response/PaymentMethodRouteResponseSubscriber.php#L163 you return now null or a PaymentMethod object. which is then set https://github.com/Adyen/adyen-shopware6/blob/3.16.0/src/Subscriber/Response/PaymentMethodRouteResponseSubscriber.php#L148C29-L148C51 to an array. this results in a type error.

potentialy solutions:

AndreasA commented 5 hours ago

any news regarding this?