Exemple #1
0
        private static void RegisterDSC(string gstin, string pan)
        {
            GSTNAuthClient client  = GetAuth(gstin);
            GSTNDSClient   client2 = new GSTNDSClient(client, gstin);

            var cert   = DSCUtils.getCertificate();
            var sign   = Convert.ToBase64String(DSCUtils.SignCms(pan, cert));
            var result = client2.RegisterDSC(pan, sign);
        }
Exemple #2
0
        private static void RegisterDSC(string gstin, string gsp, string userid, string pan)
        {
            IGSTNAuthProvider client  = GetAuth(gstin, gsp, userid);
            GSTNDSClient      client2 = new GSTNDSClient(client, gstin);

            var cert = DSCUtils.getCertificate();

            byte[] data   = Encoding.UTF8.GetBytes(pan);
            var    sign   = Convert.ToBase64String(DSCUtils.SignCms(data, cert));
            var    result = client2.RegisterDSC(pan, sign);
        }
Exemple #3
0
        private static string RegisterDSC(string gstin, string userid, string pan, string otp)
        {
            Integrated.API.GSTN.GSTNAuthClient client  = GetAuth(gstin, userid, otp);
            Integrated.API.GSTN.GSTNDSClient   client2 = new GSTNDSClient(client, gstin);

            var cert = DSCUtils.getCertificate();

            byte[] data   = Encoding.UTF8.GetBytes(pan);
            var    sign   = Convert.ToBase64String(DSCUtils.SignCms(data, cert));
            var    result = client2.RegisterDSC(pan, sign);

            return(result.Message);
        }