yavsc/src/Yavsc.Org/ViewComponents/PayPalButtonComponent.cs

18 lines
655 B
C#
Raw Normal View History

2023-03-19 17:57:55 +00:00
using Microsoft.AspNetCore.Mvc;
2017-05-24 23:36:49 +02:00
using Yavsc.Helpers;
using Yavsc.Models.Billing;
namespace Yavsc.ViewComponents
{
public class PayPalButtonViewComponent : ViewComponent
{
public IViewComponentResult Invoke(NominativeServiceCommand command, string apiControllerName , string controllerName)
{
ViewBag.CreatePaymentUrl = Request.ToAbsolute($"api/{apiControllerName}/createpayment/"+command.Id);
ViewBag.ExecutePaymentUrl = Request.ToAbsolute("api/payment/execute");
ViewBag.Urls=Request.GetPaymentUrls(controllerName,command.Id.ToString());
return View ( command);
}
}
}