mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
send notification IPNs on bitpay invoice
This commit is contained in:
@ -4,16 +4,20 @@ using Bit.Core.Models.Api;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Bit.Core;
|
||||
|
||||
namespace Bit.Api.Controllers
|
||||
{
|
||||
public class MiscController : Controller
|
||||
{
|
||||
private readonly BitPayClient _bitPayClient;
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
|
||||
public MiscController(BitPayClient bitPayClient)
|
||||
public MiscController(BitPayClient bitPayClient,
|
||||
GlobalSettings globalSettings)
|
||||
{
|
||||
_bitPayClient = bitPayClient;
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
[HttpGet("~/alive")]
|
||||
@ -44,7 +48,7 @@ namespace Bit.Api.Controllers
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<string> PostBitPayInvoice([FromBody]BitPayInvoiceRequestModel model)
|
||||
{
|
||||
var invoice = await _bitPayClient.CreateInvoiceAsync(model.ToBitpayClientInvoice());
|
||||
var invoice = await _bitPayClient.CreateInvoiceAsync(model.ToBitpayClientInvoice(_globalSettings));
|
||||
return invoice.Url;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user