question

sanjevan avatar image
sanjevan asked David Marginian Deactivated commented

CORS policy error

Even after adding the domain to the RES confi. im keep getting the CORS policy error. what im i doing wrong?

1632757248243.png

1632757267883.png


Payments
1632757248243.png (16.4 KiB)
1632757267883.png (27.0 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.

David Marginian avatar image
David Marginian Deactivated answered

www.clover.com is a production URL, it appears you are working in sandbox. You need to hit the sandbox url (https://docs.clover.com/reference/api-reference-overview#sandbox-base-urls), not production. Please do not expose even sandbox access tokens in a public forum. I have deactivated that token. Also, please do not pass access_tokens in the query string, you should be passing it as a header - https://docs.clover.com/docs/using-api-tokens.

10 |2000

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

sanjevan avatar image
sanjevan answered David Marginian Deactivated commented

HI, thank you for the help. So basically i have the https://github.com/clover/codelab-remote-pay-cloud working on local. Now i want to move that to my server and test. So based on my reading i understand i need to create my own app like the "Cloud Pay Display" app i used to test on local so i can test this online, is this assumption correct :-(. if so i created the app in my developer account and i can see the app
1632760395196.png

When i press that button it's open the server page i have uploaded (the same way when i used the Cloud Pay Display ) but instet opeing the localhost it opening my server page.
Now this is where i got the CROS error...and not sure what im doing wrong.

1632760521787.png

Thank for the help


1632760395196.png (29.5 KiB)
1632760521787.png (62.8 KiB)
13 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.

David Marginian avatar image David Marginian ♦♦ commented ·

So you got past the cors error? The New error looks like you have something wrong on your end (your js code).

0 Likes 0 ·
sanjevan avatar image sanjevan David Marginian ♦♦ commented ·

So i thought im not getting the cros error...but was wrong i removed a js code file accidentally so ..now im still getting the cros error


1632795541230.png

this is my cros setting ...what im i doing wrong. i have uploaded the code lab tutorial to this url https://jeavensoft.com/jPay/

0 Likes 0 ·
1632795541230.png (20.3 KiB)
David Marginian avatar image David Marginian ♦♦ sanjevan commented ·

Have you installed your app on your test merchant - https://docs.clover.com/docs/merchant-interaction? You need to understand what the codelab is doing, what calls it's making, etc.

0 Likes 0 ·
Show more comments
sanjevan avatar image
sanjevan answered David Marginian Deactivated commented

Yes it appears that way but I don't have nothing much to go on this error. do you know if there's any another example that I can review.

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.

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