Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AndreasA opened this issue Aug 7, 2024 · 7 comments

Comments

@AndreasA
Copy link
Contributor

AndreasA commented Aug 7, 2024

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:

  • set the object and verify store-api correctly serializes it.
  • call ->toArray on the object
  • json_encode(json_decode on the object.
@AndreasA
Copy link
Contributor Author

any news regarding this?

@adyen-integrations-support
Copy link

adyen-integrations-support commented Nov 27, 2024

Hello @AndreasA ,

Thank you very much for all the required information.
Could you please update the plugin to the latest 3.16.3 and check if the issue still persists?
Additionally, our team will investigate this issue and keep you updated.

Best Regards.

@floddy-newport
Copy link

Still an issue in 3.17

@AndreasA
Copy link
Contributor Author

AndreasA commented Dec 6, 2024

I did create a one line change PR that would fix this #532

Not sure why this still hasn't been merged, the PR exists for several months now and has basically no changes.

@adyen-integrations-support

Hi,

Thank you for your patience.

We are currently investigating the root cause of the issue you reported. Our team is working to identify and resolve it.

We will keep you updated and notify you as soon as we have more information or a resolution to share.

Best regards

@adyen-integrations-support

Hi,

Thank you for your continued patience as we work on resolving this issue. Our team is still actively investigating the root cause and working towards a solution.

We appreciate your understanding and will keep you updated with any progress or developments. If you have any additional information that might assist us, please feel free to share it.

Best regards

@AndreasA
Copy link
Contributor Author

Additional information, see my PR: #532 that's everything that is needed to fix this (at least it was when I created the issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants