private string PaymentRequestHash(PayRequestUMoney data)
        {
            byte[] hash;
            string beforeHashPayload = _config["PayuMoney:Key"] + "|" + data.TransactionId + "|" + data.Amount + "|" + data.ProductInfo + "|" + data.FirstName + "|" + data.EmailId + "|" + data.Mobile + "|||||" + data.Udf5 + "||||||" + _config["PayuMoney:Salt"];
            var    datab             = Encoding.UTF8.GetBytes(beforeHashPayload);

            using (SHA512 shaM = new SHA512Managed())
            {
                hash = shaM.ComputeHash(datab);
            }


            return(GetStringFromHash(hash));
        }
        public ObjectResult Post(PayRequestUMoney model)
        {
            string key  = _config["PayuMoney:Key"];
            string salt = _config["PayuMoney:Salt"];
            //string redirect_url = "http://localhost:44316/redirect";
            string hash = PaymentRequestHash(model);

            _context.PaymentHistories.Add(new PayUMoneyDb {
                Amount        = model.Amount,
                EmailId       = model.EmailId,
                FirstName     = model.FirstName,
                LastName      = model.LastName,
                ProductInfo   = model.ProductInfo,
                TransactionId = model.TransactionId,
                Mobile        = model.Mobile,
                Udf5          = model.Udf5
            });
            return(new ObjectResult(new { model, hash, key, salt }));
        }