add GET endpoint for pay button (#1349)

closes #889
This commit is contained in:
Andrew Camilleri
2020-02-24 13:18:04 +01:00
committed by GitHub
parent 29d51ad2a2
commit a354f7d9dd

View File

@@ -26,6 +26,15 @@ namespace BTCPayServer.Controllers
private InvoiceController _InvoiceController;
private StoreRepository _StoreRepository;
[HttpGet]
[IgnoreAntiforgeryToken]
[EnableCors(CorsPolicies.All)]
[Route("api/v1/invoices")]
public async Task<IActionResult> PayButtonHandle(PayButtonViewModel model)
{
return await PayButtonHandle(model, CancellationToken.None);
}
[HttpPost]
[Route("api/v1/invoices")]
[MediaTypeAcceptConstraintAttribute("text/html")]