private void OnPaySuccess(ApolloBufferBase info) { ApolloPayResponseInfo info2 = info as ApolloPayResponseInfo; if (info2.needRelogin != 0) { Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Need_Login); } else { object[] args = new object[] { info2.status, info2.rstCode, info2.realSaveNum, info2.extendInfo }; string str = string.Format("status:{0},result code:{1},real num {2}, extendinfo ={3} ", args); if (info2.status == APO_PAY_STATUS.APO_PAYSTATE_PAYSUCC) { if (this.m_bPayQQVIP) { this.m_bPayQQVIP = false; CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x1068); msg.stPkgData.stQQVIPInfoReq.bReserved = 0; Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false); Debug.Log("request qqvip"); } Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Success); } else { Singleton <BeaconHelper> .GetInstance().Event_CommonReport("Event_PayFail"); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Failed); } this.m_bPayQQVIP = false; } }
private void OnPaySuccess(ApolloBufferBase info) { ApolloPayResponseInfo apolloPayResponseInfo = info as ApolloPayResponseInfo; if (apolloPayResponseInfo.needRelogin != 0) { Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Need_Login); return; } string text = string.Format("status:{0},result code:{1},real num {2}, extendinfo ={3} ", new object[] { apolloPayResponseInfo.status, apolloPayResponseInfo.rstCode, apolloPayResponseInfo.realSaveNum, apolloPayResponseInfo.extendInfo }); if (apolloPayResponseInfo.status == APO_PAY_STATUS.APO_PAYSTATE_PAYSUCC) { if (this.m_bPayQQVIP) { this.m_bPayQQVIP = false; CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(4200u); cSPkg.stPkgData.stQQVIPInfoReq.bReserved = 0; Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false); } Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Success); } else { Singleton <BeaconHelper> .GetInstance().Event_CommonReport("Event_PayFail"); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Failed); } this.m_bPayQQVIP = false; Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.pay_type_result = apolloPayResponseInfo.rstCode.ToString(); Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.callback_result = apolloPayResponseInfo.resultInerCode.ToString(); Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.apollo_stage = apolloPayResponseInfo.needRelogin.ToString(); Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.apollo_result = apolloPayResponseInfo.rstMsg; Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.call_back_time = Time.time - Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.call_back_time; Singleton <BeaconHelper> .GetInstance().m_curBuyDianInfo.buy_quantity = apolloPayResponseInfo.realSaveNum.ToString(); Singleton <BeaconHelper> .GetInstance().ReportBuyDianEvent(); }