예제 #1
0
        /// <summary>
        /// 通知购买结果 客户端商品数据添加成功后发送此消息给服务器
        /// </summary>
        /// <param name="dbtOrderNo"></param>
        /// <param name="cpResultStatus">0-未发货 1-发货成功 2-发货失败</param>
        /// <param name="cpResultMsg"></param>
        public void NotifyProductResult(string dbtOrderNo, string cpResultStatus, string cpResultMsg)
        {
#if UNITY_IOS
            IAPIOS.NotifyProductResult(dbtOrderNo, cpResultStatus, cpResultMsg);
#endif
#if UNITY_ANDROID && !UNITY_EDITOR
            IAPAndroid.NotifyProductResult(dbtOrderNo, cpResultStatus, cpResultMsg);
#endif
        }
예제 #2
0
        /// <summary>
        /// 购买商品
        /// </summary>
        /// <param name="prodId">商品ID</param>
        /// <param name="prodName">商品名称</param>
        /// <param name="body">商品描述信息</param>
        /// <param name="cpOrderNo">CP端订单号</param>
        /// <param name="amount">金额 元 小数点两位</param>
        public void BuyProduct(string prodId, string prodName, string body, string cpOrderNo, float amount)
        {
#if UNITY_IOS
            IAPIOS.BuyProduct(prodId, prodName, body, cpOrderNo, amount);
#endif
#if UNITY_ANDROID && !UNITY_EDITOR
            IAPAndroid.BuyProduct(prodId, prodName, body, cpOrderNo, amount);
#endif
        }