Пример #1
0
        public IActionResult GetPayResult([FromServices] IPayServiceWeixin payServiceWeixin)
        {
            PayOrder payOrder = payServiceWeixin.CompletePayOrderAndReback(httpContextAccessor.HttpContext, out string successStr);

            if (payOrder.Success == true)
            {
                return(Content(successStr));
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        public IActionResult GetPayResult([FromServices] IPayServiceWeixin payServiceWeixin, [FromServices] ILogger <GameController> logger)
        {
            bool IsWeiXinServerRequest = IsWeixinSeverIp(logger);

            if (!IsWeiXinServerRequest)
            {
                return(null);
            }
            PayOrder payOrder = payServiceWeixin.CompletePayOrderAndReback(httpContextAccessor.HttpContext, out string successStr);

            if (!(payOrder is null) && payOrder.Success == true)
            {
                return(Content(successStr));
            }