omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

[PLUGINS-257: Sec-fetch header is checked to determine whether the re… #284

Closed aashishgurung closed 2 years ago

aashishgurung commented 2 years ago

1. Objective

Prevent customer to reach return_uri before success payment

Jira: #257

2. Description of change

Sec-fetch header is checked to determine whether the request is a user originated operation or not. Created a new helper class request for it. This can be used to add request related helper function in the future.

Reference

HTTP_REFERER header was not present this time. We might need to change the implementation in Magento.

Reference

3. Quality assurance

🔧 Environments:

tanawin-opn commented 2 years ago

@aashishgurung ✅ works as expected krub. it's also blocked the second cart page (when it redirect from return_uri) to check out after the first checkout page is already done.