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

Fix recursion error for checkout order route #468

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

sneakyvv
Copy link
Contributor

@sneakyvv sneakyvv commented Mar 14, 2024

Summary

In the FrontendProxyController::checkoutOrder() the whole order entity is being put in a JsonResponse. If that order has bidirectional associations (for example transactions which also have a reference back to the order, and thus back to the transactions and back to the order etc...) then the JsonResponse object will throw an error: "Recursion detected"

Tested scenarios

Just load an order with some bidirectional associations in some subscriber that's triggered on checkout.

Fixed issue: No issue has been made

Solution

The JS success callback that uses the checkout route response only used the id, so no need to send the whole entity. Just send the id, and that's it.

@sneakyvv sneakyvv requested a review from a team as a code owner March 14, 2024 11:05
Copy link

sonarcloud bot commented Mar 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@candemiralp
Copy link
Member

Hello @sneakyvv,

Thank you for your contribution. We will merge this PR after reviewing it.

Best regards,
Can

@candemiralp candemiralp merged commit 70fefb2 into Adyen:develop Apr 16, 2024
1 check passed
@RokPopov RokPopov mentioned this pull request Apr 17, 2024
@candemiralp candemiralp added the Fix Indicates a bug fix label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Indicates a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants