public ActionResult ChargeDemo(ChargeDemo model)
        {
            Conekta.ApiKey = "[YOUR_PRIVATE_KEY]";
            JObject valid_payment_method = JObject.Parse("{'description':'Stogies'," +
                                                         "'reference_id':'9839-wolf_pack'," +
                                                         "'amount':20000," +
                                                         "'currency':'MXN'," +
                                                         "'card':''}");

            if (ModelState.IsValid)
            {
                // set the card token
                valid_payment_method["card"] = model.card_token;
            }

            try
            {
                Charge charge = Charge.create(valid_payment_method);
                ViewBag.Result = charge.ToString();
            }
            catch (Error e)
            {
                ViewBag.Result = e.ToString();
            }
            return(View(model));
        }
        public ActionResult ChargeDemo(ChargeDemo model)
        {
            Conekta.ApiKey = "[YOUR_PRIVATE_KEY]";
            JObject valid_payment_method = JObject.Parse("{'description':'Stogies'," +
                                                         "'reference_id':'9839-wolf_pack'," +
                                                         "'amount':20000," +
                                                         "'currency':'MXN'," +
                                                         "'card':''}");
            if (ModelState.IsValid)
            {
                // set the card token
                valid_payment_method["card"] = model.card_token;
            }

            try
            {
                Charge charge = Charge.create(valid_payment_method);
                ViewBag.Result = charge.ToString();
            }
            catch (Error e)
            {
                ViewBag.Result = e.ToString();
            }
            return View(model);
        }