void Awake()
 {
     statusPower       = GameObject.Find("PowerValueText").GetComponent <StatusPower>();
     statusDefence     = GameObject.Find("DefenceValueText").GetComponent <StatusDefence>();
     statusSpeed       = GameObject.Find("SpeedValueText").GetComponent <StatusSpeed>();
     statusHP          = GameObject.Find("HPValueText").GetComponent <StatusHP>();
     statusMP          = GameObject.Find("MPValueText").GetComponent <StatusMP>();
     statusLevel       = GameObject.Find("LevelValueText").GetComponent <StatusLevel>();
     statusPlayerName  = GameObject.Find("PlayerNameText").GetComponent <StatusPlayerName>();
     statusPlayerImage = GameObject.Find("PlayerImage").GetComponent <StatusPlayerImage>();
     command04Display  = GameObject.Find("BackGround04").GetComponent <Command04Display>();
 }
        public ActionResult CheckoutStatus(string collection_id, string collection_status, string preference_id, string external_reference, string payment_type, string merchant_order_id)
        {
            string mpRefID      = Request["preference_id"];
            string status       = Request["collection_status"];
            string collectionID = Request["collection_id"];

            if (string.IsNullOrWhiteSpace(mpRefID) || string.IsNullOrWhiteSpace(status) || string.IsNullOrWhiteSpace(collectionID))
            {
                return(Redirect("/"));
            }
            else
            {
                string order      = mpRefID;
                string collection = collectionID;
                string stado      = status;

                string _IdServi = User.Identity.GetUserId();

                //NotifyUserOrderStatus();
                StatusMP statuscode = new StatusMP()
                {
                    Status         = stado,
                    MPCollectionID = collection,
                    MPRefID        = order
                };

                if (stado == "approved")
                {
                    var _pago = db.Pagos.Where(x => x.MPRefID == order).FirstOrDefault();
                    _pago.Estado = "Aprobado";
                    _CuentaCorriente._generarCredito(_IdServi, mpRefID, _pago.Importe);

                    db.Entry(_pago).State = System.Data.Entity.EntityState.Modified;
                }

                return(View("../CuentaCorriente/Status", statuscode));
            }
        }
Exemple #3
0
 void Awake()
 {
     statusHP = GameObject.Find("HPValueText").GetComponent <StatusHP>();
     statusMP = GameObject.Find("MPValueText").GetComponent <StatusMP>();
 }