feat(invoicing): connect signed estimates and verified payment receipts
Freeze invoice totals and parties, record offline receipts and verify completed PayPal transactions. Protect idempotence and concurrent balance updates; add migration, API client, documentation and tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
5d03b2e477
commit
2dcbcd35b3
37 changed files with 6686 additions and 12 deletions
|
|
@ -0,0 +1,17 @@
|
|||
using Yavsc.Services;
|
||||
|
||||
namespace Yavsc.Api.Services;
|
||||
|
||||
public static class InvoicingServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddInvoicing(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddScoped<IInvoicingService, InvoicingService>();
|
||||
services.Configure<PayPalSettings>(configuration.GetSection("Authentication:PayPal"));
|
||||
services.AddHttpClient<IPayPalTransactionVerifier, PayPalTransactionVerifier>(client =>
|
||||
client.Timeout = TimeSpan.FromSeconds(30));
|
||||
services.AddOpenApi("invoicing", options =>
|
||||
options.ShouldInclude = description => description.GroupName == "invoicing");
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue