• Home
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • App Market Developer Platform
  • Clover GO
  • Ideas & Feedback
  • Semi-Integration
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
Skip to main content
  • Create
    • Ask a question
    • Post an idea
    • App Market Developer Platform
    • Clover GO
    • Ideas & Feedback
    • Semi-Integration
    • Topics
    • Questions
    • Articles
    • Ideas
  • Sign in
  • Home
  • App Market Developer Platform
This question was closed Apr 02 at 09:52 PM by Clover_Community_Bot for the following reason: automated

question

Omar Reyes avatar image
Omar Reyes asked · Aug 25, 2016 at 01:36 AM

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

I am using the remote-pay-cloud sdk in javascript for my semi-integration project. I copied over the javascript files from this repository https://github.com/clover/remote-pay-...

We uploaded our code that we been testing in localhost to our beta server. We had no problems in localhost but receive the error below when running in our beta server which is under https.

The CORS setting in the dashboard is set to the correct domain because we're able to retrieve an access token.

Any ideas what is wrong?

xmlHttpSupport.js:59 GET https://www.clover.com/v3/merchants/MYMERCHANTID/devices?accesstoken=MYTOKEN XmlHttpSupport.doXmlHttp @ xmlHttpSupport.js:59XmlHttpSupport.getData @ xmlHttpSupport.js:91Clover.initDeviceConnectionInternal @ Clover.js:371Clover.initDeviceConnectionInternal @ Clover.js:431Clover.initDeviceConnection @ Clover.js:232(anonymous function) @ confirmation.php?orderId=11585446&merchantid=MYMERCHANTID&employeeid=MYEMPLOYEEID&clientid=C20…:1767dispatch @ jquery-2.1.4.min.js:3r.handle @ jquery-2.1.4.min.js:3 /admin/confirmation.php?orderId=11585446&merchantid=MYMERCHANTID&employee…lientid=MYEMPLOYEEID#accesstoken=MY_TOKEN:1

XMLHttpRequest cannot load https://www.clover.com/v3/merchants/MYMERCHANTID/devices?accesstoken=MYTOKEN. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://beta.petexec.net' is therefore not allowed access. The response had HTTP status code 401.

Clover Mini
Comment
0
10 |2000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

1 Answer

george.ono avatar image
george.ono answered · Aug 25, 2016 at 08:15 AM Locked

I also had the issue - make sure that the details when creating the listener are correct. If the details ar enot correct, no CORS details are added to the response. Beware that even a missing "www" can make the app not behave as expected. For the sandbox, I am using the following domain: "https://apisandbox.dev.clover.com/".

0 · Share
10 |2000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

question details

No one has followed this question yet.

Answers Subscribe to Answers Answers and Comments Subscribe to Comments and Answers

Related Questions

Javascript SDK - Production domain for US, UK, and ROI markets 1 Answer

How to troubleshoot "connection denied" error with cause "undefined"? 2 Answers

remote-pay-cloud sandbox cancel screen on call to cloverConnector.sale() 2 Answers

Is it possible to void a payment but keep it on an order with a "voided" status? 1 Answer

Is it possible to use the TransactionRequest.requestId to get informations about the transaction? 1 Answer

Answerhub Logo
  • About
  • ·
  • FAQ
  • ·
  • Privacy
  • ·
  • Copyright © 2010-19 DZone, Inc.