Bug Purchase event issue

Status
Not open for further replies.
I'm having an issue with the purchase event for the currency I've created. I suspect it's a setting somewhere but I'm not sure where the issue is.

What's going on is that when someone goes to purchase currency (credits) with $, the purchase goes through and their paypal is charged but they end up getting no credits for their money. It returns this error message:

The requested page could not be found. (Code: invalid_action, controller: DBTech\Credits:Currency, action: PurchaseCompleted)


I have tested to see if that same user could donate to the site with TH donate and that seems to be working fine and causing no conflicts. This leads me to believe it's not a payment processing issue and something to do with DBCredits.

Any help you can give me would be appreciated.
 
That error message is not related to credits not being awarded, it's just a missing landing page. I will fix that in the next version.

Can you please inspect the payment provider log and see if there's any messages there that could explain it?
 
That error message is not related to credits not being awarded, it's just a missing landing page. I will fix that in the next version.

Can you please inspect the payment provider log and see if there's any messages there that could explain it?

I found this in the log (I've blacked out any personal identifying info):

suineg payment log1 prvt.png

Is that helpful?
 
Does event ID 10 exist in the system?

It doesn't.

But that could be because in my efforts to troubleshoot this issue I deleted and then remade the currency and all of the associated events. For this remade currency there is an event for purchase in the table:
xf_dbtech_credits_event

The table entry for that event only has: active =1, frequency =1, alert =1, display =1, and this in the settings:
{"purchase_description":"Purchase 1,610 Heaven Points.","purchase_cost":5,"purchase_amount":1610,"payment_profile_ids":[1]}
All other settings are =0

I remade this currency in the same way as the original. I only remade it because doing that fixed a couple of other errors I was having for other currencies shrug.
 
Then yes, any purchases that were still being processed under the old event would fail with no way to recover them. You would need to process them manually by adjusting the recipient's credits.

How long do you think it will take for another sale to occur using the new event?
 
Then yes, any purchases that were still being processed under the old event would fail with no way to recover them. You would need to process them manually by adjusting the recipient's credits.

How long do you think it will take for another sale to occur using the new event?
I'm still in the 'testing everything out' phase to make sure it all works like I think and like I want it to. I had asked a friend to put the purchase through to test it out, so I can do that again or try to find another credit card myself to do it. I just didn't want to start racking tons of 'tests' up though since even though I can refund his cash or give him points manually, it starts to add up.

Once I verify everything is working right I'm going to go site wide with all the features I have done so far, but I'm not there yet.

Let me try it out again and I'll get back to you.

One other question I have though, is about the paycheck event.

I have 3 other types of currencies set up that are used to purchase different types of items in DBshop.

It's like this:

Currency 1 buys item type 1 and is available to usergroup 1.
Currency 2 buys item type 2 and is available to usergroups 1 and 2.
Currency 3 buys item type 3 and is available to usergroups 1, 2, and 3.

I'd like everyone in the proper usergroups to get a daily paycheck for the relevant currency, but it seems to only be triggering for 1 type of currency and not the other 2. I don't see any setting that governs this or prevents it, and none of the usergroup permission settings seem relevant either.

PS: Thanks for your prompt replies, the help is appreciated :)
 
Can you show me the full settings for all 3 of the Paycheck events?
Here's a screencap of the table (try not to pay too much attention to the names, it's meme-ish :) ) :
paycheck screens.jpg

Usergroup ID is right now only admin and another group I'm using for testing. Node ID's says: [-1].
In the final column, settings, the only thing listed where it says BLOB 2 is "[]" without the quotes.
 
I need to see a screenshot of the UI, not the database :)

Right. Try this:paycheck screens2.jpg

They are all set up the same, the only thing that changes is the amount, the currency field to correspond with the currency, and the title field.

EDIT: It seems like the paycheck event is only firing for the currency with the lowest currency ID number, from testing it out. Dunno if that helps.
 
Last edited:
Update:
Confirmed that the paycheck event is only triggering for lowest currency ID number.
Also, I have a daily activity event set up for each currency and it's behaving the same way. The same sort of options are chosen as for the paycheck event, just different amounts and different entries in the title and currency fields to correspond to the 3 different currencies.
 
Update:
Confirmed that the paycheck event is only triggering for lowest currency ID number.
Also, I have a daily activity event set up for each currency and it's behaving the same way. The same sort of options are chosen as for the paycheck event, just different amounts and different entries in the title and currency fields to correspond to the 3 different currencies.
Are you sure the other two currencies are active? If you've disabled a currency via the toggle, the daily / pay check events will not run.
 
Are you sure the other two currencies are active? If you've disabled a currency via the toggle, the daily / pay check events will not run.

Yes, they're all toggled as active. It's just triggering 1 currency instead of all of them.


I had my friend try another purchase event to test it out again, still no dice. It is returning (11 so far) of these error messages in the server logs:
  • XF\PrintableException: Please enter a value for the required field 'cost'.
  • src/XF/Mvc/Entity/Entity.php:1154
  • Generated by: Unknown account
  • May 15, 2019 at 5:28 AM

#0 src/addons/DBTech/Credits/EventTrigger/Purchase.php(46): 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\ReportImprovements\XF\Entity\User), 103, false, Object(ArrayObject))
#3 src/addons/DBTech/Credits/Purchasable/Currency.php(232): DBTech\Credits\EventTrigger\AbstractHandler->apply(103, Array, Object(SV\ReportImprovements\XF\Entity\User))
#4 src/XF/Payment/AbstractProvider.php(164): DBTech\Credits\Purchasable\Currency->completePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}
 
Yes, they're all toggled as active. It's just triggering 1 currency instead of all of them.
Ah, I think I see what's happening. It should be fixed with RC2.

I had my friend try another purchase event to test it out again, still no dice. It is returning (11 so far) of these error messages in the server logs:
I believe that is a known issue that will be fixed in RC2.
 
There is never any ETAs for any of our products as plans always change so I can not commit to any kind of schedule, sorry.
 
New problem: I can't create or save any currencies in DB shop. I get this error:

InvalidArgumentException: Column 'per_post' is unknown
src/XF/Mvc/Entity/Entity.php:582

#0 src/XF/Mvc/Entity/Entity.php(720): XF\Mvc\Entity\Entity->set('per_post', 0, Array)
#1 src/XF/Mvc/FormAction.php(34): XF\Mvc\Entity\Entity->bulkSet(Array)
#2 src/XF/Mvc/FormAction.php(164): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#3 src/addons/DBTech/Shop/Admin/Controller/Currency.php(150): XF\Mvc\FormAction->run()
#4 src/XF/Mvc/Dispatcher.php(321): DBTech\Shop\Admin\Controller\Currency->actionSave(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('DBTech\\Shop:Cur...', 'Save', Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Admin\Controller\Currency), NULL)
#6 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Admin\Controller\Currency), NULL)
#7 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#9 src/XF.php(390): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}

This is also from a fresh install in DB shop. I had to reinstall and redo everything after getting this error, and DB credits is not currently installed to cause this problem either.
 
Status
Not open for further replies.

DragonByte Credits

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,223
Customer rating
5.00 star(s) 4 ratings
Back
Top