Skip to main content

Square for FluentCart fails to load Square Web Payments SDK on checkout

Hello FluentCart Support,

I am experiencing what appears to be a compatibility or loading bug with Square for FluentCart.

Environment

  • FluentCart: 1.6.2
  • Square for FluentCart: 1.0.1
  • WordPress checkout
  • Square is configured as a payment gateway
  • Cash payment works normally

Problem

When I select Square on checkout, the Square card payment form does not load and the customer cannot complete the order.

The browser console reports:

Failed to load Square payment form: Error: Square SDK did not load in time

It also reports the Square SDK request:

https://web.squarecdn.com/v1/square.js

returning 200 OK, but Chrome blocks it with:

ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep

The result is that window.Square never becomes available and the Square add-on times out after approximately 15 seconds.

Steps to reproduce

  1. Add a product to the cart.
  2. Go to FluentCart checkout.
  3. Complete the shipping/billing information.
  4. Accept the terms and conditions.
  5. Select Square as the payment method.
  6. Square begins loading but the payment fields never appear.
  7. The console reports Square SDK did not load in time.

Additional code issue noticed

In square-checkout.js, Square waits for window.Square using waitForSquareSDK(15000). When the external Square SDK is blocked or fails to execute, the gateway remains unavailable.

I also noticed the Square validation code listens for:

fluent_cart_validate_checkout_square

and expects e.detail.resolve(). Please confirm that this is compatible with the validation event currently dispatched by FluentCart 1.6.2.

Could you please confirm:

  1. Whether this is a known issue with Square for FluentCart.
  2. Whether Square supports checkout pages sending Cross-Origin-Embedder-Policy: require-corp.
  3. Whether the Square add-on should explicitly accommodate the production SDK at web.squarecdn.com.
  4. Whether there is an updated Square add-on available that resolves this.
  5. Whether Square for FluentCart 1.0.1 is fully compatible with FluentCart 1.6.2.

I can provide screenshots, console logs, the response headers from the checkout page, and a copy of the installed Square add-on if required.

Thank you.

Shahjahan Jewel

Reported to the devs

S B

Shahjahan JewelΒ Thank you, Brother.

AKM Elias

The error you're seeing means your site is sending a Cross-Origin-Embedder-Policy: require-corp header on the checkout page β€” this isn't added by FluentCart or the Square add-on (it usually comes from a security plugin, hosting, or CDN setting), and Square's payment SDK cannot load under it. Please remove that header or exclude the checkout page from it, and the card form will load; if it persists after that, send us the new console output or open a support ticket and we'll dig further. Thanks

S B

I fixed it, the .HTAccess was off, i added, Header always set Cross-Origin-Embedder-Policy "require-corp" and it works perfectly. Thank you for your time.