Basic NodeJS samples are not working!

AlvaroMartin
Regular Visitor

Basic NodeJS samples are not working!

Hey team! Find information about how to use VISA it's being a struggle, testing also so I'm blocked. Let's see if you can help me out!

 

I downloaded the VISA Direct Sample Code for NodeJS and check and follow documentation and readme files.  credentials.json are as follows

{
    "userId": "...",
    "password": "...",
    "cert": "path that is never checked but ok",
    "key": "path that is never checked but ok"
}

However, the source code search for mleKeyId, mlePublicKeyPath and mlePrivateKeyPath as mandatory, after a heavy search with Google I'm even more confused. So what I did to try run the tests is:

{
    "userId": "...",
    "password": "...",
    "cert": "../../security/cert.pem",
    "key": "../../security/key_3912eea6-4a5e-49fc-9fba-57a600b9dabe.pem",
    "mleKeyId": "none",
    "mlePublicKeyPath": "none",
    "mlePrivateKeyPath": "none"
}

So adding those values at "none" get me to the next struggle, the tests execution...

encryption error
1) Adjustment Api AFT Execution
2) Adjustment Api AFT StatusCode
encryption error
3) Adjustment Api OCT Execution
4) Adjustment Api OCT

0 passing (20s)
4 failing

1) Adjustment Api AFT Execution:
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Git\visa\Visa Direct Sample Code - NodeJS(2.0.0)\visa_direct\adjustment_api\test\adjustreversefundsAFT_test.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)

2) Adjustment Api AFT StatusCode:

AssertionError [ERR_ASSERTION]: false == true
+ expected - actual

-false
+true

at Context.<anonymous> (visa_direct\adjustment_api\test\adjustreversefundsAFT_test.js:56:12)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)

3) Adjustment Api OCT Execution:
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Git\visa\Visa Direct Sample Code - NodeJS(2.0.0)\visa_direct\adjustment_api\test\adjustreversefundsOCT_test.js)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)

4) Adjustment Api OCT:

AssertionError [ERR_ASSERTION]: false == true
+ expected - actual

-false
+true

at Context.<anonymous> (visa_direct\adjustment_api\test\adjustreversefundsOCT_test.js:56:12)
at processImmediate (internal/timers.js:464:21)
at process.callbackTrampoline (internal/async_hooks.js:130:17)
1 REPLY 1
I_Doroteo3
Visa Developer Support Specialist

Re: Basic NodeJS samples are not working!

Hi @AlvaroMartin

 

I noticed you also posted in the Sandbox & Test Data forum regarding the same topic, so I am replying to both messages in this thread.

 

If you need assistance with Message Level Encryption (MLE), please check out this link: Message Level Encryption (visa.com)

 

If you have questions about Visa Direct, then please email the Visa Direct Regional Mailbox that pertains to the region you are from.  

  

To reach the various regional product office, please use these email addresses. 

USVisaDirect@visa.com 

CanadaVisaDirect@visa.com 

EUVisaDirect@visa.com 

LACVisaDirect@visa.com 

CEMEAVisaDirect@visa.com 

APVisaDirect@visa.com 

  

For all other regions, please reach out to local Visa representatives. 

 

Thanks, 

Illana