NodeJS Bug Detected


#1

The latest NodeJS-SDK found at (https://github.com/paynow/Paynow-NodeJS-SDK) README.md requires an update and I believe there is a bug in the NodeJS-SDK/dist/index.js. (Line: 49) defines a Payment function that requires 3 parameters however, the only way to invoke the Payment function, using the createPayment prototype method calls the Payment function with only 2 parameters, (Line: 87 ) results in an error.


#2

Can you make a fix pull request on the repo.


#3

You can try out the node sdk here. There is a fully functional example there.

Please note that the third parameter is optional in the Payment method as items are added to cart using the add method which updates the items parameter.