question

aniket avatar image
aniket asked aniket answered

Access to fetch at '.../v1/tokens' from origin 'checkout.sandbox.dev.clover.com' has been blocked by CORS policy

Getting erorr for clover iframe

Access to fetch at 'https://token-sandbox.dev.clover.com/v1/tokens' from origin 'https://checkout.sandbox.dev.clover.com' has been blocked by CORS policy


Access to fetch at 'https://token-sandbox.dev.clover.com/v1/tokens' from origin 'https://checkout.sandbox.dev.clover.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
card-cvv_10.entry.js:9 POST https://token-sandbox.dev.clover.com/v1/tokens net::ERR_FAILED 401
onGetFieldData @ card-cvv_10.entry.js:9
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getFieldData @ card-cvv_10.entry.js:1
postMessageHandler @ card-cvv_10.entry.js:1
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getCardFieldValues @ card-cvv_10.entry.js:9
postTokenRequest @ card-cvv_10.entry.js:9
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1
card-cvv_10.entry.js:9 TypeError: Failed to fetch
    at MessageElement.onGetFieldData (card-cvv_10.entry.js:9)
    at MessageElement.postMessageHandler (card-cvv_10.entry.js:9)
    at index-7b61f880.js:1
onGetFieldData @ card-cvv_10.entry.js:9
await in onGetFieldData (async)
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getFieldData @ card-cvv_10.entry.js:1
postMessageHandler @ card-cvv_10.entry.js:1
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getCardFieldValues @ card-cvv_10.entry.js:9
postTokenRequest @ card-cvv_10.entry.js:9
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1
card-cvv_10.entry.js:9 Fetch failed loading: POST "https://token-sandbox.dev.clover.com/v1/tokens".
onGetFieldData @ card-cvv_10.entry.js:9
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getFieldData @ card-cvv_10.entry.js:1
postMessageHandler @ card-cvv_10.entry.js:1
(anonymous) @ index-7b61f880.js:1
postMessage (async)
sendMessage @ card-cvv_10.entry.js:1
sendMessageToChildren @ card-cvv_10.entry.js:1
getCardFieldValues @ card-cvv_10.entry.js:9
postTokenRequest @ card-cvv_10.entry.js:9
postMessageHandler @ card-cvv_10.entry.js:9
(anonymous) @ index-7b61f880.js:1

screen-shot-2021-12-22-at-100339-am.png


clover developer communitysemi-integrations
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered

I believe this is related to https://community.clover.com/questions/36041/issue-with-payment-api.html and has been resolved.

10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

We will investigate this.

1 comment
10 |2000

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

aniket avatar image aniket commented ·

I'm using iframe only, this error message started from yesterday only. It's our development environment where using clover sandbox iframe integration.


On production, clover iframe working perfectly.

0 Likes 0 ·
aniket avatar image
aniket answered

it's working now.

10 |2000

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

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