示例#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);
        }