[ENGA3-438]: Mobile banking redirect URI not working in Andoird Chrome. #309
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.
1. Objective
Fix the issue of mobile banking redirect URI not working in Android chrome.
Jira Ticket: #438
2. Description of change
The
HTTP_SEC_FETCH_SITE
header returnednone
which indicates that the request is user originated even though it was originated from the mobile banking app. This caused the site to redirect to checkout page.In this PR, we created a random unique token, saved it as a metadata to the order and added it to the return URI. When the site gets the redirect URI request, if the token is present, we check the token with the token saved in the order. If it matches we continue the process and show the success/failed page else we redirect to checkout page.
For now, it is just in mobile banking payment to solve the redirect URI issue. In the future we will implement this in all other payment methods as relying on HEADERs is not reliable.
3. Quality assurance
Use UAT testing mobile app and checkout with mobile banking payment. If it is not available then use the production keys and test in production environment.
🔧 Environments: