public void getProductDetails() { var inapp_products = new string[] { inapp_pId1, inapp_pId2, inapp_pId3 }; var auto_products = new string[] { auto_pId1 }; Onestore_IapCallManager.getProductDetails(inapp_products, inapp_type); Onestore_IapCallManager.getProductDetails(auto_products, auto_type); }
public void consume() { string inapp_json = PlayerPrefs.GetString(inapp_pId1); if (inapp_json.Length > 0) { Onestore_IapCallManager.consume(inapp_json); } else { AndroidNative.showMessage("error", "no data to consume", "ok"); } }
public void Purchase(int index) { if (storeType == StoreType.GoogleStore) { if (storeController == null) { Debug.Log("구매 실패 : 결제 기능 초기화 실패"); } else { storeController.InitiatePurchase(sProductIds[index]); } } else { Onestore_IapCallManager.buyProduct(sProductIds[index], "inapp", "this is test payload!"); } }
public void InitStore() { if (storeController == null) { if (storeType == StoreType.GoogleStore) { ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); builder.AddProduct(sProductIds[0], ProductType.Consumable, new IDs { { sProductIds[0], GooglePlay.Name } }); builder.AddProduct(sProductIds[1], ProductType.Consumable, new IDs { { sProductIds[1], GooglePlay.Name } }); UnityPurchasing.Initialize(this, builder); } else if (storeType == StoreType.OneStore) { string base64EncodedPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRrFYKKco7ZhEDiS+/xsOih0juoHpwRzTr3gwBKCO2N3jgQcg6iAuI4I9R7HvslBfPOFYTrnD6aT5XrnR1XMxSGMLKUOtFyAD74BUFPonMcGlO12imMhUaaUlxuk+DnkPo1KsNjDamvyO2/oYA8dhkkACYWR2zdU34F48U4NWDSQIDAQAB"; Onestore_IapCallManager.connectService(base64EncodedPublicKey); } } }
public void cancelAutoItem() { string auto_json = PlayerPrefs.GetString(auto_pId1); PurchaseData response = JsonUtility.FromJson <PurchaseData> (auto_json); if (auto_json.Length > 0) { string command = ""; if (response.recurringState == 0) { command = "cancel"; } else if (response.recurringState == 1) { command = "reactivate"; } Onestore_IapCallManager.manageRecurringAuto(auto_json, command); } else { AndroidNative.showMessage("Warning!!", "no data for manageRecurringAuto", "ok"); } }
public void buyProductAuto() { Onestore_IapCallManager.buyProduct(auto_pId1, auto_type, devPayload); }
public void buyProductInapp() { Onestore_IapCallManager.buyProduct(inapp_pId1, inapp_type, devPayload); }
public void getPurchases() { Onestore_IapCallManager.getPurchases(); }
public void isBillingSupported() { Onestore_IapCallManager.isBillingSupported(); }
public void connectService() { Debug.Log("IapUi connectService"); base64EncodedPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRrFYKKco7ZhEDiS+/xsOih0juoHpwRzTr3gwBKCO2N3jgQcg6iAuI4I9R7HvslBfPOFYTrnD6aT5XrnR1XMxSGMLKUOtFyAD74BUFPonMcGlO12imMhUaaUlxuk+DnkPo1KsNjDamvyO2/oYA8dhkkACYWR2zdU34F48U4NWDSQIDAQAB"; Onestore_IapCallManager.connectService(base64EncodedPublicKey); }
public void destroy() { Onestore_IapCallManager.destroy(); }
public void login() { Onestore_IapCallManager.login(); }