PrePay2Service.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Security.Cryptography;
  5. using System.Text;
  6. using UnityEngine;
  7. public class PrePay2Service
  8. {
  9. public StoreName storeName;
  10. public string goodsID;
  11. public string prepay_id;
  12. public PrePay2Service(StoreName storeName, string goodsID)
  13. {
  14. this.storeName = storeName;
  15. this.goodsID = goodsID;
  16. }
  17. static public void SendPrePayMsg(StoreName storeName, string goodsID)
  18. {
  19. DateTime dt1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
  20. string timeStamp = (new DateTime(DateTime.UtcNow.Ticks - dt1970.Ticks).AddHours(8).Ticks / 10000000).ToString();
  21. Debug.LogWarning("支付发起时间" + timeStamp);
  22. //if (Application.platform == RuntimePlatform.WindowsEditor)
  23. //{
  24. // return;
  25. //}
  26. //PrePay2Service msg = new PrePay2Service(storeName, goodsID);
  27. //PrePay2Service.SendPrePayMsg(storeName, goodsID);
  28. //ResendMessageManager.AddResendMessage(msg, typeof(StoreBuyGoods2Client).Name, (resMsg) =>
  29. //{
  30. //});
  31. JsonMessageProcessingController.SendMessage<PrePay2Service>(new PrePay2Service(storeName, goodsID));
  32. }
  33. }