예제 #1
0
        public void callFuncWithParam(string functionName, AnySDKParam param, string pluginId = "")
        {
            List <AnySDKParam> list = new List <AnySDKParam>();

            list.Add(param);
            AnySDKIAP.AnySDKIAP_nativeCallFuncWithParam(functionName, list.ToArray(), list.Count, pluginId);
        }
예제 #2
0
 public static AnySDKIAP getInstance()
 {
     if( null == _instance ) {
         _instance = new AnySDKIAP();
     }
     return _instance;
 }
예제 #3
0
 public bool callBoolFuncWithParam(string functionName, List <AnySDKParam> param = null, string pluginId = "")
 {
     if (param == null)
     {
         return(AnySDKIAP.AnySDKIAP_nativeCallBoolFuncWithParam(functionName, null, 0, pluginId));
     }
     return(AnySDKIAP.AnySDKIAP_nativeCallBoolFuncWithParam(functionName, param.ToArray(), param.Count, pluginId));
 }
예제 #4
0
 private static AnySDKIAP instance()
 {
     if (null == _instance)
     {
         _instance = new AnySDKIAP();
     }
     return(_instance);
 }
예제 #5
0
 public static AnySDKIAP getInstance()
 {
     if (AnySDKIAP._instance == null)
     {
         AnySDKIAP._instance = new AnySDKIAP();
     }
     return(AnySDKIAP._instance);
 }
예제 #6
0
 public static AnySDKIAP getInstance()
 {
     if (null == _instance)
     {
         _instance = new AnySDKIAP();
     }
     return(_instance);
 }
예제 #7
0
        public string getSDKVersion(string pluginId = "")
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            AnySDKIAP.AnySDKIAP_nativeGetSDKVersion(stringBuilder, pluginId);
            return(stringBuilder.ToString());
        }
예제 #8
0
        public List <string> getPluginId()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            AnySDKIAP.AnySDKIAP_nativeGetPluginId(stringBuilder);
            return(AnySDKUtil.StringToList(stringBuilder.ToString()));
        }
예제 #9
0
 public void callFuncWithParam(string functionName, List <AnySDKParam> param = null, string pluginId = "")
 {
     if (param == null)
     {
         AnySDKIAP.AnySDKIAP_nativeCallFuncWithParam(functionName, null, 0, pluginId);
     }
     else
     {
         AnySDKIAP.AnySDKIAP_nativeCallFuncWithParam(functionName, param.ToArray(), param.Count, pluginId);
     }
 }
예제 #10
0
        public string callStringFuncWithParam(string functionName, AnySDKParam param, string pluginId = "")
        {
            List <AnySDKParam> list = new List <AnySDKParam>();

            list.Add(param);
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            AnySDKIAP.AnySDKIAP_nativeCallStringFuncWithParam(functionName, list.ToArray(), list.Count, stringBuilder, pluginId);
            return(stringBuilder.ToString());
        }
예제 #11
0
        /**
         * 支付
         */
        void payForProduct()
        {
            Dictionary <string, string> products = new Dictionary <string, string>();

            products["Product_Price"] = "1";
            products["Product_Id"]    = "2";
            products["Product_Name"]  = "豌豆荚测试a1";
            products["Server_Id"]     = "13";
            products["Product_Count"] = "1";
            products["Role_Id"]       = "1";
            products["Role_Name"]     = "1";
            products["Role_Grade"]    = "1";
            products["Role_Balance"]  = "1";
            AnySDKIAP.getInstance().payForProduct(products);
        }
예제 #12
0
        public string callStringFuncWithParam(string functionName, List <AnySDKParam> param = null, string pluginId = "")
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Capacity = 1024;
            if (param == null)
            {
                AnySDKIAP.AnySDKIAP_nativeCallStringFuncWithParam(functionName, null, 0, stringBuilder, pluginId);
            }
            else
            {
                AnySDKIAP.AnySDKIAP_nativeCallStringFuncWithParam(functionName, param.ToArray(), param.Count, stringBuilder, pluginId);
            }
            return(stringBuilder.ToString());
        }
예제 #13
0
 public void resetPayState()
 {
     AnySDKIAP.AnySDKIAP_nativeResetPayState();
 }
예제 #14
0
 void Start()
 {
     _instance = AnySDKIAP.getInstance();
     _instance.setListener(this, "IAPExternalCall");
 }
예제 #15
0
        /**
         * 获取订单号
         */
        void getOrderId()
        {
            string orderId = AnySDKIAP.getInstance().getOrderId();

            Debug.Log("AnySDK@ getOrder id " + orderId);
        }
예제 #16
0
 public void setDebugMode(bool bDebug)
 {
     AnySDKIAP.AnySDKIAP_nativeSetDebugMode(bDebug);
 }
예제 #17
0
 public bool isFunctionSupported(string functionName, string pluginId = "")
 {
     return(AnySDKIAP.AnySDKIAP_nativeIsFunctionSupported(functionName, pluginId));
 }
예제 #18
0
        public void payForProduct(Dictionary <string, string> info, string pluginId = "")
        {
            string info2 = AnySDKUtil.dictionaryToString(info);

            AnySDKIAP.AnySDKIAP_nativePayForProduct(info2, pluginId);
        }