예제 #1
0
        /// <summary>
        /// 支付
        /// </summary>
        /// <param name="pay"></param>
        public void sdkPay(IPay pay, SinglePaySuccessCallback msinglePaySuccess = null)
        {
            this.mSinglePaySuccessCallback = msinglePaySuccess;

#if UNITY_IPHONE
            pay.registerMessageReceiver(this.gameObject.name);
#endif
            pay.pay();
        }
예제 #2
0
 //-------------------------------------------------------------------------
 public static void pay(string buy_item_sku, string charge_data, _ePayType pay_type)
 {
     if (pay_type == _ePayType.AppStore)
     {
         OpenIAB.purchaseProduct(buy_item_sku);
     }
     else
     {
         mIPay.pay(charge_data, (int)pay_type);
     }
 }
예제 #3
0
    ////-------------------------------------------------------------------------
    //public static void payWithChargeData(string buy_item_sku, string charge_data, _ePayType pay_type)
    //{
    //    if (pay_type == _ePayType.iap)
    //    {
    //        OpenIAB.purchaseProduct(buy_item_sku);
    //    }
    //    else
    //    {
    //        mIPay.payWithChargeData(charge_data, (int)pay_type);
    //    }
    //}

    //-------------------------------------------------------------------------
    public static void pay(string buy_item_sku, string bill_title, _ePayType pay_type,
                           int bill_totalfee, string bill_num, string buy_id, string url_scheme)
    {
        if (pay_type == _ePayType.iap)
        {
            OpenIAB.purchaseProduct(buy_item_sku);
        }
        else
        {
            mIPay.pay(bill_title, (int)pay_type, bill_totalfee, bill_num, buy_id, url_scheme);
        }
    }
예제 #4
0
파일: Pay.cs 프로젝트: cyecp/GF.UnityNative
    //-------------------------------------------------------------------------
    public static void pay(string buy_item_key, string charge_data, _ePayType pay_type)
    {
        if (pay_type == _ePayType.AppStore)
        {
            //OpenIAB.purchaseProduct(buy_item_key);

            if (mInventory != null && mInventory.HasPurchase(buy_item_key))
            {
                OpenIAB.consumeProduct(mInventory.GetPurchase(buy_item_key));
            }
        }
        else
        {
            mIPay.pay(charge_data, (int)pay_type);
        }
    }