Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
remote-pay-cloud
Advanced tools
Repository for Clover's cloud connector API. Published as an NPM package. Intended for use in a browser environment.
##At a Glance Make a sale.
var cloverLib = require("remote-pay-cloud").Clover;
var clover = new Clover({
"clientId" : "3BZPZ6A6FQ8ZM",
"domain" : "https://sandbox.dev.clover.com/",
"merchantId" : "VKYQ0RVGMYHRS",
"deviceSerialId" : "C021UQ52341078"
});
clover.initDeviceConnection(function(error) {
if(error) console.log(error)
else clover.sale({"amount" : 10000 },
function(error, saleResult) {
if(error) console.log(error);
console.log(saleResult);
clover.close();
});
});
To make a payment using the High Level Cloud API ####Create the Clover object.
var cloverLib = require("remote-pay-cloud").Clover;
var clover = new Clover(configuration);
There are several ways the Clover object can be configured.
Examples of creating the Clover object:
{
"clientId" : "3BZPZ6A6FQ8ZM",
"domain" : "https://sandbox.dev.clover.com/",
"merchantId" : "VKYQ0RVGMYHRS",
"deviceSerialId" : "C021UQ52341078"
}
{
"oauthToken" : "6e6313e8-fe33-8662-7ff2-3a6690e0ff14",
"domain" : "https://sandbox.dev.clover.com/",
"merchantId" : "VKYQ0RVGMYHRS",
"deviceSerialId" : "C021UQ52341078"
}
####Define how your program will use the Clover object #####In this example, this function will be passed when we start communicating with the device. If there is an error when communication is initiated, this function will get the error as a parameter.
function makeASale(error) {
if(error) console.log(error)
else clover.sale({"amount" : 12345, "tipAmount" : 123 }, mySaleResult);
}
#####Here we define the error-first callback that we pass in to the Clover.sale function above. If an error occurs, it will be the first parameter.
function mySaleResult(error, saleResult) {
// do something with the result
}
####Start communicating with the device and tell the device to call your program when it is ready
clover.initDeviceConnection(makeASale);
####Disclaimer This is a beta release and will not be supported long term. There may be a few incompatible changes in the general release, which is coming soon.
FAQs
Access Clover devices through the cloud.
The npm package remote-pay-cloud receives a total of 170 weekly downloads. As such, remote-pay-cloud popularity was classified as not popular.
We found that remote-pay-cloud demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.