
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
react-native-cashonrails
Advanced tools
A react native library for seamless payment integration with Cashonrails.
Cashonrails is a lightweight React Native library that provides easy-to-integrate components and hooks for embedding a secure and customizable checkout or access code process into your application.
Use npm or yarn to add Cashonrails to your project:
npm install react-native-cashonrails
# or
yarn add react-native-cashonrails
CashonrailsProviderTo enable context-based features (e.g., modals, configuration sharing), you must wrap your app with CashonrailsProvider.
import React from 'react';
import { CashonrailsProvider } from 'react-native-cashonrails';
const App = () => (
<CashonrailsProvider>
{/* Your components go here */}
</CashonrailsProvider>
);
export default App;
CheckoutButtonThe CheckoutButton component renders a styled button that opens the secure checkout modal when clicked.
import React from 'react';
import { CheckoutButton } from 'react-native-cashonrails';
const App = () => {
const config = {
api_key: 'your-api-key',
amount: 1000,
currency: 'USD',
customer: {
email: 'user@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '1234567890',
},
onComplete: (data) => console.log('Payment complete:', data),
onCancel: (data) => console.log('Payment cancelled:', data),
};
return <CheckoutButton config={config} />;
};
export default App;
CheckoutThe Checkout component opens the modal automatically when rendered.
import React from 'react';
import { Checkout } from 'react-native-cashonrails';
const App = () => {
const config = {
api_key: 'your-api-key',
amount: 1000,
currency: 'USD',
customer: {
email: 'user@example.com',
first_name: 'John',
last_name: 'Doe',
phone: '1234567890',
},
onComplete: (data) => console.log('Payment complete:', data),
onCancel: (data) => console.log('Payment cancelled:', data),
};
return <Checkout config={config} />;
};
export default App;
UseAccessCodeThis component renders a modal-based WebView for handling access code-based flows.
import React from 'react';
import { UseAccessCode } from 'react-native-cashonrails';
const App = () => {
const config = {
access_code: 'your-access-code',
onComplete: (data) => console.log('Access code success:', data),
onCancel: (data) => console.log('Access code cancelled:', data),
};
return <UseAccessCode config={config} />;
};
export default App;
CheckoutButton| Prop | Type | Default | Description |
|---|---|---|---|
config | CheckoutConfig | Required | Checkout configuration object |
buttonText | string | 'Checkout Securely' | Button label |
style | React.CSSProperties | undefined | Custom style for the button container |
textStyle | React.CSSProperties | undefined | Custom style for the button text |
disabled | boolean | false | Disables the button |
loadingText | string | 'Processing...' | Text displayed when loading |
showHeader | boolean | true | Display header text above button |
headerText | string | 'Secure payment powered by Cashonrails' | Header text |
headerStyle | React.CSSProperties | undefined | Custom style for the header |
Checkout| Prop | Type | Default | Description |
|---|---|---|---|
config | CheckoutConfig | Required | Triggers checkout modal on render |
UseAccessCode| Prop | Type | Default | Description |
|---|---|---|---|
config | UseAccessCodeConfig | Required | Triggers access code modal on render |
CheckoutConfigtype CheckoutConfig = {
api_key: string;
amount: number;
currency: string;
customer: {
email: string;
first_name: string;
last_name: string;
phone: string;
};
callback_url?: string;
onComplete?: (data: Response) => void;
onCancel?: (data: Response) => void;
debug?: boolean;
};
UseAccessCodeConfigtype UseAccessCodeConfig = {
access_code: string;
callback_url?: string;
onComplete?: (data: Response) => void;
onCancel?: (data: Response) => void;
debug?: boolean;
};
Responsetype Response = {
status: string;
reference: string;
transaction_date?: string;
[key: string]: any;
};
CashonrailsContextTypetype CashonrailsContextType = {
openCheckout: (config: CheckoutConfig) => void;
openAccessCode: (config: UseAccessCodeConfig) => void;
subscribeToModalClose: (callback: () => void) => () => void;
isDebug: boolean;
setIsDebug: (value: boolean) => void;
};
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A react native library for seamless payment integration with Cashonrails.
We found that react-native-cashonrails demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.