public ActionResult searchPaypalTransaction(PaypalPaymentSearchForm form) { if (ModelState.IsValid) { var txn_id = form.transaction_id; try { var payment = FindPayment(txn_id); if (payment != null) { form.payment = payment; return View("Search", form); } else { form.error = "Your transaction could not be found."; } } catch (Exception) { form.error = "Your transaction could not be found."; } } return View("Search", form); }
public ActionResult GetSearchPaypalTransaction() { var model = new PaypalPaymentSearchForm(); return View("Search", model); }