Re: How to test MLE on Postman

shameem
Visa Employee

Re: How to test MLE on Postman

Hi @pcamimlojunior ,

The purpose of this postman is to encrypt your JSON payload using the server public key/certificate, sends the encrypted data to VISA by making an API Call and finally decrypt the response from VISA using the client private key.

 

What i can see is, you are trying to decrypt the encrypted payload you generated from postman  without making an api call which is not correct.  

  1. If you want to test if the encrypt and decrypt works, then please your client certificate to encrypt and your private key to decrypt.
  2. If you want to decrypt an encrypted response (using server certificate) from VISA, make sure to make the correct API call and take the response to decrypt (using client private key).

I hope that helps and clarifies what you are doing is wrong.

 

Thank you.

Shameem

pcamimlojunior
New Contributor

Re: How to test MLE on Postman

Thanks for you message now I am using the right files I think so.

I download the viap-samples java project and I added all the files right, key, shared secret key, user, pass and so on.

but not to test the Enroll card API I am receiving the error below I get all the info from Visa Dashboard Test data as you can see below, is something that I am missing?

Thanks.
Screenshot 2023-11-13 at 23.57.16.pngScreenshot 2023-11-13 at 23.57.24.pngScreenshot 2023-11-13 at 23.57.30.pngScreenshot 2023-11-13 at 23.57.41.png

shameem
Visa Employee

Re: How to test MLE on Postman

Hi @pcamimlojunior ,

 

Yes this is now correct but the PAN is incorrect.

Visa PAN starts with 4 but you are not substituting the provided test data correctly. 

V=4 and M=5.

Please correct and double check the PAN and try again.

Thank you.

Shameem

João
Helper

Re: How to test MLE on Postman

Hi @shameem thx for all your tutorials, it is helping me a lot.

I was trying to authenticate with the MLE using your tutorial, but I am getting an unexpected error:

image.png

 

Any tip what am I doing wrong? 

Thanks,

João Brosin

shameem
Visa Employee

Re: How to test MLE on Postman

Hi @João ,

 

Could you please check if you have enabled (selected) the Visa Direct APIs under the VDP project you are testing and ensure you are using the corresponding credentials

 

Thank you

Shameem

João
Helper

Re: How to test MLE on Postman

That was the problem. Thanks!
kiruthiga
New Contributor

Re: How to test MLE on Postman

Hi,

I am trying to use this for the RTX API which has a XML body but getting this error. Could you please let me know if this example applies only to the apis which have a JSON request and response

 

Capture.JPG

shameem
Visa Employee

Re: How to test MLE on Postman

Hi @kiruthiga ,

 

Thank you for trying the "How to test MLE on Postman".

 

The Node JS Sample Code provided for the Encryption & Decryption (the index.js file) uses JSON Payload / Data. You might need to update and adapt the code to suite your needs. 

 

I  hope that helps.

 

Thank you

ayagaidi1995
Helper

Re: How to test MLE on Postman

i flolloe al steps but when

localhost:3000/decrypt

 

the run stop with error Image 9-4-2024 at 12.46 PM.jpeg pleaese note that localhost:3000/encrypt. work secssfuly

Re1deen
New Contributor

Re: How to test MLE on Postman

Hello. I get and error:

/Users/user/Downloads/postman/node_modules/node-jose/lib/jwe/decrypt.js:176

              reject(new Error("no key found"));

                     ^

Error: no key found

    at processKey (/Users/user/Downloads/postman/node_modules/node-jose/lib/jwe/decrypt.js:176:22)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I use keys:
Снимок экрана 2024-08-13 в 14.15.06.png

 

And they are present in config
Снимок экрана 2024-08-13 в 14.16.37.png

 What else could I check?
Encrypt works fine but decrypt falls in an error.