question

realariful avatar image
realariful asked David Marginian Deactivated commented

Javascript SDK - No 'Access-Control-Allow-Origin' header is present on the requested resource 1

syncoria-odoo.pngdev-kits-real.pngHello,

We have a Clover Development Kit (Clover Flex). We have associated and activated the device with Clover App. When we try to connect with Clover Device, we get this error:Access to XMLHttpRequest at 'https://sandbox.dev.clover.com/v2/merchant/YYYYYYYYY/remote_pay?access_token=xxxxxxxxxxxx' from origin 'https://syncoria-payments.odoo.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Things we have done:
1. Allow Insecure Content in Browser
2. Try with multiple browsers
3. Sandbox Url: 'https://sandbox.dev.clover.com/v2/merchant/YYYYY/remote_pay?access_token=xxxxxxxxx'

I am sharing some screenshots. Can you help us regarding this?

semi-integrationsClover FlexRemote Pay Cloud
syncoria-odoo.png (157.6 KiB)
dev-kits-real.png (90.9 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

Please don't post access tokens in a public forum, even if this is just sandbox. It is likely your access token is not valid. Please make sure your app has read merchant permissions. If it does then you aren't obtaining it correctly. You should be installing your app on your test merchant and navigating to your app by selecting your app in the merchant dashboard.

7 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

realariful avatar image realariful commented ·

Hello David,


Thank you for your reply. I already have read permissions for merchant. I can fetch the devices from the Clover Merchant Account. Please see screenshots below.

For now, I am getting Websocket Connection Error.Screenshot from 2021-08-13 06-23-53.pngodoo.png

0 Likes 0 ·
realariful avatar image realariful realariful commented ·

Please see the websocket connection error Screenshot:screenshot-from.png

0 Likes 0 ·
screenshot-from.png (216.2 KiB)
David Marginian avatar image David Marginian ♦♦ realariful commented ·
I would suggest using one of our examples which can be found in our documentation. Also, please don't display an access token in your app.
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community