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

DEVICE_DATA_NOT_AVAILABLE error message when FraudNet is enabled (1429) #1177

Conversation

Dinamiko
Copy link
Contributor

When FraundNet setting is enabled and not configured correctly is displays DEVICE_DATA_NOT_AVAILABLE error message when trying to create the PayPal order.

We've found that fraudnet.js script was not loaded due to a bug, this PR fixes that and loads it correctly.

Please note that Fraudnet fncls script is currently rendered twice, the one we are implementing have the following format:

<script type="application/json" fncls="fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99">
      {
          "f":"<32_character_GUID>",
          "s":"<merchant_id>_<page_id>",
          "sandbox":false
      }
  </script>

The other is added by PayPal automatically with the following format:

... "s":"SMART_PAYMENT_BUTTONS","u":"example.com","cb1":"fnCallback"...

Steps to reproduce

  • Disable all payments except PayPal payment.
  • Enable FraudNet setting.
  • Ensure Checkout exist in Smart Button Locations, otherwise add it*.
  • Add product to Cart and go to Checkout page.
  • Search in page source code for fnparams-

Check for one** of the fnparams- scripts that contains s param with the following format <merchant_id>_<page_id>

*The same applies for Single Product, Cart and Mini-Cart locations.
**Currently fnparams is rendered twice with different values, one from the plugin code (fraudnet.js) and the other added by PayPal automatically.

@Dinamiko Dinamiko requested a review from AlexP11223 February 10, 2023 10:58
*
* @return string
*/
protected function context(): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to extract this somewhere to avoid duplication (currently here and in SmartButton). Maybe into a trait.

@Dinamiko Dinamiko merged commit 4ba1c52 into trunk Feb 13, 2023
@Dinamiko Dinamiko deleted the PCP-1429-device-data-not-available-error-message-is-showing-for-pay-upon-invoice branch February 13, 2023 12:04
@Dinamiko Dinamiko added this to the 2.0.3 milestone Feb 21, 2023
@Dinamiko Dinamiko added the bug Something isn't working label Feb 21, 2023
@Dinamiko Dinamiko mentioned this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants