Example #1
0
        public async Task <string> Notify(NotifyCallBackInput input)
        {
            if (input == null)
            {
                throw new HttpException("回调参数不允许为null");
            }
#if !DEBUG
            var callKey = GetNotifyCallBackKey(input);
            if (!callKey.Equals(input.Key))
            {
                throw new HttpException("密钥不正确,回调可能不是由PaysApi发起");
            }
#endif

            var userInfo = await _userManager.GetAccountBaseInfo(input.Orderuid);

            string lotteryId = string.Empty;
            var    result    = _sellAppService.PayCallBack(input, userInfo, out lotteryId);

            if (!result)
            {
                throw new HttpException("业务处理失败");
            }

            await AllotDefaultPlanNorm(userInfo.Id, lotteryId);

            return("OK");
        }