WxpayController.cs 677 B

1234567891011121314151617181920212223242526272829
  1. using GxPress.Common.WechatPay;
  2. using Microsoft.AspNetCore.Authorization;
  3. using Microsoft.AspNetCore.Mvc;
  4. namespace GxPress.Api.WebControllers
  5. {
  6. [Route("api/web/wxpay")]
  7. [ApiController]
  8. [Authorize]
  9. public class WxpayController : Controller
  10. {
  11. [HttpGet()]
  12. [AllowAnonymous]
  13. public string GetNativePayUrl()
  14. {
  15. var nativePay = new NativePay();
  16. return nativePay.GetPayUrl("111");
  17. }
  18. /// <summary>
  19. /// 回调地址
  20. /// </summary>
  21. [HttpGet("callback")]
  22. [AllowAnonymous]
  23. public string ProcessNotify()
  24. {
  25. return "true";
  26. }
  27. }
  28. }