
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 166 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.