TourIAm/TIAMSharedUI/Pages/CreateSumupPaymentPage.razor

23 lines
697 B
Plaintext

@page "/create-payment"
@using TIAM.Entities.Transfers
@using TIAMWebApp.Shared.Application.Services;
@using TIAMWebApp.Shared.Application.Models.ClientSide.Payment;
@inject SumupService SumUpService
<h3>Create Payment</h3>
<button @onclick="CreatePaymentLink">Create Payment Link</button>
@code {
private async Task CreatePaymentLink()
{
Transfer subject = new Transfer();
subject.Id = Guid.NewGuid();
subject.Price = 17000;
subject.ContactEmail = "fyloruta@citmo.net";
subject.OrderId = 1232131;
var paymentLink = await SumUpService.CreatePaymentLinkAsync(subject);
Console.WriteLine($"Payment Link: {paymentLink}");
}
}