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

non-string product option breaks payment process #9

Open
darinda opened this issue Sep 5, 2023 · 0 comments
Open

non-string product option breaks payment process #9

darinda opened this issue Sep 5, 2023 · 0 comments

Comments

@darinda
Copy link

darinda commented Sep 5, 2023

When the cart contains a cart item that has a custom option value which is NOT of type string (i.e int) a fatal error will arise, causing the payment process to fail.

request.CRITICAL: Uncaught PHP Exception TypeError: "WalleePayment\Core\Util\Payload\AbstractPayload::fixLength(): Argument #1 ($string) must be of type string, int given, called in [...]/vendor/wallee/shopware-6/src/Core/Util/Payload/TransactionPayload.php on line 402

The code expects all values to be of type string which is not necessarily the case.

Casting the value to string is safe and fixes the problem.

darinda pushed a commit to darinda/shopware-6 that referenced this issue Sep 5, 2023
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

1 participant