magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Magento 2.3.5-p2 Paypal Recaptcha does not detect scope

Open nbennett25 opened this issue 1 year ago • 7 comments

Preconditions and environment

  • Magento 2.3.5-p2
  • magento/module-paypal-recaptcha is enabled
  • Installment has 2 websites

Steps to reproduce

  1. Go to Admin > Stores > Configuration, select Website scope
  2. Go to Security > Google Recaptcha > Frontend
  3. Set enabled to Yes
  4. Go to Security > Google Recaptcha > Frontend > Use in PayPal PayflowPro payment form
  5. Set value to No
  6. Save
  7. Clear Cache

Expected result

Captcha in PayfloPro payment method is hidden

Actual result

Captcha in PayfloPro payment method is shown

Additional information

In v1.0.1 of magento/module-paypal-recaptcha \Magento\PaypalReCaptcha\Model\Config::isEnabledFrontendPaypal() is

return (bool) $this->scopeConfig->getValue(static::XML_PATH_ENABLED_FRONTEND_PAYPAL);

so it does not pass the website scope. This line should be:

return (bool) $this->scopeConfig->getValue(static::XML_PATH_ENABLED_FRONTEND_PAYPAL, \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES, $websiteId);

Where $websiteId is passed from the StoreManagerInterface.

Release note

No response

Triage and priority

  • [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • [X] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

nbennett25 avatar Sep 19 '22 15:09 nbennett25

Hi @nbennett25. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Sep 19 '22 15:09 m2-assistant[bot]

Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
      DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
    1. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

m2-assistant[bot] avatar Sep 20 '22 01:09 m2-assistant[bot]

@magento give me 2.4-develop instance

engcom-Dash avatar Sep 20 '22 09:09 engcom-Dash

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

Hi @engcom-Dash, here is your Magento Instance: https://cadcdc6c4cf55cec4d760aae4f0bc156.instances.magento-community.engineering Admin access: https://cadcdc6c4cf55cec4d760aae4f0bc156.instances.magento-community.engineering/admin_7aee Login: e3e829c2 Password: f1d19f44eb69

Hi @nbennett25 ,

We are checking the issue in 2.4-develop instance...We are not able to reproduce the issue...because we are getting expected result....the Captcha in PayfloPro payment method is hidden

Steps We follwed by: 1.Go to Admin > Stores > Configuration 2.Go to Security > Google Recaptcha > Frontend 3.Set enabled to Yes 4.Go to Security > Google Recaptcha > Frontend > Use in PayPal PayflowPro payment 5.Set value to No 6.Save Let us know if we Missing anything!!!

Thanks!!!

engcom-Dash avatar Sep 20 '22 10:09 engcom-Dash

@engcom-Dash can you confirm the versions of the magento/module-paypal-recaptcha and msp/recaptcha are in 2.4? (we're working with 2.3.5-p2)

Did you switch to the website scope in the configuration? The issue isn't that the paypal recaptcha config isn't working, it's that it's not working within the website scope (ie, change website, then set it to No while the default config is Yes)

We built a patch to allow the visibility of the paypal captcha to respect the website scope, but now are seeing an error returned when trying to place an order - it looks like regardless of if the captcha is hidden, the API request to validate the captcha is being sent out (presumably with empty data) and an error is being thrown on order submission: 'You cannot proceed with such operation, your reCaptcha reputation is too low.'

Thanks for investigating!

nbennett25 avatar Sep 21 '22 17:09 nbennett25

Hi @nbennett25 ,

Thanks for your contribution...

Currently we are supporting with 2.4 develop versions...Kindly upgrade the version.Because it's very easy to proceed to further.

Thanks

engcom-Dash avatar Oct 19 '22 13:10 engcom-Dash

@engcom-Dash did you review my comment on 9/21? This may still be an issue with 2.4.x if the magento/module-paypal-recaptcha and msp/recaptcha module versions have not changed.

nbennett25 avatar Oct 19 '22 16:10 nbennett25

@magento give me 2.4-develop instance

engcom-Dash avatar Oct 31 '22 12:10 engcom-Dash

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

Hi @engcom-Dash, here is your Magento Instance: https://cadcdc6c4cf55cec4d760aae4f0bc156.instances.magento-community.engineering Admin access: https://cadcdc6c4cf55cec4d760aae4f0bc156.instances.magento-community.engineering/admin_9ffc Login: c3d795aa Password: f4316fe75312

Hi @nbennett25 ,

Thanks For your information...We are worked as per your last instructions...We are able to reproduce the issue in 2.4-develop branch. Version Of Magento: 2.4 -Develop Branch PHP: 8.1 Preconditions: 1.Magento Installation is Completed 2.Magento has two scopes 3.PayPal Recaptcha is Enabled Steps to Reproduce: 1.Go to Admin > Stores > Configuration, select Website scope 2.Go to Security > Google Recaptcha > Frontend 3.Set enabled to Yes 4.Go to Security > Google Recaptcha > Frontend > Use in PayPal PayflowPro payment form 5.Set value to No 6.Save 7.Clear Cache we were followed above steps to reproduce the issue. Here for your reference we are attached screenshots: Screenshot 2022-10-31 at 6 39 20 PM Screenshot 2022-10-31 at 6 43 28 PM Screenshot 2022-10-31 at 6 43 33 PM Screenshot 2022-10-31 at 6 43 45 PM

in admin Panel we are getting the recaptcha options in paypal payment method form...We are attached the screenshots above for your reference. We are getting actual result....We can able to reproduce the issue so we confirming the issue.Thanks!!!

engcom-Dash avatar Oct 31 '22 13:10 engcom-Dash

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot avatar Oct 31 '22 13:10 github-jira-sync-bot

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot avatar Oct 31 '22 13:10 github-jira-sync-bot

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6941 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Oct 31 '22 13:10 github-jira-sync-bot

:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] avatar Oct 31 '22 13:10 m2-assistant[bot]

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar Oct 31 '22 13:10 github-jira-sync-bot

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-6941

github-jira-sync-bot avatar Oct 31 '22 13:10 github-jira-sync-bot