Ejemplo n.º 1
0
 //register url
 private static void RegisterUrL(RegisterURL url, string bearer)
 {
     url.ConfirmationURL = "";
     url.ResponseType    = "Cancelled";
     url.Shortcode       = "600753";
     url.ValidationURL   = "";
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("DR. Stickman Enterprise...!");

            HTTP_REQUEST requests = new HTTP_REQUEST();

            string basic = Authentication.Auth();

            Console.WriteLine("we on");
            string      bearertoken = requests.SendRequest(basic);
            string      certificate = @"C:\Users\derob\Desktop\cert.cer";
            MpesaModel  b           = new MpesaModel();
            RegisterURL url         = new RegisterURL();

            NewMethod(b);
            //call the mpesa api Lipa online no need for Validation Url since money to be credited is hard coded.
            LipaMpesa.STKPush(b, bearertoken);
            //breakpoint halt
            var date = DateTime.Now.ToString("yyyyMMddHHmmss");

            //var h = Security.encryptInitiatorPassword(certificate, "der");
        }