Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

razorpay

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

razorpay - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

5

CHANGELOG.md
# Changelog
## 2.0.4 - 2019-03-06
- Added `recipient_settlement_id` parameter for Transfers.
- Renamed "X-Razorpay-Header" to "X-Razorpay-Signature header" in the error message in `validateWebhookSignature`.
- Added support for `currency` in `capture` method for Payments.
## 2.0.3 - 2018-11-13

@@ -4,0 +9,0 @@ - Added support for Partner Auth.

23

dist/resources/payments.js

@@ -55,3 +55,3 @@ 'use strict';

},
capture: function capture(paymentId, amount, callback) {
capture: function capture(paymentId, amount, currency, callback) {
if (!paymentId) {

@@ -65,7 +65,22 @@ throw new Error('`payment_id` is mandatory');

var payload = {
amount: amount
};
/**
* For backward compatibility,
* the third argument can be a callback
* instead of currency.
* Set accordingly.
*/
if (typeof currency === 'function' && !callback) {
callback = currency;
currency = undefined;
} else if (typeof currency === 'string') {
payload.currency = currency;
}
return api.post({
url: '/payments/' + paymentId + '/capture',
data: {
amount: amount
}
data: payload
}, callback);

@@ -72,0 +87,0 @@ },

6

dist/resources/transfers.js

@@ -19,3 +19,4 @@ "use strict";

skip = params.skip,
payment_id = params.payment_id;
payment_id = params.payment_id,
recipient_settlement_id = params.recipient_settlement_id;

@@ -45,3 +46,4 @@ var url = '/transfers';

count: count,
skip: skip
skip: skip,
recipient_settlement_id: recipient_settlement_id
}

@@ -48,0 +50,0 @@ }, callback);

@@ -85,3 +85,3 @@ "use strict";

throw Error("Invalid Parameters: Please give request body," + "signature sent in X-Razorpay-Header and " + "webhook secret from dashboard as parameters");
throw Error("Invalid Parameters: Please give request body," + "signature sent in X-Razorpay-Signature header and " + "webhook secret from dashboard as parameters");
}

@@ -88,0 +88,0 @@

@@ -1,2 +0,2 @@

Copyright (c) 2017 Razorpay
Copyright (c) 2019 Razorpay

@@ -3,0 +3,0 @@ MIT License

{
"name": "razorpay",
"version": "2.0.3",
"version": "2.0.4",
"description": "Official Node SDK for Razorpay API",

@@ -43,5 +43,5 @@ "main": "dist/razorpay",

"promise": "^8.0.1",
"request": "^2.87.0",
"request": "^2.88.0",
"request-promise": "^4.2.2"
}
}
# Razorpay Node SDK
[![npm](https://img.shields.io/npm/v/razorpay.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/razorpay)

@@ -17,6 +18,4 @@ [![Build Status](https://travis-ci.org/razorpay/razorpay-node.svg?branch=master)](https://travis-ci.org/razorpay/razorpay-node)

Documentation of Razorpay's API and their usage is available at <https://docs.razorpay.com>
### Basic Usage

@@ -29,4 +28,4 @@

key_id: 'YOUR_KEY_ID',
key_secret: 'YOUR_KEY_SECRET'
})
key_secret: 'YOUR_KEY_SECRET',
});
```

@@ -41,3 +40,3 @@

// example
instance.payments.fetch(paymentId)
instance.payments.fetch(paymentId);
```

@@ -48,10 +47,13 @@

```js
instance.payments.all({
from: '2016-08-01',
to: '2016-08-20'
}).then((response) => {
// handle success
}).catch((error) => {
// handle error
})
instance.payments
.all({
from: '2016-08-01',
to: '2016-08-20',
})
.then(response => {
// handle success
})
.catch(error => {
// handle error
});
```

@@ -62,12 +64,15 @@

```js
instance.payments.all({
from: '2016-08-01',
to: '2016-08-20'
}, (error, response) => {
if (error) {
// handle error
} else {
// handle success
instance.payments.all(
{
from: '2016-08-01',
to: '2016-08-20',
},
(error, response) => {
if (error) {
// handle error
} else {
// handle success
}
}
})
);
```

@@ -100,5 +105,5 @@

- [Partner Auth](https://github.com/razorpay/razorpay-node/wiki#partner-auth)
---
## Development

@@ -118,13 +123,11 @@

1. Switch to `master` branch. Make sure you have the latest changes in the local master
2. Update the `CHANGELOG.md` & bump the version in `package.json`
3. Commit
4. Tag the release & push to Github
5. Create a release on GitHub using the website with more details about the release
6. Publish to npm with `npm publish` command
1. Switch to `master` branch. Make sure you have the latest changes in the local master
2. Update the `CHANGELOG.md` & bump the version in `package.json`
3. Commit
4. Tag the release & push to Github
5. Create a release on GitHub using the website with more details about the release
6. Publish to npm with `npm publish` command
## Licence
MIT Licensed. LICENSE file added to repo.
MIT Licensed. See [LICENSE.txt](LICENSE.txt) for more details
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc