public static void AddPendingOrderId(string orderId, string platformstr, string changeOrder, string changeReceipt) { bool isHas = false; for (int i = 0; i < sPendingOrderIds.Count; i++) { if (sPendingOrderIds[i].Equals(orderId)) { isHas = true; break; } } if (!isHas) { sPendingOrderIds.Add(orderId); PendingOrderInfo aPendingOrderInfo = new PendingOrderInfo(); aPendingOrderInfo.changeOrder = changeOrder; aPendingOrderInfo.platform = platformstr; aPendingOrderInfo.changeReceipt = changeReceipt; sPendingOrderIdsInfo.Add(orderId, aPendingOrderInfo); // Record this order ShopDataManager.FlushPendingOrderId(); } }
public static void RemovePendingOrderId(string orderId) { if (!sPendingOrderIds.Remove(orderId)) { Debug.Log("[GUIVipStore]: Remove a invalid order id..."); } if (!sPendingOrderIdsInfo.Remove(orderId)) { Debug.Log("[GUIVipStore]: Remove a invalid order id..."); } // Record this order ShopDataManager.FlushPendingOrderId(); }