// So called "Result Url" in terms of Robokassa documentation. // This url is called by Robokassa robot. public ActionResult Confirm(RobokassaConfirmationRequest confirmationRequest) { try { if (confirmationRequest.IsQueryValid(RobokassaQueryType.ResultURL)) { processOrder(confirmationRequest); return Content("OK"); // content for robot } } catch (Exception) { } return Content("ERR"); }
// So called "Success Url" in terms of Robokassa documentation. // Customer is redirected to this url after successful payment. public ActionResult Success(RobokassaConfirmationRequest confirmationRequest) { try { if (confirmationRequest.IsQueryValid(RobokassaQueryType.SuccessURL)) { processOrder(confirmationRequest); return View(); // content for user } } catch (Exception) { } return View("Fail"); }
private void processOrder(RobokassaConfirmationRequest confirmationRequest) { // TODO: // 1. verify your order Id and price here // 2. mark your order as paid }