Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Official nodejs library for Razorpay API.
Read up here for getting started and understanding the payment flow with Razorpay: https://docs.razorpay.com/docs/getting-started
npm i razorpay
Documentation of Razorpay's API and their usage is available at https://docs.razorpay.com
Instantiate the razorpay instance with key_id
& key_secret
. You can obtain the keys from the dashboard app (https://dashboard.razorpay.com/#/app/keys)
const Razorpay = require('razorpay');
var instance = new Razorpay({
key_id: 'YOUR_KEY_ID',
key_secret: 'YOUR_KEY_SECRET',
});
The resources can be accessed via the instance. All the methods invocations follows the namespaced signature
// API signature
// {razorpayInstance}.{resourceName}.{methodName}(resourceId [, params])
// example
instance.payments.fetch(paymentId);
Every resource method returns a promise.
instance.payments
.all({
from: '2016-08-01',
to: '2016-08-20',
})
.then(response => {
// handle success
})
.catch(error => {
// handle error
});
If you want to use callbacks instead of promises, every resource method will accept a callback function as a last parameter. The callback functions will behave as Error First Callbacks
instance.payments.all(
{
from: '2016-08-01',
to: '2016-08-20',
},
(error, response) => {
if (error) {
// handle error
} else {
// handle success
}
}
);
npm install
npm test
master
branch. Make sure you have the latest changes in the local masterCHANGELOG.md
& bump the version in package.json
npm publish
commandMIT Licensed. See LICENSE.txt for more details
2.9.5 - 2024-10-23
fix: Cancel subscription cancelAtCycleEnd
now supports both boolean
and 0/1
values as expected.
FAQs
Official Node SDK for Razorpay API
The npm package razorpay receives a total of 34,000 weekly downloads. As such, razorpay popularity was classified as popular.
We found that razorpay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.