Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
@moltin/cordova-plugin-square-reader
Advanced tools
Cordova Plugin to interface with the Square Reader SDK
A Cordova plugin to interface with the native Square Reader POS SDKs.
$ cordova plugin add @moltin/cordova-plugin-square-reader
$ cordova platform ios prepare
At the moment the installation process for the library does not install the Square Reader SDK's to your platforms. You'll need to follow the Square Reader SDK installation for your platform of choice - right now we only support iOS
The library does not currently deal with the Authorization Code's from Square, and requesting them via OAuth. It is recommended that as part of initialising the library, you provide an authorisation code from the Square Developers section.
Set up the Square Reader SDK
window['squarereader'].setup(() => {
let params = {
"authCode": "<YOUR AUTH CODE>"
};
window['squarereader'].authorizeReaderSDKIfNeeded(params, () => {
alert("Authorised!")
},
(err) => {
alert(err)
});
}, (err) => {
alert(err);
});
Pair the reader POS system
window['squarereader'].pairCardReaders(() => {},
(err) => {
alert(err);
}
);
let params = {
"amount": "16.00"
}
window['squarereader'].startCheckout(params, () => {
alert("Success!")
}, (err) => {
alert(err);
});
In order to take contactless and card payments, you will need to ensure that you have completed your Square POS business set up on the Square dashboard. As soon as this is complete, the Square Reader system will automatically allow contactless and card payments.
FAQs
Cordova Plugin to interface with the Square Reader SDK
The npm package @moltin/cordova-plugin-square-reader receives a total of 0 weekly downloads. As such, @moltin/cordova-plugin-square-reader popularity was classified as not popular.
We found that @moltin/cordova-plugin-square-reader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.