Skip to content

Commit

Permalink
Merge pull request #311 from razorpay/issue_251
Browse files Browse the repository at this point in the history
fixed issue 251 & update documents
  • Loading branch information
ankitdas13 authored Nov 11, 2022
2 parents 3e6daf3 + 4e751e1 commit 653a278
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.8.4 - 2022-11-11
- [Bugfix]: fix: close virtualaccount end point [#310]
- [Bugfix]: fix: passing `partial_payment` boolean issue when creating order [#311]
- Added Issue and feature templates

## 2.8.3 - 2022-07-28
- [Bugfix]: create order api
- Updated Documentation
Expand Down
1 change: 0 additions & 1 deletion documents/registerEmandate.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ instance.subscriptions.createRegistrationLink({
| description* | string | A brief description of the payment. |
| subscription_registration | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/emandate/auto-debit/#121-create-a-registration-link) are supported |
| receipt | string | Your system order reference id. |
| payment_capture* | boolean | Indicates whether payment status should be changed to `captured` automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically.|
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
Expand Down
3 changes: 2 additions & 1 deletion lib/resources/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = function (api) {

create(params = {}, callback) {
let isNotForm = false
let { amount, currency, receipt, payment_capture, notes, method,
let { amount, currency, receipt, partial_payment,payment_capture, notes, method,
...otherParams } = params
currency = currency || 'INR'

Expand All @@ -63,6 +63,7 @@ module.exports = function (api) {
currency,
receipt,
method,
partial_payment: normalizeBoolean(partial_payment),
payment_capture: normalizeBoolean(payment_capture),
...otherParams
}, normalizeNotes(notes))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "razorpay",
"version": "2.8.3",
"version": "2.8.4",
"description": "Official Node SDK for Razorpay API",
"main": "dist/razorpay",
"typings": "dist/razorpay",
Expand Down
4 changes: 2 additions & 2 deletions test/resources/orders.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('ORDERS', () => {
amount: orderAmount,
receipt: receipt,
currency: 'INR',
payment_capture: true,
partial_payment: true,
notes: {
note1: 'This is note1',
note2: 'This is note2'
Expand All @@ -130,7 +130,7 @@ describe('ORDERS', () => {
amount: orderAmount,
receipt: receipt,
currency: 'INR',
payment_capture: 1,
partial_payment: true,
'notes[note1]': 'This is note1',
'notes[note2]': 'This is note2'
}
Expand Down

0 comments on commit 653a278

Please sign in to comment.