/// <summary> ///向sdk发送消息 /// </summary> public void sendMessageToSDK() { object[] parameter = new object[] { }; AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.sendMessageToSDK.ToString(), parameter, singlepayClassPath); }
/// <summary> /// 支付 /// </summary> public void pay() { object[] parameter = new object[] { AllSdkPay.instance().getMainCotext(), orderInfo }; AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.pay.ToString(), parameter, singlepayClassPath); }
/// <summary> /// 初始化 /// </summary> public void init() { object[] parameter = new object[] { AllSdkPay.instance().getMainCotext(), appId, appKey, isSandbox, wxId }; AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.init.ToString(), parameter, singlepayClassPath); }
/// <summary> /// 支付 /// </summary> public void pay() { object[] parameter = new object[] { channelType, desc, price, billNum }; AllSdkPay.instance().callAndroidSdkStaticFunction(SDKFunctionNameEnum.pay.ToString(), parameter, singlepayClassPath); }
/// <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); }