Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout v2: Play sound when invoice is paid #5113

Merged
merged 11 commits into from Jul 24, 2023

Conversation

dennisreimann
Copy link
Member

@dennisreimann dennisreimann commented Jun 23, 2023

Adds the option to upload an audio file that gets played once a payment is made. Closes #5085.

grafik

@dennisreimann dennisreimann added Enhancement Improvements to an existing feature UI / UX Front-end issues, for front-end designers Invoice Related to Invoices in BTCPay labels Jun 23, 2023
@pavlenex
Copy link
Contributor

Is there a default sound?

@dennisreimann
Copy link
Member Author

Is there a default sound?

Not yet, if we intend to ship some, that's definitely possible, but I'd also leave the possibility tp upload a custom one as well.

@pavlenex
Copy link
Contributor

Sure yes, but I think we need to have a default sound, if we have a simple unique sound it can also become the part of the brand. I'm okay with having option for custom sounds.

@dennisreimann
Copy link
Member Author

Agreed, we have the code part in place already — @dstrukt and @webwworthy can take over and come up with a btcpay'y sound 🎵

@NicolasDorier
Copy link
Member

When we have a default sound, we should use it for the "Retail preset"

@NicolasDorier
Copy link
Member

NicolasDorier commented Jun 30, 2023

Pick up my commit NicolasDorier@f2a0347

@dennisreimann
Copy link
Member Author

Integrated a default sound (to be replaced? ;)) and the option to customize it by uploading another sound file.

Peek 2023-06-30 12-10

@dennisreimann
Copy link
Member Author

When we have a default sound, we should use it for the "Retail preset"

Enabled the default sound by default for new stores in both cases.

@dstrukt dstrukt self-requested a review July 6, 2023 05:48
@webwworthy
Copy link

Got a few ideas started for a default sound :) there are sound clips to listen too in the link below. While I was working on these I was wondering could if we give them a few default sounds to pick from? Maybe when you click the check box to play sound on payment a list of choices comes up inbetween the "play sound on payment" and custom file input? @dennisreimann @dstrukt @pavlenex

5x separate mp3's in this folder:
https://drive.google.com/drive/folders/14wIb97h6U0XDnCfmVOb61KFOf3aRGZuF?usp=sharing

@pavlenex
Copy link
Contributor

pavlenex commented Jul 8, 2023

Good work @webwworthy, personally I like the simplest one, "default sound bels".

@dennisreimann
Copy link
Member Author

tbh I don't think there's an ideal one there yet. To me they seem to dry and imho we should have something a bit more cheerful, especially since this can be used with the confetti. My 2 sats …

I was wondering could if we give them a few default sounds to pick from?

We could, but imho it'd be good to have one iconic default sound.

@pavlenex
Copy link
Contributor

pavlenex commented Jul 10, 2023

I am with @dennisreimann on having a default "iconic" sound. It could become a part of the brand!

Also tend to agree about having something a tiny bit more cheerful, yet simple. @webwworthy any idea how we could make them a tiny bit happy sounds?

@webwworthy
Copy link

for sure! @dennisreimann @pavlenex I can work on those to make some thing a bit brighter and more interesting. That is a good note to match the confetti, I will keep that in mind working on the next version 👍

@NicolasDorier
Copy link
Member

I don't have stong opinion, but I believe by default the sounds should be off. And the retail preset should activate sound.

@pavlenex
Copy link
Contributor

@NicolasDorier I agree with that, not strongly but I think it's fair to have the sound only in retail mode by default, at least that allows us to test things out slowly, without scaring people with sounds online. ACK on my end for that approach, having a sound may not be expected when doing online shopping and if people like it, we can easily add it as a default on.

@webwworthy
Copy link

@dennisreimann @pavlenex round 2 of default sounds to review, these still might not be one epic default sound yet and will keep working on them. https://drive.google.com/drive/folders/1f3Cg-dfyAaDniUSH6kNW_OkSa-y3WCCm?usp=sharing

@dennisreimann
Copy link
Member Author

dennisreimann commented Jul 17, 2023

The forth one (horn + chime) is a bit too dark/oomphy imho, but it goes in a good direction. A version which is a bit more cheerful would be nice — maybe also a progression of two or three notes/chords. It could also be a bit longer, maybe aim for three seconds — to fit the start of the grafitti animation, which in whole takes about five seconds.

@pavlenex
Copy link
Contributor

There are two sounds that we need, and I am still with Nicolas that these need to be in retail mode.

  1. Sound of successfully reading NFC
  2. Sound in case of an error?
  3. Sound for successful payment

I don't think these need to be too long but we can make if we want to. We can also just try to mimic what credit cards do it's very simple sounds just a sec or two indicating, success or failure. They just use simple beep.

@webwworthy
Copy link

I made some new sounds and kept them simple this round. The sounds I like the most don't have the "_alt" extension. Those files are another option for each one. There is also a clip of all the runner-ups that are additional alternatives.

Success, Error, NFC sounds are all in this folder:
https://drive.google.com/drive/folders/1eBAlnrGQ5Gfaa13Of085u93yLir8w18k?usp=sharing

@dennisreimann
Copy link
Member Author

I've now prepared everything so that only the sound files need to be changed to whatever gets chosen. The three files are located in the BTCPayServer/wwwroot/checkout-v2 directory.

@NicolasDorier
Copy link
Member

@pavlenex can you try this one and see if we can merge?

@dennisreimann
Copy link
Member Author

Updated the label wording to better indicate, that the setting enables all sounds, while the custom file is only for successful payments.

grafik

@pavlenex
Copy link
Contributor

tACK for implementation. I haven't tested the NFC sounds but they're available.

We still have to agree on the sounds, but @dennisreimann made it easy to replace these sounds so whoever takes over this par can easily do it, since Dennis will be afk.

@dennisreimann
Copy link
Member Author

You'll for sure need to replace the default success sound 😂

@pavlenex
Copy link
Contributor

@webwworthy It's up to you, I still kinda feel we need something very simple and mimic credit card payments. I would not use complicated coin sounds, it's just too much. Do you have any more ideas or should we vote on existing ones? To me suggested success sound is problematic, sounds more of an error to me, but could be just me?

@webwworthy
Copy link

Here is a clip all of the simple success sounds I've made with out any coin sound effects:
https://drive.google.com/file/d/1lMgBz0Au5gc-VEfQdTmLVvGyr4RiscvM/view?usp=sharing

I think someone should choose one of those four choices. It doesn't have the be the end all be all default sound forever and there was a simple "bells only" clip you liked early on, that is the first sound in this new success sounds clip. My vote is the current success sound or other than that the "bells only" sound would be my preferred second choice for now.

@webwworthy
Copy link

link to all 4 sounds as individual .mp3's:
https://drive.google.com/drive/folders/1vgTJbfH54f72vguPBlMpwN84uiKaD8rt?usp=sharing

@pavlenex
Copy link
Contributor

Success-1.Mp3 is dope! I vote for that one.

@NicolasDorier NicolasDorier merged commit 453548d into btcpayserver:master Jul 24, 2023
1 of 4 checks passed
@dennisreimann dennisreimann deleted the payment-sound branch July 24, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvements to an existing feature Invoice Related to Invoices in BTCPay UI / UX Front-end issues, for front-end designers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Invoice settled sound
4 participants