Visa Developer Community

Newbie

Test Question

why is my maven test not working on the visa direct sample code for the funds transfer APIerrors.PNGerrors in mvn test

1 REPLY 1
Highlighted
Visa Dev Moderator

Re: Test Question

Hello,

 

Please follow below steps and try again.

 

1.      Kindly comment out the below line in <<testclass>>.java

 

//apiClient.setPrivateKeyPassword("YOUR PRIVATEKEY PASSWORD");

 

2.      Kindly comment the below highlighted line in ApiClient.java

 

protected RestTemplate getRestTemplateForMutualAuth() {

        try {

            KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());

            FileInputStream keystoreInputStream = new FileInputStream(keystorePath);

            keystore.load(keystoreInputStream, keystorePassword.toCharArray());

            keystoreInputStream.close();

 

            SSLContext sslcontext = SSLContexts.custom().useProtocol("TLS")

                    .loadKeyMaterial(keystore, keystorePassword.toCharArray())

                    //.loadTrustMaterial(new File(keystorePath), keystorePassword.toCharArray())

                    .build();

 

Thanks,

Jai