[TH] Donate [Deleted]

This value is updated as soon as the donation has been inserted, only thing that could potentially cause it to take an hour or more is if PayPal takes that long to send the notification of payment

Why does it not update when the other elements update? Someone made a donation at 17:58 UK time today, I immediately got an alert on the forum, the donation was added to the list on the campaign page, but even now at 20:50 UK time it is not listed on the Top Donors widget. I think something is not working as it should :)

I still don't get this, and I have to rebuild the donation cache every time to get the donations to show up only on the widget. Are you SURE this is working, because it makes no sense that everything else on the website would update, but not this widget.
 
Are you SURE this is working, because it makes no sense that everything else on the website would update, but not this widget.
Mine works fine. Latest XF2, latest add-on version - I suspect you may have a caching issue vs the widget not working.
 
I am getting this error repeatedly, which seems to be linked to the initial campaign I had to disable (removed email and names):

Code:
Server error log
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'message' at row 1 src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account Aug 9, 2018 at 11:03 AM
Stack trace
INSERT  INTO `xf_thdonate_donation` (`user_id`, `campaign_id`, `amount`, `purchase_request_key`, `message`, `donation_date`, `anonymous`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, '22007')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, '22007')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_thdonate_don...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/ThemeHouse/Donate/Service/Donate.php(63): XF\Mvc\Entity\Entity->save()
#7 src/addons/ThemeHouse/Donate/Purchasable/Campaign.php(197): ThemeHouse\Donate\Service\Donate->donate()
#8 src/XF/Payment/AbstractProvider.php(164): ThemeHouse\Donate\Purchasable\Campaign->completePurchase(Object(XF\Payment\CallbackState))
#9 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#10 {main}
Request state
array(4) {
  ["url"] => string(40) "/payment_callback.php?_xfProvider=paypal"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["_xfProvider"] => string(6) "paypal"
  }
  ["_POST"] => array(33) {
    ["mc_gross"] => string(5) "10.00"
    ["protection_eligibility"] => string(10) "Ineligible"
    ["payer_id"] => string(13) "FDYC2RCG8WM5S"
    ["payment_date"] => string(25) "12:22:12 Aug 08, 2018 PDT"
    ["payment_status"] => string(9) "Completed"
    ["charset"] => string(12) "windows-1252"
    ["first_name"] => string(5) "*******"
    ["mc_fee"] => string(4) "0.66"
    ["notify_version"] => string(3) "3.9"
    ["custom"] => string(32) "re8By7GnvsIM-HBNnvZqrQif18HasKOO"
    ["payer_status"] => string(8) "verified"
    ["business"] => string(17) "***********"
    ["quantity"] => string(1) "1"
    ["verify_sign"] => string(56) "A9l4ETRyLUdh4pMcT8Qiai1RIHsMAddI3UpWnYe1AysxWhEyFnEM1Nkn"
    ["payer_email"] => string(23) "************"
    ["txn_id"] => string(17) "83E77500AV184783K"
    ["payment_type"] => string(7) "instant"
    ["last_name"] => string(8) "*********"
    ["receiver_email"] => string(17) "***********"
    ["payment_fee"] => string(4) "0.66"
    ["shipping_discount"] => string(4) "0.00"
    ["receiver_id"] => string(13) "QNK3BM8SEKD8J"
    ["insurance_amount"] => string(4) "0.00"
    ["txn_type"] => string(10) "web_accept"
    ["item_name"] => string(45) "Donation Campaign: Annual Goal (***********)"
    ["discount"] => string(4) "0.00"
    ["mc_currency"] => string(3) "USD"
    ["item_number"] => string(0) ""
    ["residence_country"] => string(2) "US"
    ["shipping_method"] => string(7) "Default"
    ["transaction_subject"] => string(0) ""
    ["payment_gross"] => string(5) "10.00"
    ["ipn_track_id"] => string(13) "721dbb1e2822d"
  }
}
 
I still don't get this, and I have to rebuild the donation cache every time to get the donations to show up only on the widget. Are you SURE this is working, because it makes no sense that everything else on the website would update, but not this widget.
I am getting this error repeatedly, which seems to be linked to the initial campaign I had to disable (removed email and names):

Code:
Server error log
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'message' at row 1 src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account Aug 9, 2018 at 11:03 AM
Stack trace
INSERT  INTO `xf_thdonate_donation` (`user_id`, `campaign_id`, `amount`, `purchase_request_key`, `message`, `donation_date`, `anonymous`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, '22007')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, '22007')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_thdonate_don...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/ThemeHouse/Donate/Service/Donate.php(63): XF\Mvc\Entity\Entity->save()
#7 src/addons/ThemeHouse/Donate/Purchasable/Campaign.php(197): ThemeHouse\Donate\Service\Donate->donate()
#8 src/XF/Payment/AbstractProvider.php(164): ThemeHouse\Donate\Purchasable\Campaign->completePurchase(Object(XF\Payment\CallbackState))
#9 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#10 {main}
Request state
array(4) {
  ["url"] => string(40) "/payment_callback.php?_xfProvider=paypal"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["_xfProvider"] => string(6) "paypal"
  }
  ["_POST"] => array(33) {
    ["mc_gross"] => string(5) "10.00"
    ["protection_eligibility"] => string(10) "Ineligible"
    ["payer_id"] => string(13) "FDYC2RCG8WM5S"
    ["payment_date"] => string(25) "12:22:12 Aug 08, 2018 PDT"
    ["payment_status"] => string(9) "Completed"
    ["charset"] => string(12) "windows-1252"
    ["first_name"] => string(5) "*******"
    ["mc_fee"] => string(4) "0.66"
    ["notify_version"] => string(3) "3.9"
    ["custom"] => string(32) "re8By7GnvsIM-HBNnvZqrQif18HasKOO"
    ["payer_status"] => string(8) "verified"
    ["business"] => string(17) "***********"
    ["quantity"] => string(1) "1"
    ["verify_sign"] => string(56) "A9l4ETRyLUdh4pMcT8Qiai1RIHsMAddI3UpWnYe1AysxWhEyFnEM1Nkn"
    ["payer_email"] => string(23) "************"
    ["txn_id"] => string(17) "83E77500AV184783K"
    ["payment_type"] => string(7) "instant"
    ["last_name"] => string(8) "*********"
    ["receiver_email"] => string(17) "***********"
    ["payment_fee"] => string(4) "0.66"
    ["shipping_discount"] => string(4) "0.00"
    ["receiver_id"] => string(13) "QNK3BM8SEKD8J"
    ["insurance_amount"] => string(4) "0.00"
    ["txn_type"] => string(10) "web_accept"
    ["item_name"] => string(45) "Donation Campaign: Annual Goal (***********)"
    ["discount"] => string(4) "0.00"
    ["mc_currency"] => string(3) "USD"
    ["item_number"] => string(0) ""
    ["residence_country"] => string(2) "US"
    ["shipping_method"] => string(7) "Default"
    ["transaction_subject"] => string(0) ""
    ["payment_gross"] => string(5) "10.00"
    ["ipn_track_id"] => string(13) "721dbb1e2822d"
  }
}
If you continue to experience issues, please don't hesitate to create a ticket on our support portal so that we can take a closer look.
 
Are you using NGINX, and haven't chown the permissions? Or have you some old IPN setup in PayPal that is sending data incorrectly.
I am running NGINX and I have no IPN's set up.

What perms on what file(s)? I don't remember seeing any of that in the faq or anywhere else in the thread.
 
When you upload to NGINX your ownership is normally root, it has to be nginx, otherwise files will not have permission to interact with one another via NGINX.

Usually: chown -R nginx:nginx /path/to/public/webfiles
 
When you upload to NGINX your ownership is normally root, it has to be nginx, otherwise files will not have permission to interact with one another via NGINX.

Usually: chown -R nginx:nginx /path/to/public/webfiles
Oh, yeah that's all owned by nginx of course. I thought you said chmod and I wasn't expecting anything to need execute permissions.

It's really not a super big deal and they will get to it when they get to it. I don't doubt that the addon is fine and I have something messed up.
 
I am getting this error repeatedly, which seems to be linked to the initial campaign I had to disable (removed email and names):

Code:
Server error log
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'message' at row 1 src/XF/Db/AbstractStatement.php:212
Generated by: Unknown account Aug 9, 2018 at 11:03 AM
Stack trace
INSERT  INTO `xf_thdonate_donation` (`user_id`, `campaign_id`, `amount`, `purchase_request_key`, `message`, `donation_date`, `anonymous`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, '22007')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, '22007')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_thdonate_don...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/ThemeHouse/Donate/Service/Donate.php(63): XF\Mvc\Entity\Entity->save()
#7 src/addons/ThemeHouse/Donate/Purchasable/Campaign.php(197): ThemeHouse\Donate\Service\Donate->donate()
#8 src/XF/Payment/AbstractProvider.php(164): ThemeHouse\Donate\Purchasable\Campaign->completePurchase(Object(XF\Payment\CallbackState))
#9 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#10 {main}
Request state
array(4) {
  ["url"] => string(40) "/payment_callback.php?_xfProvider=paypal"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["_xfProvider"] => string(6) "paypal"
  }
  ["_POST"] => array(33) {
    ["mc_gross"] => string(5) "10.00"
    ["protection_eligibility"] => string(10) "Ineligible"
    ["payer_id"] => string(13) "FDYC2RCG8WM5S"
    ["payment_date"] => string(25) "12:22:12 Aug 08, 2018 PDT"
    ["payment_status"] => string(9) "Completed"
    ["charset"] => string(12) "windows-1252"
    ["first_name"] => string(5) "*******"
    ["mc_fee"] => string(4) "0.66"
    ["notify_version"] => string(3) "3.9"
    ["custom"] => string(32) "re8By7GnvsIM-HBNnvZqrQif18HasKOO"
    ["payer_status"] => string(8) "verified"
    ["business"] => string(17) "***********"
    ["quantity"] => string(1) "1"
    ["verify_sign"] => string(56) "A9l4ETRyLUdh4pMcT8Qiai1RIHsMAddI3UpWnYe1AysxWhEyFnEM1Nkn"
    ["payer_email"] => string(23) "************"
    ["txn_id"] => string(17) "83E77500AV184783K"
    ["payment_type"] => string(7) "instant"
    ["last_name"] => string(8) "*********"
    ["receiver_email"] => string(17) "***********"
    ["payment_fee"] => string(4) "0.66"
    ["shipping_discount"] => string(4) "0.00"
    ["receiver_id"] => string(13) "QNK3BM8SEKD8J"
    ["insurance_amount"] => string(4) "0.00"
    ["txn_type"] => string(10) "web_accept"
    ["item_name"] => string(45) "Donation Campaign: Annual Goal (***********)"
    ["discount"] => string(4) "0.00"
    ["mc_currency"] => string(3) "USD"
    ["item_number"] => string(0) ""
    ["residence_country"] => string(2) "US"
    ["shipping_method"] => string(7) "Default"
    ["transaction_subject"] => string(0) ""
    ["payment_gross"] => string(5) "10.00"
    ["ipn_track_id"] => string(13) "721dbb1e2822d"
  }
}

It appears someone tried to use an emoji (or other unicode character) in the message. Usually these should be blocked by XF if you don't have unicode support enabled, but I suspect you have the line in your config.php file to enable full unicode support but haven't run the CLI command to convert your tables. You can find more details on how to set this up here

I have yet to have a donation that is done through the forum report back and put the donation in. I am doing them all manually.

https://www.firesofheaven.org/donate

You guys have my info already from other tickets :D

Can you go to your AdminCP -> Logs -> Payment provider logs and see if anything is being logged there? Do you have any XF User Upgrades setup, if so are these working and if not can you set one up and try signing up for it yourself to see if that works?

If nothing is being logged in XenForo and/or user upgrades aren't working most likely you'll need to enable IPN in your PayPal account.

If all else fails, create a new ticket with admin details and we'll have a look, sensitive data is removed from tickets after a certain amount of time so we likely won't be able to see the passwords on your older tickets :)
 
but I suspect you have the line in your config.php file to enable full unicode support but haven't run the CLI command to convert your tables.
No, did this at upgrade before installing emoji's. Your XF1 table would have been present when this was done, as I upgraded to XF2 donate after the emoji CLI was run. This seems to be a pre-upgrade transaction causing the issue / attempted transaction, as it was not logged in your donation logs.

I searched it out in the DB, nothing either, to confirm things and all.

I can run it again... if you think that is the issue with this past transaction.
 
The error is definitely coming from the field having an incorrect charset, so it's possible that for some reason running that command didn't run on this table, I actually haven't personally tested that. When the table is created it'll use the charset based on XF options (either utf8 or utf8mb4). I'll have a look into the CLI command to see if there is anything we need to do specifically to support when that runs :)
 
Oh, so you ran the command before the XF upgrade, this may be related. Can you try running it again and see if you're able to use emoji in donation messages?
 
Yep, it ran over donate and two from Andy, all of which were xf1 upgrades:

[1/5] xf_andy_email_log... Done
[2/5] xf_andy_history... Done
[3/5] xf_thdonate_campaign... Done
[4/5] xf_thdonate_donation... Done
[5/5] xf_thdonate_milestone... Done
 
If nothing is being logged in XenForo and/or user upgrades aren't working most likely you'll need to enable IPN in your PayPal account.
Yup, for some reason I guess IPN was setup in an old way where I didn't need a business account. I had to upgrade to a business account to find the IPN settings and fix that and it works now.

I did a test on doing a refund and it doesn't push that information back, I am sure that's a bit more than this can handle but if it should be handling refunds let me know and I will give you guys a ticket to look at it.
 
I haven't tested the upgraded version, but pretty sure refunds were handled, in that it kicked back to remove the user from the upgraded group.
 
I haven't tested the upgraded version, but pretty sure refunds were handled, in that it kicked back to remove the user from the upgraded group.
Yeah I might be a dot behind, it has never ever happened but I had someone send a payment and then I immediately refunded it and thought to myself "self, check and see if that logged it on xenfor" and it had not.
 
Back
Top Bottom