[DBTech] DragonByte Credits

[DBTech] DragonByte Credits [Paid] 5.9.0

No permission to buy ($14.95)
Not yet running the last version, but I have some errors logged tonight to report as it might also occur on the last version:
Do you have the step-by-step instructions for how to replicate this issue? I can add code to prevent it from happening, but I'd be more interested in figuring out the source.
 
Well I'm not sure, as the last time that thread was edited was over 1 year ago, the user was just trying to unlock the charged content using his virtual currency I guess, and we're running only 1 virtual currency, so I'm unsure about how to reproduce it :S

Maybe two users were unlocking it simultaneously?
 
Well I'm not sure, as the last time that thread was edited was over 1 year ago, the user was just trying to unlock the charged content using his virtual currency I guess, and we're running only 1 virtual currency, so I'm unsure about how to reproduce it :S

Maybe two users were unlocking it simultaneously?
The only way it could happen from my perspective would be if the user tried to unlock the content in two separate tabs in rapid succession, and your server was slow enough that the first unlock request had not processed before the second one checked whether it was processed already.

That being said I don't know if that is truly the only way it could happen.

Oh well, no big, I can work around it :)
 
I confirm the user was the same for 2 consecutive errors, and another similar error was logged only once, at 7:33 AM today, but from another user.

Maybe if they click twice (even in the same tab) it counts as 2 unlock attempts?
 
I confirm the user was the same for 2 consecutive errors, and another similar error was logged only once, at 7:33 AM today, but from another user.

Maybe if they click twice (even in the same tab) it counts as 2 unlock attempts?
I suppose that is possible, I'm not sure if there's an easy way to work around that without creating a bunch of dirty JavaScript hacks to disable submit button. I'll do some research and post back if I'm making any changes.
 
Another one, maybe someone trying to pierce it somehow by editing values in client-side?

Code:
[LIST]
[*]XF\PrintableException: Please enter a number that is at least 0.01.
[*]src/XF/Mvc/Entity/Entity.php:1154
[*]Generated by: Unknown account
[*]May 17, 2019 at 1:13 PM
[/LIST]
Stack trace
#0 src/addons/DBTech/Credits/EventTrigger/Purchase.php(47): XF\Mvc\Entity\Entity->save()
#1 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(609): DBTech\Credits\EventTrigger\Purchase->postSave(Object(DBTech\Credits\Entity\Transaction))
#2 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(258): DBTech\Credits\EventTrigger\AbstractHandler->trigger(Object(SV\WhoReplied\XF\Entity\User), 15476, false, Object(ArrayObject))
#3 src/addons/DBTech/Credits/Purchasable/Currency.php(295): DBTech\Credits\EventTrigger\AbstractHandler->apply(15476, Array, Object(SV\WhoReplied\XF\Entity\User))
#4 src/XF/Payment/AbstractProvider.php(180): DBTech\Credits\Purchasable\Currency->reversePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}
 
Another one, maybe someone trying to pierce it somehow by editing values in client-side?

Code:
[LIST]
[*]XF\PrintableException: Please enter a number that is at least 0.01.
[*]src/XF/Mvc/Entity/Entity.php:1154
[*]Generated by: Unknown account
[*]May 17, 2019 at 1:13 PM
[/LIST]
Stack trace
#0 src/addons/DBTech/Credits/EventTrigger/Purchase.php(47): XF\Mvc\Entity\Entity->save()
#1 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(609): DBTech\Credits\EventTrigger\Purchase->postSave(Object(DBTech\Credits\Entity\Transaction))
#2 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(258): DBTech\Credits\EventTrigger\AbstractHandler->trigger(Object(SV\WhoReplied\XF\Entity\User), 15476, false, Object(ArrayObject))
#3 src/addons/DBTech/Credits/Purchasable/Currency.php(295): DBTech\Credits\EventTrigger\AbstractHandler->apply(15476, Array, Object(SV\WhoReplied\XF\Entity\User))
#4 src/XF/Payment/AbstractProvider.php(180): DBTech\Credits\Purchasable\Currency->reversePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}
That is the likely scenario yes, I won't be making any changes here based off of the information thus far. You should contact user ID 15476 and investigate further.
 
That is the likely scenario yes, I won't be making any changes here based off of the information thus far. You should contact user ID 15476 and investigate further.

It's curious, the user with the ID of 15476 isn't active anymore (last login time is from 2016).
 
DragonByte Tech updated [DBTech] DragonByte Credits with a new update entry:

5.3.0 Release Candidate 3

Update highlights

This version updates the Approval Queue template for transactions to match the new XF 2.1 style. Furthermore, it fixes an issue where it was possible for a charge purchase (buying access to hidden content) to produce a server error.


Complete Change Log

Change: Updated Approval Queue template for Transactions
Fix: Prevent duplicate key exception when inserting a charge purchase

Read the rest of this update entry...
 
My users click "like" to give credits to other users. Is there a way to limit the amount of credits they give out per day?
 
Use the "Maximum applications" and "Limit period" settings under the Advanced options group for the event :)

Hrm, I tried that, and it can limit how much a user receives, but not how much a user "gives out".

i.e.
Each time Bob reacts to a post, the poster receives 1 credit. I want to limit the number of times Bob gives credits via the "Reacted" event, not the amount the poster receives.

I think I'll need an add-on that can limit the amount of "reactions" one is able to give per day, unless someone knows another way.
 
Hrm, I tried that, and it can limit how much a user receives, but not how much a user "gives out".

i.e.
Each time Bob reacts to a post, the poster receives 1 credit. I want to limit the number of times Bob gives credits via the "Reacted" event, not the amount the poster receives.
I see, there's no way to do that in the add-on as it is.

I think I'll need an add-on that can limit the amount of "reactions" one is able to give per day, unless someone knows another way.
This would be the appropriate solution.
 
So I can create in the admin two different currencies, each with different value. Can the user exchange one curenice for the other?
 
They would click the currency link in the na bar or somewhere else and then click the Transfer tab.

You need one Transfer event for both currencies.
Thanks for info. Where can this Transfer tab be found? Do you have a print-screen for that? An Event has to be created to see the tab?

Or do you have a manual how to use this add-on?
 
Thanks for info. Where can this Transfer tab be found? Do you have a print-screen for that? An Event has to be created to see the tab?

Or do you have a manual how to use this add-on?
Transfer events do indeed have to be created in order to see the tab. It can be found in the "currency pop-up" that appears whenever you click the currency anywhere such as on the navbar.

There's no manual at this time, sorry.
 
Transfer events do indeed have to be created in order to see the tab. It can be found in the "currency pop-up" that appears whenever you click the currency anywhere such as on the navbar.
Thanks for info.

There's no manual at this time, sorry.
That is too bad. So I guess I have to ask here, maybe for some people, dumb questions. Please let me know what kind of PayPal info I have to write in "Payment profile" to make the purchase event work?
 
Top Bottom