namespace GameWrapper.Pay { /// /// 支付服务接口 /// public interface IPaymentService { /// /// 初始化支付服务 /// void Initialize(); /// /// 检查应用是否已初始化 /// bool IsAppInitialized(); /// /// 购买商品 /// /// 货币ID /// 数量 /// 售出物品ID /// 商店ID /// 商品ID /// 商品在商店中的位置 void BuyGoods(string currencyID, int count, int itemID, int shopID = 0, int goodsID = 0, int index = 0, bool isRefundPunish = false); /// /// 支付回调 /// /// 结果码 void OnPaymentCallback(string result); /// /// 检测用户是否直接返回至游戏 /// void OnApplicationPause(bool pauseStatus); /// /// 是否在支付流程中 /// bool IsPaying(); } /// /// 支付相关服务定位器 /// public static class PaymentServiceLocator { public static IPaymentService DebuggerPaymentService { get; set; } public static IPaymentService WxPaymentService { get; set; } public static IPaymentService AliPaymentService { get; set; } /// /// B站支付服务 /// public static IPaymentService BiliPaymentService { get; set; } /// /// iOS支付服务 /// public static IPaymentService ApplePaymentService { get; set; } /// /// Harmony支付服务 /// public static IPaymentService HarmonyPaymentService { get; set; } } }