Controllers handling order data should use loadForUpdate()

Created on 29 October 2024, about 2 months ago

Basically coming from 🐛 Duplicate Payment Items Active and a Slack discussion with @jsacksick, we have identified the RedirectController as a potential problem for raising duplicate checkout complete events.

The order entity provided by route parameter should not be used as is, but reloaded with the special loadForUpdate() function provided by the order storage.

This should reduce risk of this sort of problem. In the long run, we'll want to implement Klarna Payments Authorization Callback Active , making this redirect controller possibly obsolete, but that requires more work. So improving the current logic would reduce the pressure on implementing the authorization callback. There we'll also have to take care to use the correct loading function, so we keep being reminded, when the existing controllers follow this pattern

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇦🇹Austria agoradesign

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024