AliManager.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using ET;
  3. using UnityEngine;
  4. using GFGGame.Launcher;
  5. namespace GFGGame
  6. {
  7. public class AliManagerr : SingletonBase<AliManagerr>
  8. {
  9. //支付宝支付
  10. public void Pay(string orderStr)
  11. {
  12. AliPayManagerInit.Instance.ShowSwitchPayment(orderStr);
  13. }
  14. //微信支付
  15. public void PayVx(string appId, string mchId, string prepayId, string packageValue,
  16. string nonceStr, string timestamp, string sign, string callBackObjectName = "AliPayGameObject",
  17. string callBackFuncName = "VxPayReceive")
  18. {
  19. AliPayManagerInit.Instance.VxShowSwitchPayment(appId, mchId, prepayId, packageValue,
  20. nonceStr, timestamp, sign, callBackObjectName, callBackFuncName);
  21. }
  22. }
  23. /// <summary>
  24. /// SDK回调
  25. /// </summary>
  26. public class AliPaySDKListener : IAliSDKListener
  27. {
  28. public void AliPayReceiveAb(string message)
  29. {
  30. Debug.Log("Game.HotUpdate AliPayReceiveAb: " + message);
  31. }
  32. public void VxPayReceiveAb(string message)
  33. {
  34. Debug.Log("Game.HotUpdate VxPayReceiveAb: " + message);
  35. }
  36. }
  37. }