Skip to content

Conversation

MarijusDilys
Copy link
Collaborator

@MarijusDilys MarijusDilys commented Apr 2, 2025

Questions Answers
Branch? Master/Release
Description? Now on webhook if order is failure it will not go to database as failed one, instead it will be not created as order (same behavior). Refactored return.php controller for better readability and security.
EDIT: Failed orders cannot simply be redirected faster because our logic dont know does it already gathered response from webhook.php or not. Tried to also add failed orders table in mol_payments database, but it created a new bug, if there is created database recrod with same cart_id and failed, another one order which suceed with same cart_id can be understanded as failed because of webhook async work (race condition with return controller).
SOLUTION: When doing second payment with same cart when previous order has failed, identify all records in database and flag them as false for return.php controller to not verify as failed
Type? bug fix / improvement / new feature / refactoring
How to test? Indicate how to verify that this change works as expected.
Fixed issue ? If none leave blank

@MarijusDilys MarijusDilys changed the title INTERNAL webhook improvements INTERNAL Improvement on faster redirection when previous failed Jun 9, 2025
@MarijusDilys MarijusDilys requested a review from GytisZum June 17, 2025 14:42
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

Successfully merging this pull request may close these issues.

1 participant