Auth Email Error


#1

Hello I am havig an auth email error my error is like:
if (payment.authEmail.length <= 0) {

    if (payment.authEmail.length <= 0) {
                          ^

TypeError: Cannot read property ‘length’ of undefined

at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

#2

Have Managed to resolve the error the documentation on npm needs an update on the section:
let payment = paynow.createPayment(“shfh-adhc-sdbj-4784-sjj5”,"abc.gef@gmail.com");
payment.add(“Bananas”, 2.5);
payment.add(“Apples”, 3.4);
console.log(payment);
Added the authEmail to object and it worked just fine.


#3

Awesome! Thanks for sharing this. Will open a PR to update the documentation