We should consider what happens if information about a donation is written to the database before we know the donation succeeded. How do we know it's a valid donation? The easiest solution I see is to write the donation before paying with the status pending. Once we get acknowledgment, we simply update the status to complete.
Regarding parallel bids, I can't remember what I was thinking of then. Maybe it'll occur to me later.
...But we could handle that later, I suppose.
Anyway, before going forward with this system, we should ask ourselves this: do we need to be able to handle refunds?
Potential situations I can see are:
- Someone donates too much by mistake.
- Someone wants to retract their donation.
- They donate for something, but someone else donates over them. These donations are done in parallel, so the lower donor couldn't have anticipated it. What if that lower donor wants to increase his/her bid? Do we enable/allow incremental donations that ups their total donation towards something or give them a refund so they can donate a higher sum?
- What if someone donates for something that isn't possible or the runner rejects? Like playing on a too high difficulty? Should we manually have to approve these or offer a refund?
I think this is a important question. If we don't need refunds, we can use the current system. But if we do, then this system is probably not enough.
After that, I think, it is appropriate to discuss what exactly we want the script to do before starting to implement everything.
Regarding parallel bids, I can't remember what I was thinking of then. Maybe it'll occur to me later.
...But we could handle that later, I suppose.
Anyway, before going forward with this system, we should ask ourselves this: do we need to be able to handle refunds?
Potential situations I can see are:
- Someone donates too much by mistake.
- Someone wants to retract their donation.
- They donate for something, but someone else donates over them. These donations are done in parallel, so the lower donor couldn't have anticipated it. What if that lower donor wants to increase his/her bid? Do we enable/allow incremental donations that ups their total donation towards something or give them a refund so they can donate a higher sum?
- What if someone donates for something that isn't possible or the runner rejects? Like playing on a too high difficulty? Should we manually have to approve these or offer a refund?
I think this is a important question. If we don't need refunds, we can use the current system. But if we do, then this system is probably not enough.
After that, I think, it is appropriate to discuss what exactly we want the script to do before starting to implement everything.