fix: fetch updated redirect url before redirecting #1743
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
[x] Bugfix
What Is the Current Behavior?
A user who uses a redirect before checkout payment, is redirected to the payment service provider (PSP) using a redirect URL provided by the ICM server during the checkout process.
If the user cancels the checkout process afterwards and adds some product to the basket or changes the basket in any other way the redirect url is not calculated again. In the checkout process he will be redirected to the PSP with the outdated URL. After submitting the order an error occurs because the current basket value differs from the amount that has been authorized by the PSP.
What Is the New Behavior?
Before the user is redirected to the PSP during the checkout process a REST request is sent to the ICM to fetch the currently valid redirect url.
Does this PR Introduce a Breaking Change?
[x] No
Other Information
AB#97415
AB#103424