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

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

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

aashishgurung
Copy link
Contributor

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

  • Setup to use manual capture
  • Checkout with some items via Card.
  • You will be redirected to the authorize page
    • Do nothing on authorize page. Open a new tab
  • Go to the return URI http://{YOUR_BASE_PATH}/?wc-api=omise_callback&order_id={ORDER_ID}
  • You should be redirected to the checkout page.
  • Go to the authorize page and complete the transaction
  • You should be redirected to the thank you page.

🔧 Environments:

  • WooCommerce: v6.4.1
  • WordPress: v5.9.3
  • PHP version: 7.3.33
  • Omise plugin version: Omise-WooCommerce 4.22.0

…quest is a user originated operation or not.
@tanawin-opn
Copy link

@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.

@aashishgurung aashishgurung merged commit 742b9b6 into master Jul 12, 2022
FhanOmise added a commit that referenced this pull request Aug 4, 2022
…r the request is a user originated operation or not. (#284)"

This reverts commit 742b9b6.
FhanOmise added a commit that referenced this pull request Aug 8, 2022
…e whether the request is a user originated operation or not. (#284)""

This reverts commit 3a1df61.
@aashishgurung aashishgurung deleted the feature/PLUGINS-257 branch August 29, 2022 12:04
aashishgurung pushed a commit that referenced this pull request Aug 29, 2022
…determine whether the request is a user originated operation or not. (#284)"""

This reverts commit 654ffde.
aashishgurung added a commit that referenced this pull request Aug 30, 2022
* Revert "Update payment render (#290)"

This reverts commit c1c925b.

* Revert "[ENGA3-290]: Issue of displaying an error as an option of Online bank… (#296)"

This reverts commit 665d76e.

* Revert "fix release date"

This reverts commit 3955645.

* Revert "Update changelog"

This reverts commit 66a4b73.

* Revert "Release 4.23.2"

This reverts commit f97965d.

* Revert "Handle console error when fpx bank list is empty"

This reverts commit 097938a.

* Revert "remove release"

This reverts commit df62a9f.

* Revert "Update capabilities calling"

This reverts commit 1178a7b.

* Revert "update v4.23.2"

This reverts commit ee6b493.

* Revert "Handle retrive capabilities error"

This reverts commit c3585af.

* Revert "Revert "Revert "Merge pull request #287 from omise/add-rms"""

This reverts commit ec0e648.

* Revert "Revert "Revert "Feature/plugins 269 (#288)"""

This reverts commit 02791e2.

* Revert "Revert "Revert "Feature/plugins 245 (#285)"""

This reverts commit 397a95c.

* Revert "Revert "Revert "[PLUGINS-257: Sec-fetch header is checked to determine whether the request is a user originated operation or not. (#284)"""

This reverts commit 654ffde.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants