Exemplo n.º 1
0
 /// <summary>
 ///向sdk发送消息
 /// </summary>
 public void sendMessageToSDK()
 {
     object[] parameter = new object[]
     {
     };
     AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.sendMessageToSDK.ToString(), parameter, singlepayClassPath);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 支付
 /// </summary>
 public void pay()
 {
     object[] parameter = new object[]
     {
         AllSdkPay.instance().getMainCotext(), orderInfo
     };
     AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.pay.ToString(), parameter, singlepayClassPath);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void init()
 {
     object[] parameter = new object[]
     {
         AllSdkPay.instance().getMainCotext(), appId, appKey, isSandbox, wxId
     };
     AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.init.ToString(), parameter, singlepayClassPath);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 支付
 /// </summary>
 public void pay()
 {
     object[] parameter = new object[]
     {
         channelType, desc, price, billNum
     };
     AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.pay.ToString(), parameter, singlepayClassPath);
 }
Exemplo n.º 5
0
        /// <summary>
        /// 获取平台控制单例
        /// </summary>
        /// <returns></returns>
        public static AllSdkPay instance()
        {
            //_instance = GameObject.FindObjectOfType(typeof(AllSdkPay)) as AllSdkPay;
            if (_instance == null)
            {
                var obj = new GameObject("AllSdkPay");
                _instance = obj.AddComponent <AllSdkPay>();
                Object.DontDestroyOnLoad(_instance.gameObject);
            }

            return(_instance);
        }