Skip to content

Instantly share code, notes, and snippets.

@t2
Created February 13, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t2/1f002c7e95548129c6b73957a5c03743 to your computer and use it in GitHub Desktop.
Save t2/1f002c7e95548129c6b73957a5c03743 to your computer and use it in GitHub Desktop.
const configuration = {
domain: 'https://clover.com/',
merchantId: 'private',
oauthToken: 'private'
};
const devicesUrl = configuration.domain +
"v3/merchants/" + configuration.merchantId +
"/devices?access_token=" + configuration.oauthToken;
$.ajax({
url: devicesUrl,
cache: false,
dataType: 'json',
crossDomain: true,
contentType: 'application/json; charset=utf-8',
success: function(devices) {
console.log('Populate devices select list...');
},
error: function(xhr, status, err) {
console.log('Handle error...');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment