Ejemplo n.º 1
0
 private void HandleCheckPayResultCmd(CommandParser.Command param)
 {
     string param2 = param.GetParam(1);
     MC2S_CheckPayResult mC2S_CheckPayResult = new MC2S_CheckPayResult();
     mC2S_CheckPayResult.OrderID = param2;
     Globals.Instance.CliSession.Send(258, mC2S_CheckPayResult);
 }
Ejemplo n.º 2
0
 private void OnSDKOrderCheck(int code, JsonData data)
 {
     try
     {
         NtOrderInfo ntOrderInfo = NtOrderInfo.FromJsonData(data);
         if (ntOrderInfo.orderStatus == OrderStatus.OS_SDK_CHECK_OK)
         {
             GameAnalytics.OnChargeSuccess(ntOrderInfo.orderId);
             if (SdkU3d.getChannel() == "kuaifa")
             {
                 Globals.Instance.GameMgr.UpLoadUserInfo("3");
             }
         }
         if (this.isAppStore && ntOrderInfo.orderStatus != OrderStatus.OS_SDK_CHECK_OK && string.IsNullOrEmpty(ntOrderInfo.transactionReceipt))
         {
             SdkU3d.removeCheckedOrders(ntOrderInfo.orderId);
             if (!string.IsNullOrEmpty(ntOrderInfo.orderErrReason))
             {
                 GameUIManager.mInstance.ShowMessageTip(ntOrderInfo.orderErrReason, 0f, 0f);
             }
         }
         else
         {
             MC2S_CheckPayResult mC2S_CheckPayResult = new MC2S_CheckPayResult();
             mC2S_CheckPayResult.OrderID = ntOrderInfo.orderId;
             mC2S_CheckPayResult.ReceiptData = ntOrderInfo.transactionReceipt;
             mC2S_CheckPayResult.OrderStatus = (int)ntOrderInfo.orderStatus;
             mC2S_CheckPayResult.Currency = ntOrderInfo.userPriceLocaleId;
             Globals.Instance.CliSession.Send(258, mC2S_CheckPayResult);
         }
     }
     catch (Exception ex)
     {
         GameUIManager.mInstance.ShowMessageTip(string.Format("Parse Error, {0}", ex.Message), 0f, 0f);
     }
 }