12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Data;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Extensions.Logging;
- using MySystem.PxcModels;
- using System.Threading;
- using Library;
- using LitJson;
- namespace MySystem.Controllers
- {
- public class HomeController : Controller
- {
- private readonly ILogger<HomeController> _logger;
- public HomeController(ILogger<HomeController> logger)
- {
- _logger = logger;
- }
- public IActionResult Index()
- {
- return View();
- }
- public IActionResult Error()
- {
- string isapi = Request.Headers["Api"].ToString();
- if (isapi != "1")
- {
- if (Response.StatusCode == 500)
- {
- return Redirect("/public/errpage/pc/500.html");
- }
- else if (Response.StatusCode == 502)
- {
- return Redirect("/public/errpage/pc/502.html");
- }
- else if (Response.StatusCode == 404)
- {
- return Redirect("/public/errpage/pc/404.html");
- }
- }
- return View();
- }
- public string test()
- {
- string txt = "";
- //{"id":"dc4512b7-83cd-5fa5-91e9-a80fc8562e96","create_time":"2023-06-01T13:42:42+08:00","resource_type":"encrypt-resource","event_type":"TRANSACTION.SUCCESS","summary":"支付成功","resource":{"original_type":"transaction","algorithm":"AEAD_AES_256_GCM","ciphertext":"n/mRI+vnpUsIoNPM9dCsQvcbqOkhQkpoeWAPsdenYw/FvyDmg9Cc4N8yRa6nFxVYpQR7pbjxYLQcZk8bf2Us4mo6ZCUN4B/JH0NT4ja1eSyy7no6n2mJyufpf2oig9KbqabTjiFk84zIyxdg3wtttEohdYZr1w8rPSF0+7MR5LAdx73g+v5f/gbu0r3AzwErbO7fF9vOoJqNgqcc3VgpAhoH9xwed+PNCUmgGH+YjO0lvdurztJL0iXT9P6kiy+36Tcsp6wT2SdVXCzxS65wNhPI2M0S2A0WDPpBw5cswR/glLFwo9XqT5gavU19oS6w3mLNUlB1OsEMt3tqcTDCS4zk5I9uT45uMAAvF2EiJBsnGxSUuRD1qL4jZ8hdxV2MRquy8Nbxr1wj926ye98BXdR9ZaAH9G6UMk4YyTjiVMbvhOqciqfuFlwxNkXtpV8b3QAWOhsIw0E210Tss2JDNW38ITaCwfBwSyRfYjYFhoIEbpEVpUZBn2NqxxeK1iv/h2zp3BapS+Zy0iMDba9GDjJVqEHDc6in3rSB3e5/VFjdVm3dWVH3+Gry/pU9ATTJNWaJsr/z3sWzzOoa3u0SsihPIdhJ4QiDlsYAz0JGVvbcqMXyaEb9tRR2oYWy4kOOsYirnSmhuRbeow==","associated_data":"transaction","nonce":"QxHnxeB6xtrU"}}
- // string content = "3IOiuqVNgoBm+slkn6EEgZyTaaEfq8CAHlSZUZuBfgxvhGz1+MWGqQ0wb0H3Jo5s9GveNP6zlrJAcxT7jGjYKMawN3WH+0zwQXZziYX3K3fXzamdputjuGz4MU2UBnDnIihgeaGfExH85UJQVJGoqJ38QiFo8MBaFRMz9FtspT3+tcBUryRCqdHvF57sNnKvEYJeacDKI8vEQV0YiUvytRsjMKbvLLwx+m6WsaIP4y4XPBuwmiJ5wYNFkVzUWUxzlctkjGsUXQGJrAch30pjBIr39gxMeWnph5fS6Jszivplki7jhSJjOgckRVmqOYvdmf8zcIeW3i02axg1YoxjPvs4JP+NZ3cQAZMI4FQLlV2w3pJGFKY7ZBIP73F6sHLMn6FReOvzWmWaQ+WvbGw9PpRpckkV83Eu9D6TpKRcw/M9cQA8Vh+24vuA6aFhMl2kUVTIdziOQrhH5GBvURKGm+YCtokOnsU21V01UCgEWA2NDL1D0GZZFwmMy4IiR1QY7IAwoqavt7h8l/8X5qHvhucqkdaRmYlLMM2S/xOob2HIiTA3l8Nj8BYXcbhr52fv14qY4qFSgtOc6NrverxANIIdv+YhCXU49cY25L1MjCQINUbvJ78jaFaeuv8nNcqjmfADyTC8c+jI4J7W1Z4B0isnT18XYcu6rYQhvjoyoW41ATVFDZtV3Xh/y7n14foLT5qXfkG21SABCviVL79N+36koa8rQB5yJQ==";
- // string txt = WeChatFunction.Instance.AesGcmDecrypt("transaction", "ACgp5LfxJ2Pl", content);
- // Dictionary<string, string> result = WeChatFunction.Instance.Refund("1645266943", 0.01M, 0.1M, "2023060214014405449699901", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
- // txt = Newtonsoft.Json.JsonConvert.SerializeObject(result);
- txt = Newtonsoft.Json.JsonConvert.SerializeObject(WeChatFunction.Instance.QueryMerchant("KXS2023060213554647660112"));
- return txt;
- }
-
- }
- }
|