You have registered
PaymentService
as an implementation of the
IAsyncPaymentsService<PaymentDetail>
service.
Your controller needs to import the
IAsyncPaymentsService<PaymentDetail>
service, not the class that implements it:
private readonly IAsyncPaymentsService<PaymentDetail> _service;
public PaymentController(ApplicationDbContext context, IAsyncPaymentsService<PaymentDetail> service)
{
...