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

[Payment] when payment is authorized or paid, order get's confirmed #2628

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

dpfaffenbauer
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #2615

Current Issue is that:

  1. UpdateOrderStateExtension never updates to order state cause the payment state got changed before
  2. if you manually executed the pay transition, order is stuck in new and does not get confirmed

This PR automatically confirms the order when a single payment is partially paid, fully paid, partially authorized or fully authorized.

@solverat I would like to get your opinion on this.

@dpfaffenbauer dpfaffenbauer added this to the 3.2.8 milestone May 7, 2024
@dpfaffenbauer dpfaffenbauer requested a review from a team May 7, 2024 19:11
@dpfaffenbauer dpfaffenbauer self-assigned this May 7, 2024
Copy link

sonarqubecloud bot commented May 8, 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

@dpfaffenbauer dpfaffenbauer modified the milestones: 3.2.8, 3.2.9 May 9, 2024
@dpfaffenbauer dpfaffenbauer modified the milestones: 3.2.9, 3.2.10, 3.2.11 May 30, 2024
@dpfaffenbauer dpfaffenbauer modified the milestones: 3.2.11, 3.2.12 Jul 18, 2024
@dpfaffenbauer dpfaffenbauer modified the milestones: 3.2.12, 3.2.13 Aug 12, 2024
@dpfaffenbauer
Copy link
Member Author

@solverat We would like to get your Feedback on this.

@solverat
Copy link
Contributor

solverat commented Sep 5, 2024

I'm afraid of this.

@solverat
Copy link
Contributor

solverat commented Sep 6, 2024

Funny! We just experienced this behavior in one of our new shops (not in manually mode but by payum / client workflow).

image

I'm unable to reproduce it, though...

Not sure, if this is true:

UpdateOrderStateExtension never updates to order state cause the payment state got changed before

The only difference now is, that the callback happens after a transition instead of the payum extension. If we're dealing with a sort of race condition here, this PR could be an improvement, since the order transition will be dispatched at the end of the payum cycle.

@dpfaffenbauer
Copy link
Member Author

@solverat so not afraid anymore? :D

@solverat
Copy link
Contributor

solverat commented Sep 7, 2024

I guess not 😀

@dpfaffenbauer
Copy link
Member Author

@solverat the main issue that this tries to solve is, when a user exists the payment workflow just before we come back to the payum capture/authorize route, and there is no async implemented, you never know the status of the payment. if you then manually confirm it in the backend using the payment workflow, the order never gets confirmed. this fixes that.

We actually could reproduce it. We looged at the access logs of these orders (based on timestamps) and saw they never returned from the PSP to the shop.

@dpfaffenbauer dpfaffenbauer merged commit ef464e0 into coreshop:4.0 Sep 9, 2024
277 checks passed
@dpfaffenbauer dpfaffenbauer deleted the issue/2615 branch September 9, 2024 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants