//------------------------------------------------------------------------- private void consumePurchaseSucceededEvent(Purchase purchase) { Debug.Log("consumePurchaseSucceededEvent: " + purchase); mMsg = "CONSUMED Succeeded: " + purchase.ToString(); PayReceiver.instance().PayResult(_ePayOptionType.ConsumeProduct, true, purchase); }
//------------------------------------------------------------------------- private void consumePurchaseFailedEvent(string error) { Debug.Log("consumePurchaseFailedEvent: " + error); mMsg = "Consume Failed: " + error; PayReceiver.instance().PayResult(_ePayOptionType.ConsumeProduct, false, error); }
//------------------------------------------------------------------------- private void purchaseFailedEvent(int errorCode, string errorMessage) { Debug.Log("purchaseFailedEvent: " + errorMessage); mMsg = "Purchase Failed: " + errorMessage; PayReceiver.instance().PayResult(_ePayOptionType.PurchaseProduct, false, errorMessage); }
//------------------------------------------------------------------------- private void purchaseSucceededEvent(Purchase purchase) { Debug.Log("purchaseSucceededEvent: " + purchase); mMsg = "PURCHASED Succeeded:" + purchase.ToString(); PayReceiver.instance().PayResult(_ePayOptionType.PurchaseProduct, true, purchase); }
//------------------------------------------------------------------------- private void queryInventoryFailedEvent(string error) { Debug.Log("queryInventoryFailedEvent Failed: " + error); mMsg = error; PayReceiver.instance().PayResult(_ePayOptionType.QueryInventory, false, mMsg); }
//------------------------------------------------------------------------- private void queryInventorySucceededEvent(Inventory inventory) { Debug.Log("queryInventorySucceededEvent: " + inventory); if (inventory != null) { mMsg = inventory.ToString(); mInventory = inventory; } PayReceiver.instance().PayResult(_ePayOptionType.QueryInventory, true, inventory); }
//------------------------------------------------------------------------- void _initNativeMsgReceiverListener() { var native_receiver = NativeReceiver.instance(); native_receiver.TakePhotoReceiverListener = this; native_receiver.AudioControlListener = this; var speech_receiver = SpeechReceiver.instance(); speech_receiver.SpeechListener = this; var pay_receiver = PayReceiver.instance(); pay_receiver.PayReceiverListener = this; }
//--------------------------------------------------------------------- void _initNativeMsgReceiverListener() { var native_receiver = NativeReceiver.Instance(); native_receiver.TakePhotoReceiverListener = this; native_receiver.AudioControlListener = this; var pay_receiver = PayReceiver.instance(); pay_receiver.PayReceiverListener = this; var thirdparty_login_receiver = ThirdPartyLoginReceiver.instance(); thirdparty_login_receiver.ThirdPartyLoginReceiverListener = this; //#if (UNITY_IPHONE || UNITY_ANDROID) && !UNITY_EDITOR // ThirdPartyLogin.Instantce().initLogin(CasinosContext.Instance.Config.WeChatAppId); //#endif //PushReceiver.instance(); //OpenInstallReceiver.instance(); }