Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-payscript
Advanced tools
React client for payscript
Npm
npm install react-payscript --save
Yarn
yarn add react-payscript
UMD
<script src="https://unpkg.com/react-payscript@latest/dist/index.js"></script>
Module
import React from 'react';
import { Form, Group, Input, CreditCard, Button } from 'react-payscript';
const Example = () => {
function onProcessing(e) {
console.log("Processing", e);
}
function onSuccess(e) {
console.log("Success", e);
}
function onError(e) {
console.log("Error", e);
}
return (
<Form
apitoken="xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxx"
payscripttoken="xxxxxxxxxxxxxxxxxxxxxxxxxx"
gateway="xxxxx"
onProcessing={onProcessing}
onSuccess={onSuccess}
onError={onError}
styles={{ 'theme': 'ready!' }} >
<Group>
<CreditCard label="Card" />
<Input label="Name" id="name" placeholder="Card holder's name" required />
</Group>
<Group>
<Input label="Email" id="email" placeholder="example@email.com" />
<Input label="Phone" id="phone" placeholder="(123) 456-7890" />
<Input label="Street" id="street" placeholder="Card billing street" required />
<Input label="Zip" id="zip" placeholder="Card billing zip code" required />
<Input label="Custom 1" id="custom_1" placeholder="Custom 1" />
<Input label="Long Custom text example" id="custom_2" placeholder="Custom 2" />
</Group>
<Button label="PayScript $25" />
</Form>
)
};
export default Example;
UMD
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React Payscript</title>
</head>
<body>
<main></main>
<!-- JSX -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.38/browser.min.js"></script>
<!-- React -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.development.js"></script>
<!-- React DOM -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.development.js"></script>
<!-- React-Payscript -->
<script src="https://unpkg.com/react-payscript@latest/dist/index.js"></script>
<!-- Script -->
<script type="text/babel" data-plugins="transform-react-jsx,transform-do-expressions,transform-object-rest-spread" >
const { Form, Group, Input, CreditCard, Button } = reactPayscript;
class Example extends React.Component {
onProcessing(e) {
console.log("Processing", e);
}
onSuccess(e) {
console.log("Success", e);
}
onError(e) {
console.log("Error", e);
}
render() {
return (
<Form
apitoken="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
payscripttoken="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
gateway="xxxxx"
onProcessing={this.onProcessing}
onSuccess={this.onSuccess}
onError={this.onError}
styles={{ 'theme': 'ready!' }} >
<Group>
<CreditCard label="Card" />
<Input label="Name" id="name" placeholder="Card holder's name" required />
</Group>
<Group>
<Input label="Email" id="email" placeholder="example@email.com" />
<Input label="Phone" id="phone" placeholder="(123) 456-7890" />
<Input label="Street" id="street" placeholder="Card billing street" required />
<Input label="Zip" id="zip" placeholder="Card billing zip code" required />
<Input label="Custom 1" id="custom_1" placeholder="Custom 1" />
<Input label="Long Custom text example" id="custom_2" placeholder="Custom 2" />
</Group>
<Button label="PayScript $25" />
</Form>
);
}
}
ReactDOM.render(<Example />,document.querySelector("main"));
</script>
</body>
</html>
Form
Group
Input
CreditCard
Button
MIT © PAYSCRIPT
FAQs
react-payscript
The npm package react-payscript receives a total of 0 weekly downloads. As such, react-payscript popularity was classified as not popular.
We found that react-payscript 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.