AliManager.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // using System;
  2. // using ET;
  3. // using UnityEngine;
  4. // using GFGGame.Launcher;
  5. //
  6. // namespace GFGGame
  7. // {
  8. // public class AliManagerr : SingletonBase<AliManagerr>
  9. // {
  10. // public void Init()
  11. // {
  12. // #if GFGZSB
  13. // AliPayManagerInit.Instance.aliSDKListener = new AliPaySDKListener();
  14. // #endif
  15. // }
  16. //
  17. // //支付宝支付
  18. // public void Pay(string orderStr)
  19. // {
  20. // AliPayManagerInit.Instance.ShowSwitchPayment(orderStr);
  21. // }
  22. //
  23. // //微信支付
  24. // public void PayVx(string appId, string mchId, string prepayId, string packageValue,
  25. // string nonceStr, string timestamp, string sign, string callBackObjectName = "AliPayGameObject",
  26. // string callBackFuncName = "VxPayReceive")
  27. // {
  28. // AliPayManagerInit.Instance.VxShowSwitchPayment(appId, mchId, prepayId, packageValue,
  29. // nonceStr, timestamp, sign, callBackObjectName, callBackFuncName);
  30. // }
  31. // }
  32. //
  33. // #if GFGZSB
  34. // /// <summary>
  35. // /// SDK回调
  36. // /// </summary>
  37. // public class AliPaySDKListener : IAliSDKListener
  38. // {
  39. // public void AliPayReceiveAb(string message)
  40. // {
  41. // Debug.Log("Game.HotUpdate AliPayReceiveAb: " + message);
  42. // }
  43. //
  44. // public void VxPayReceiveAb(string message)
  45. // {
  46. // if (message == "0")
  47. // {
  48. // ViewManager.Hide<StorePayPropView>();
  49. // }
  50. // else
  51. // {
  52. // PromptController.Instance.ShowFloatTextPrompt("支付失败");
  53. // }
  54. // Debug.Log("Game.HotUpdate VxPayReceiveAb: " + message);
  55. // }
  56. // }
  57. // #endif
  58. // }