Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-native-sp-reader-sdk
Advanced tools
react-native
version >0.40
Check the wiki for instructions.
import ReaderSDK from 'react-native-sp-reader-sdk';
class testApp extends Component {
constructor() {
super();
const readerSdk = new ReaderSDK();
// initialize the sdk
readerSdk.initSdk();
// login with an auth code
readerSDK.authorizeWithCode("1234567").then(() => {
// success
}).catch((err) => {
// failure
})
// find out if already logged into readerSDK
const isLoggedIn = await readerSdk.isLoggedIn();
// set other settings
readerSDK.setCheckoutParameters(
ReaderSDK
.AdditionalPaymentTypes
.MANUAL_CARD_ENTRY, // additional payment types
null, // tip percentages arr
tipsEnabled, // tips enabled
false, // custom tip field visible
false, // separate tip screen visible
true, // skip receipt
false, // always require signature
false, // allow split tender
);
// present the settings screen
readerSDK.presentReaderSettingsScreen(
true, // animate modal window
);
// find out if logged in
const isLoggedIn = readerSDK.isLoggedIn()
.then(isLoggedIn => {
// isLoggedIn is either true or false
});
readerSDK.requestPermissions() // so try asking for permissions (needed for iOS)
.then((permissions) => {
if (permissions != null) {
let permissionsGranted;
if (notAndroid) {
const {
appLocationPermission,
deviceLocationEnabled,
appRecordingPermission,
} = permissions;
// do sth?
}
}
});
readerSDK.checkoutWithAmount(
100, // amount to pay (in cents)
'This is a transaction', // transaction notes
).then((result) => { // transactionRequestWithCentsAmount success
/*
{
"transaction": {
createdAt:"2018-07-25T18:13:02+03:00"
locationID:"18K28ZA1PZF1T"
tenderCnt:1
totalMoneyAmount:115 (in cents, aka 1,15$)
totalMoneyCurrency:"USD"
totalTipMoneyAmount:15 (in cents, aka 0,15$)
totalTipMoneyCurrency:"USD"
transactionClientID:"EE8E7FF7-D16E-4350-91AD-47F2S6C7B447"
transactionID:"Wo5JKw2fOp7dfwai7Gv3FlO14D9eV"
}
}
*/
// Do something with the result
})
.catch((e) => { // checkoutWithAmount error
});
readerSDK.deauthorize(); // logout
}
...
}
FAQs
Unknown package
The npm package react-native-sp-reader-sdk receives a total of 1 weekly downloads. As such, react-native-sp-reader-sdk popularity was classified as not popular.
We found that react-native-sp-reader-sdk 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.