public ActionResult Callback() { var checkTransactionRequest = new CheckTransactionRequest((string) Session["tid"], _configuration); var response = _cieloService.CheckTransaction(checkTransactionRequest); ViewBag.Status = response.Status.ToString(); return View(); }
public void ToXml_GivenACheckTransactionRequest_ShouldGenerateAXmlAsExpected() { var checkTransactionRequest = new CheckTransactionRequest("10069930690864271001", new FakeConfiguration()) { UniqueKey = Guid.Parse("4c38f150-b67d-4059-88d1-b53b13e54a8e") }; checkTransactionRequest .ToXml(false) .RemoveNewLinesAndSpaces() .Should() .Be(ExpectedXml.RemoveNewLinesAndSpaces()); }
public CheckTransactionResponse CheckTransaction(CheckTransactionRequest request) { var responseContent = string.Empty; try { responseContent = Execute(request); CreateExceptionIfError(responseContent); return new CheckTransactionResponse(responseContent); } catch (Exception ex) { throw new ResponseException(responseContent, ex); } }