mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Checkout v2: Play sound when invoice is paid (#5113)
* Checkout v2: Play sound when invoice is paid Closes #5085. * Refactoring: Use low-level audio API to play the sound Allows to play the sound regardless of browser permissions. * Add audio file detection * Use model state for file upload errors * Add default sound and customizing option * Fix mp3 detection * Add sounds * Update defaults * Add nfcread and error sounds * Improve label wording * Replace sound --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using BTCPayServer.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -44,6 +45,9 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||
[Display(Name = "Celebrate payment with confetti")]
|
||||
public bool CelebratePayment { get; set; }
|
||||
|
||||
[Display(Name = "Enable sounds on checkout page")]
|
||||
public bool PlaySoundOnPayment { get; set; }
|
||||
|
||||
[Display(Name = "Requires a refund email")]
|
||||
public bool RequiresRefundEmail { get; set; }
|
||||
|
||||
@@ -61,9 +65,14 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||
|
||||
[Display(Name = "Link to a custom CSS stylesheet")]
|
||||
public string CustomCSS { get; set; }
|
||||
|
||||
[Display(Name = "Link to a custom logo")]
|
||||
public string CustomLogo { get; set; }
|
||||
|
||||
[Display(Name = "Custom sound file for successful payment")]
|
||||
public IFormFile SoundFile { get; set; }
|
||||
public string SoundFileId { get; set; }
|
||||
|
||||
[Display(Name = "Custom HTML title to display on Checkout page")]
|
||||
public string HtmlTitle { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user