示例#1
0
 private void OnStatusRecivied(XsollaStatusData xsollaStatusData)
 {
     if (StatusHandler != null)
     {
         StatusHandler(xsollaStatusData);
     }
 }
示例#2
0
        public IParseble Parse(JSONNode rootNode)
        {
            JSONNode statusNode = rootNode[XsollaApiConst.R_STATUS];

            if (statusNode != null && !"null".Equals(statusNode.ToString()))
            {
                this.group            = statusNode[S_GROUP];
                this.invoice          = statusNode[S_INVOICE];
                this.statusData       = new XsollaStatusData(statusNode[S_DATA]);
                this.text             = new XsollaStatusText(statusNode[S_TEXT]);
                this.country          = statusNode["country"];
                this.returnRegion     = statusNode["return_region"];
                this.isCancelUser     = statusNode["isCancelUser"].AsBool;
                this.isPreloader      = statusNode["isPreloader"].AsBool;
                this.showEmailRequest = statusNode["showEmailRequest"].AsBool;
                this.titleClass       = statusNode["title_class"];
                this.needToCheck      = statusNode["needToCheck"].AsBool;
            }
            return(this);
        }
示例#3
0
        private void OnUserStatusExit(XsollaStatus.Group group, XsollaStatusData statusData)
        {
            Logger.Log("On user exit status screen");
            switch (group)
            {
            case XsollaStatus.Group.DONE:
                Logger.Log("Status Done");
                menuTransform.gameObject.SetActive(true);
                result.invoice = statusData.GetInvoice();
                result.status  = statusData.GetStatus();
                Logger.Log("Ivoice ID " + result.invoice);
                Logger.Log("Status " + result.status);
                Logger.Log("Bought", result.purchases);
                TransactionHelper.Clear();
                if (OkHandler != null)
                {
                    OkHandler(result);
                }
                else
                {
                    Logger.Log("Have no OkHandler");
                }
                break;

            case XsollaStatus.Group.TROUBLED:
                Logger.Log("Status TROUBLED");
                TryAgain();
                break;

            case XsollaStatus.Group.INVOICE:
            case XsollaStatus.Group.UNKNOWN:
            default:
                Logger.Log("Status in proccess");
                TryAgain();
                break;
            }
        }
示例#4
0
 public IParseble Parse(JSONNode rootNode)
 {
     JSONNode statusNode = rootNode[XsollaApiConst.R_STATUS];
     if (statusNode != null && !"null".Equals(statusNode.ToString()))
     {
         this.group = statusNode[S_GROUP];
         this.invoice = statusNode[S_INVOICE];
         this.statusData = new XsollaStatusData(statusNode[S_DATA]);
         this.text = new XsollaStatusText(statusNode[S_TEXT]);
         this.country = statusNode["country"];
         this.returnRegion = statusNode["return_region"];
         this.isCancelUser = statusNode["isCancelUser"].AsBool;
         this.isPreloader = statusNode["isPreloader"].AsBool;
         this.showEmailRequest = statusNode["showEmailRequest"].AsBool;
         this.titleClass = statusNode["title_class"];
         this.needToCheck = statusNode["needToCheck"].AsBool;
     }
     return this;
 }