| 123456789101112131415161718192021222324252627 |
- using Application.Abstractions.Messaging;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Mvc.RazorPages;
- namespace Admin.Pages.Payments.Toss.Cancel;
- public class ViewModel(IMediator mediator) : PageModel
- {
- [BindProperty(SupportsGet = true)]
- public int ID { get; set; }
- public GetTossCancel.Response? Data { get; set; }
- public async Task<IActionResult> OnGetAsync(CancellationToken ct)
- {
- try
- {
- Data = await mediator.Send(new GetTossCancel.Query(ID), ct);
- return Page();
- }
- catch (Exception e)
- {
- TempData["ErrorMessages"] = e.Message;
- return RedirectToPage("/Payments/Toss/Cancel/Index");
- }
- }
- }
|