c# - 应用内购买不使用 Google Play 服务
问题描述
我计划将我的游戏上传到我的个人网站,并且不想使用 Google Play 或其他托管网站。在托管站点之外,我完全没有经验。我知道如何使用 GooglePlay 为应用内购买创建 itemID,但是,如果没有这些,我将如何进行交易?我找不到有关要采取的步骤的任何信息。
我需要知道的:
- 如何将交易链接到我的帐户(PayPal 或支票)。
- 如何相应地奖励玩家(我更喜欢使用单例模式)。
我的设置:
- 我有一个带有按钮的暂停菜单来打开商店菜单。
- 我的物品显示在每个物品旁边都有一个“购买”按钮。
“购买”按钮具有与每个公共静态函数相关的 OnClickEvent()。
// public class InAppPurchase public static InAppPurchase inst; private void Awake() { if(instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }// End of Awake() public static void BuyAdFreeVersion() { // Need to know how to charge the client here // Don't know any code that doesn't require GooglePlay ID // How does this work exactly? } // public class InAppButtons public void RemoveAdsButton() // This will be added to the button itself { InAppPurchase.inst.BuyAdFreeVersion(); }
解决方案
推荐阅读
- r - 无法在 R 版本 4.0.5 中安装 ggtree
- python - 从 FastAPI 的 fileResponse 读取响应?
- javascript - 当源来自外国服务器时获取 Iframe innerHTML
- javascript - javascript分块文件上传的巨大内存消耗(应该是内存高效的)
- javascript - 具有动态限制的分页问题
- python - Django 模型:创建模型条目的变体并与原始条目进行比较
- javascript - 显示在 pdf 文件中的 javascript blob 名称
- python - 根据最近的点值给点赋值
- reactjs - 如何在类组件的函数中使用道具?
- python - 为什么我的日志记录模块的记录器级别设置为 NOTSET,而我之前已为其分配了一个级别?