
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
reactjs-payment-gateway
Advanced tools
A React payment gateway component for Omniware payment processing
A React component for integrating with Omniware payment gateway.
The package includes TypeScript definitions for all payment parameters matching the Swift SDK structure.
npm install reactjs-payment-gateway
npm install reactjs-payment-gateway
import PaymentGateway, { PaymentGatewayParams } from 'reactjs-payment-gateway';
Prepare the payment data object with all required parameters:
const paymentData: PaymentGatewayParams = {
api_key: '<API_KEY>',
return_url: '<RETURN_URL>',
mode: '<LIVE || TEST>',
name: '<NAME>',
phone: '<PHONE>',
city: '<CITY>',
country: '<COUNTRY>',
state: '<STATE>',
email: '<EMAIL>',
zip_code: '<ZIP_CODE>',
description: '<DESCRIPTION>',
currency: '<CURRENCY>',
amount: '<AMOUNT>',
address_line_1: '<ADDRESS_LINE_1>',
address_line_2: '<ADDRESS_LINE_2>',
order_id: '<ORDER_ID>'
};
Please contact support for assistance with this particular query.
const handlePayment = async () => {
// Use the SALT only for hash generation
paymentData.hash = await generatehash(paymentData);
// Remove the SALT from the paymentData object after generating the hash
delete paymentData.salt;
try {
const result = await PaymentGateway.initiatePayment(<PAYMENT_URL: String>, <PAYMENT_PARAMS: PaymentGatewayParams>);
console.log(result.success ? 'Payment successful!' : 'Payment failed');
} catch (error) {
console.error('Payment error:', error.message);
}
};
Call the payment function with your payment data and gateway URL:
try {
await PaymentGateway.initiatePayment(<PAYMENT_URL: String>, <PAYMENT_PARAMS: PaymentGatewayParams>);
} catch (error) {
// Handle errors
console.error('Payment error:', error);
}
api_key
: Your merchant API key (from environment variables)return_url
: URL to redirect after paymentmode
: 'LIVE' or 'TEST'amount
: Payment amount as stringcurrency
: Currency code (e.g. 'INR')order_id
: Unique order IDdescription
: Payment descriptionaddress_line_1
: Billing address line 1address_line_2
: Billing address line 2city
: Billing citystate
: Billing statecountry
: Billing country codezip_code
: Billing zip codename
: Customer nameemail
: Customer emailphone
: Customer phone numberhash
: SHA-512 hash of sorted payment parametersTo handle payment responses, you need to create an endpoint that can process POST requests and pass that url as return_url
in the paymentData
. Follow these general steps:
Make sure your endpoint is accessible over HTTPS and can handle the expected request format from the payment gateway.
Always store sensitive data like API keys, salts, and payment URLs in environment variables. Never hardcode them in your source code. Follow these best practices:
.env
file in your project root:API_KEY=your_api_key
PAYMENT_URL=your_payment_url
SALT=your_salt_value
Add .env
to your .gitignore
file to prevent accidental commits
Access environment variables in your code:
const paymentData = {
api_key: process.env.API_KEY,
// ... other parameters
};
Use secure environment variable management in production
Regularly rotate your API keys and salts
Implement proper access controls for sensitive data
MIT
FAQs
A React payment gateway component for Omniware payment processing
The npm package reactjs-payment-gateway receives a total of 0 weekly downloads. As such, reactjs-payment-gateway popularity was classified as not popular.
We found that reactjs-payment-gateway 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.