public ActionResult Test(TestPostModel model)
        {
            // update the reward table to include this reward
            var user  = _profileService.GetUserByFacebookId(model.FacebookId);
            var prize = _service.GetPrizeByPin(model.PinId);

            _service.AssignPrizeToUser(user.UID, prize.WID);

            // generate the token and pass off to ICG
            var qs = _service.CreateQueryString(
                user.fbid
                , prize.ICGPin
                , ConfigurationHelper.ICGCallbackUrl
                );
            var sig = _service.ComputeSignature(qs, RedemptionHelper.SharedKey);

            var url = "http://pethealthuat.icgrouplp.com/RegCrm.aspx"
                      + "?" + qs
                      + "&s=" + sig
            ;

            if (ConfigurationHelper.IsLocal)
            {
                Response.Write(url);
                Response.End();
            }

            return(Redirect(url));
        }
Exemple #2
0
 public HttpResponseMessage PostTest(TestPostModel model)
 {
     return(new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new ObjectContent(typeof(Tuple <string, string>), new Tuple <string, string>("T1", "T2"), new JsonMediaTypeFormatter())
     });
 }
Exemple #3
0
        public IActionResult Index([FromBody] TestPostModel model)
        {
            string reqBody = null;

            try
            {
                reqBody = RequestInfoService.RequestBody;
            }
            catch (Exception ex)
            {
            }

            return(View());
        }