public void Init(ADJPConfig config)
        {
            string appToken    = config.appToken;
            string environment = config.environment.LowercaseToString();

            int logLevel = ADJPUtils.ConvertLogLevel(config.logLevel);

            _AdjustPurchaseInit(appToken, environment, sdkPrefix, logLevel);
        }
        public ADJPVerificationInfo(string jsonString)
        {
            var jsonNode = JSON.Parse(jsonString);

            if (jsonNode == null)
            {
                return;
            }

            Message = ADJPUtils.GetJsonString(jsonNode, ADJPUtils.KeyMessage);

            string stringStatusCode        = ADJPUtils.GetJsonString(jsonNode, ADJPUtils.KeyStatusCode);
            string stringVerificationState = ADJPUtils.GetJsonString(jsonNode, ADJPUtils.KeyVerificationState);

            StatusCode        = Int32.Parse(stringStatusCode);
            VerificationState = ADJPUtils.StringToVerificationState(stringVerificationState);
        }
Ejemplo n.º 3
0
            public void onVerificationFinished(AndroidJavaObject verificationInfo)
            {
                ADJPVerificationInfo purchaseVerificationInfo = new ADJPVerificationInfo();

                purchaseVerificationInfo.Message = verificationInfo.Get <string>(ADJPUtils.KeyMessage);

                AndroidJavaObject ajoStatusCode = verificationInfo.Get <AndroidJavaObject>(ADJPUtils.KeyStatusCode);

                purchaseVerificationInfo.StatusCode = ajoStatusCode.Call <int>("intValue");

                AndroidJavaObject ajoVerificationState  = verificationInfo.Get <AndroidJavaObject>(ADJPUtils.KeyVerificationState);
                string            verificationStateName = ajoVerificationState.Call <string>("name");

                purchaseVerificationInfo.VerificationState = ADJPUtils.StringToVerificationState(verificationStateName);

                if (callback != null)
                {
                    callback(purchaseVerificationInfo);
                }
            }