we are using the new bits-enabled feature from Twitch in our Extension (Twitch.ext.features.isBitsEnabled).
But now we have a problem. Maybe someone has an idea how to fix this:
In out Extension the Streamer can set the amount of Bits for each gadget by himself.
If he is not affiliate/partnered, all gadgets will have the price of 0 Bits (and the price is not displayed).
If he is affiliate/partnered, he can chose 0 Bits or any other amount of Bits.
This works fine at the moment.
But now we see following situations in out server log:
- A streamer (he is partnered) configures a gadget with e.g. 100Bits. So the gadget in our database has also the amount of 100 Bits.
- Viewers gets the price displayed in the panel and they can trigger via payment process. Everything is fine.
- Now the streamer deactivates the Bits usage with the checkbox, provided by Twitch.
- Now our Extension (Panel) gets from Twitch.ext.features.isBitsEnabled = false.
- So the panel will not display any Bits and will trigger without any payment process. (this is what we want in this situation, because the gadget should be still available, just without Bits)
- But now our Server gets a trigger without payment transaction and sees in the database, that the gadget price is 100Bits.
- So the server refuses the trigger because of missing transaction (we have to refuse, otherwise user can abuse and trigger without payment although the gadget has setuped a Bits amount).
So, in conclusion, the main Problem is that our Server has no information if Bits is enabled for the extension or not.
- We can’t provide this information via the Extension Panel, because this will easy hackable.
- The information is not included in the JWT, where the information would be safe.
- The server can’t get this information through a save way.
Is there any way how we can get the information if Bits is enabled or not from SERVER SIDE?