using System; using ET; using UnityEngine; using GFGGame.Launcher; namespace GFGGame { public class AliManagerr : SingletonBase { public void Init() { #if GFGZSB AliPayManagerInit.Instance.aliSDKListener = new AliPaySDKListener(); #endif } //支付宝支付 public void Pay(string orderStr) { AliPayManagerInit.Instance.ShowSwitchPayment(orderStr); } //微信支付 public void PayVx(string appId, string mchId, string prepayId, string packageValue, string nonceStr, string timestamp, string sign, string callBackObjectName = "AliPayGameObject", string callBackFuncName = "VxPayReceive") { AliPayManagerInit.Instance.VxShowSwitchPayment(appId, mchId, prepayId, packageValue, nonceStr, timestamp, sign, callBackObjectName, callBackFuncName); } } #if GFGZSB /// /// SDK回调 /// public class AliPaySDKListener : IAliSDKListener { public void AliPayReceiveAb(string message) { Debug.Log("Game.HotUpdate AliPayReceiveAb: " + message); } public void VxPayReceiveAb(string message) { if (message == "0") { ViewManager.Hide(); } else { PromptController.Instance.ShowFloatTextPrompt("支付失败"); } Debug.Log("Game.HotUpdate VxPayReceiveAb: " + message); } } #endif }