AfRApay.Web: Make transactions idempotent #12
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
hw/MateCard
invalid
meta
missing core feature
question
sw/FTM
sw/Web
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AfRA/AfRApay#12
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/idempotency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First rule of networking is the network is unreliable. Sometimes things get
lost, sometimes it gets found multiple times for TCP reasons or because a
browser tries to be clever.
And when you're dealing with money, even if it's monopoly money, you don't
want a duplicated request to mean a double-debit. The easiest way to do this
is to simply include an idempotency key with each request - if that key is
repeated, the request is ignored.
This changes the database schema, and I can't be arsed adding a migration at this point, so you gotta reset your databases. @zotan @enbyfoxen
0862f8e0da
to211107f0c6
5f7125c783
to63669c6188