/// <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(); }
//------------------------------------------------------------------------- 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); } }
////------------------------------------------------------------------------- //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); } }
//------------------------------------------------------------------------- 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); } }