public static void SetBuyResendMessage(StoreBuyGoods2Server msg, bool noSend)
 {
     ResendMessageManager.AddResendMessage(msg, typeof(StoreBuyGoods2Client).Name, (resMsg) =>
     {
         StoreBuyGoods2Client e = (StoreBuyGoods2Client)resMsg;
         Debug.LogWarning("NetworkVerificationImplement   StoreBuyGoods2Client=========" + e.id);
         PaymentVerificationManager.OnVerificationResult(e.code, e.id, e.repeatReceipt, e.receipt);
     }, noSend);
 }
 /// <summary>
 /// 存储发送的消息
 /// </summary>
 /// <param name="receipt"></param>
 /// <param name="msg"></param>
 static private void SaveGoodsPayInfo(string receipt, StoreBuyGoods2Server msg)
 {
     if (goodsPayInfo.ContainsKey(receipt))
     {
         Debug.LogError("Repeat GoodsPayInfo:" + receipt);
     }
     else
     {
         goodsPayInfo.Add(receipt, msg);
     }
 }
    public void CheckRecipe(OnPayInfo info)
    {
        StoreBuyGoods2Server msg = new StoreBuyGoods2Server();

        msg.storeName = info.storeName;
        msg.receipt   = info.receipt;
        msg.id        = info.goodsId;
        SetBuyResendMessage(msg, false);
        // JsonMessageProcessingController.SendMessage(msg);
        Debug.Log(" 当前游戏服务器验证");
    }
Beispiel #4
0
    /// <summary>
    /// 重发购买
    /// </summary>
    public void ReSendPay()
    {
        Debug.LogWarning("重发支付" + localPayInfo.payInfos.Count);
        GlobalEvent.AddTypeEvent <StoreBuyGoods2Client>(OnStoreBuyGood);

        for (int i = 0; i < localPayInfo.payInfos.Count; i++)
        {
            Debug.LogWarning("重发购买+" + localPayInfo.payInfos[i].goodsId + "==receipt==" + localPayInfo.payInfos[i].receipt);
            //发送消息
            StoreBuyGoods2Server.SenBuyMsg(localPayInfo.payInfos[i].goodsId, 1, localPayInfo.payInfos[i].storeName, localPayInfo.payInfos[i].receipt);
        }
    }
    public static void SetBuyResendMessage(StoreBuyGoods2Server msg, bool noSend)
    {
        SaveGoodsPayInfo(msg.receipt, msg);
        ResendMessageManager.AddResendMessage(msg, typeof(StoreBuyGoods2Client).Name, (resMsg) =>
        {
            StoreBuyGoods2Client e = (StoreBuyGoods2Client)resMsg;

            StoreName storeName = GetGoodsPayInfo(e.receipt).storeName;

            Debug.LogWarning("NetworkVerificationImplement   StoreBuyGoods2Client=========" + e.id + " storeName:" + storeName);

            PaymentVerificationManager.OnVerificationResult(e.code, e.id, e.repeatReceipt, e.receipt, null, storeName);
        }, noSend);
    }
    public void CheckRecipe(OnPayInfo info)
    {
        StoreBuyGoods2Server msg = new StoreBuyGoods2Server();

        msg.storeName = info.storeName;
        msg.receipt   = info.receipt;
        msg.id        = info.goodsId;
        ResendMessageManager.AddResendMessage(msg, typeof(StoreBuyGoods2Client).Name, (resMsg) =>
        {
            StoreBuyGoods2Client e = (StoreBuyGoods2Client)resMsg;
            PaymentVerificationManager.OnVerificationResult(e.code == 0, e.id, e.repeatReceipt, e.receipt);
        });
        // JsonMessageProcessingController.SendMessage(msg);
        Debug.Log(" 当前游戏服务器验证");
    }
Beispiel #7
0
    /// <summary>
    /// 重发购买
    /// </summary>
    public void ReSendPay()
    {
        Debug.LogWarning("重发支付" + localPayInfo.payInfos.Count);
        GlobalEvent.AddTypeEvent <StoreBuyGoods2Client>(OnStoreBuyGood);

        for (int i = 0; i < localPayInfo.payInfos.Count; i++)
        {
            OnPayInfo payInfo = localPayInfo.payInfos[i];
            if (string.IsNullOrEmpty(payInfo.userID) || payInfo.userID == SDKManager.UserID)
            {
                Debug.LogWarning("重发购买+" + payInfo.goodsId + "==receipt==" + payInfo.receipt);
                //发送消息
                StoreBuyGoods2Server.SenBuyMsg(payInfo.goodsId, 1, localPayInfo.payInfos[i].storeName, payInfo.receipt);
            }
        }
    }
 public static void SetBuyResendMessage(StoreBuyGoods2Server msg, bool noSend)
 {
     SaveGoodsPayInfo(msg.receipt, msg);
     ResendMessageManager.AddResendMessage(msg, typeof(StoreBuyGoods2Client).Name, noSend);
 }