All Downloads are FREE. Search and download functionalities are using the official Maven repository.

NpsSDK.Test Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package NpsSDK;

public class Test {
    public static void main(String[] args) {
        RootElement data = null;
        RootElement response = null;

        ILogger consoleLogger = new ConsoleLogger();

        WsdlHandlerConfiguration wsdlHandlerConfiguration = new WsdlHandlerConfiguration(
                ILogger.LogLevel.INFO,
                WsdlHandlerConfiguration.NpsEnvironment.staging,
                "orhhsnELMdsTZiL2vfS5CDLGuUxR04X8V7NDFzHexP5mz2K1nsPj49AzGhHKeJuN",
                consoleLogger);

        try {
            NpsSDK.NpsSdk npsSdk = new NpsSDK.NpsSdk(wsdlHandlerConfiguration);

            data = new NpsSDK.RootElement();

//            data.add("psp_Version", "2.2" );
//            data.add("psp_MerchantId", "psp_test" );
//            data.add("psp_TxSource", "WEB" );
//            data.add("psp_MerchTxRef", "ORDER69461-2345" );
//            data.add("psp_MerchOrderId", "ORDER69461" );
//            data.add("psp_Amount", "15050" );
//            data.add("psp_NumPayments", "1" );
//            data.add("psp_Currency", "032" );
//            data.add("psp_Country", "ARG" );
//            data.add("psp_Product", "14" );
//            data.add("psp_CardNumber", "4507990000000010" );
//            data.add("psp_CardExpDate", "1612" );
//            data.add("psp_PosDateTime", "2016-12-01 12:00:00");
//            data.add("psp_CardSecurityCode", "325" );
//
//            response = npsSdk.payOnLine_2p(data);



            data.add("psp_Version", "2.2" );
            data.add("psp_TransactionId", "3515929");
            data.add("psp_MerchantId", "plusgrade" );
            data.add("psp_PosDateTime", "2016-12-01 12:00:00");

            data.add("psp_CardNumber", "4507990000000010");
            data.add("psp_NumPayments", "1" );
            data.add("psp_Currency", "032" );
            data.add("psp_Country", "ARG" );
            data.add("psp_TxtSource", "asd");
            data.add("psp_Amount", "10000");
            data.add("psp_Product", "14" );
            data.add("psp_secureHash", "12345678901234567890123456789012");

            response = npsSdk.createPaymentMethodFromPayment(data);



//            data.add("psp_Version", "2.2");
//            data.add("psp_MerchantId", "psp_test");
//            data.add("psp_IIN", "424242");
//            data.add("psp_PosDateTime", "2019-12-01 12:00:00");
//            data.add("psp_ClientSession", "C5jwwbyAYneLbvZe0IYPHTvn7ODMb3vG8ZqCYaYIioUmWUbcgKscGpg8WhXrspRs");
//
//            response = npsSdk.getIINDetails(data);



//            data.add("psp_Version", "2.2");
//            data.add("psp_MerchantId", "psp_test");
//
//            ComplexElement pspCardInputDetails = new ComplexElement();
//            pspCardInputDetails.add("Number", "4507990000000010");
//            pspCardInputDetails.add("ExpirationDate", "2501");
//            pspCardInputDetails.add("SecurityCode", "123");
//            pspCardInputDetails.add("HolderName", "JOHN DOE");
//
//            data.add("psp_CardInputDetails", pspCardInputDetails);
//            data.add("psp_ClientSession", "C5jwwbyAYneLbvZe0IYPHTvn7ODMb3vG8ZqCYaYIioUmWUbcgKscGpg8WhXrspRs");
//
//            response = npsSdk.createPaymentMethodToken(data);

        }
        catch (NpsSDK.WsdlHandlerException ex) {
            System.out.println(ex.getMessage());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy