Closed mattbk closed 6 years ago
We require a credit card to set up a gift initially, right?
No! There's just a gentle reminder. We should make this a hard rule, because otherwise what's the point?
I'd also go so far (once this is fixed) as to email everyone who is giving but doesn't have a card set up to tell them that they aren't actually giving and need to set a card up.
@whit537 can you query how many ~users are giving but don't have a credit card set up?
I think it would be something like
SELECT username
, balance
, (SELECT SUM(amount) FROM payment_instructions WHERE participant_id = p.id) AS giving
, (SELECT COUNT(*) FROM payment_instructions WHERE participant_id = p.id AND amount > 0) AS ngiving_to
FROM participants p
WHERE ( -- They do not have a credit card set up
SELECT COUNT(*)
FROM exchange_routes r
WHERE r.participant = p.id
AND r.network = 'balanced-cc'
) = 0
AND giving > 0
AND NOT is_closed
ORDER BY claimed_time
Modified from https://github.com/gratipay/gratipay.com/blob/992bf1bf03d256931f97a31dad8de6e254e43a29/www/dashboard/index.spt#L10.
(188 rows)
Was my query right?
I didn't dig that deep, I just ran it. 🐭
Are you feeling okay? Is now the time for me to submit PRs without tests? ;-)
I mean, I skimmed it for UPDATE
DELETE
and INSERT
. :P
On FD, someone wasn't paying in every 10 weeks on a $1/week donation. Turns out they didn't have a credit card set up.
These are all the banner notifications, yes? https://github.com/gratipay/gratipay.com/blob/4b5b0b3e287424a3e5b4179d49eddac44064f7e4/gratipay/utils/notifications.py
(Most of these I can dig up, just writing the questions down to come back to.)
todo