omise / omise-magento

Omise Magento Plugin
https://docs.opn.ooo/magento-plugin
MIT License
34 stars 19 forks source link

[ENGA3-323]: Fix the issue of not redirecting to Thank you page #376

Closed aashishgurung closed 2 years ago

aashishgurung commented 2 years ago

1. Objective

Fix the issue of not redirecting to Thank you page after completing payment when the website has no SSL.

Jira Ticket: #323

2. Description of change

Removed the previous implementation of validating whether the REFERER is omise or not because it is not reliable as some browsers limit access to not allow HTTP_REFERER to be passed. It has been replaced with $_SERVER['HTTP_SEC_FETCH_SITE']; that checks whether the request is user originated or not.

References: https://stackoverflow.com/questions/6880659/in-what-cases-will-http-referer-be-empty https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Site

3. Quality assurance

Checkout with 3DS and you should see the Thank you page after completing payment.

🔧 Environments:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication