Exemplo n.º 1
0
        public ResponseModel RetrievePaymentData(RequestModel objRequest, string transData)
        {
            ResponseModel   objResponse = new ResponseModel();
            KnetInitializer _objKNET    = KnetInitializer.GetInstance(objRequest.KNETConfig);

            com.fss.plugin.iPayPipe pipe = new com.fss.plugin.iPayPipe();
            string trandata = transData ?? string.Empty;

            pipe.setResourcePath(_objKNET.ResourcePath);
            pipe.setKeystorePath(_objKNET.ResourcePath);
            pipe.setAlias(_objKNET.AliasName);
            int parseResult = pipe.parseEncryptedRequest(trandata);

            objResponse.PaymentId    = pipe.getPaymentId();
            objResponse.Result       = pipe.getResult();
            objResponse.Date         = pipe.getDate();
            objResponse.TransID      = pipe.getTransId();
            objResponse.Auth         = pipe.getAuth();
            objResponse.Reference    = pipe.getRef();
            objResponse.PayReference = pipe.getTrackId();
            objResponse.UDF1         = pipe.getUdf1();
            objResponse.UDF2         = pipe.getUdf2();
            objResponse.UDF3         = pipe.getUdf3();
            objResponse.UDF4         = pipe.getUdf4();
            objResponse.UDF5         = pipe.getUdf5();
            objResponse.ErrorMessage = pipe.getError();

            return(objResponse);
        }