How do I manually code an atomic transaction, given the following
1. User need to pay a fine.
2. User log into the system.
3. User click the pay button.
4. User pay by a custom payment methods called NETS (system operated
through telephone line, in Singapore; it is not direct connection to a
databse, but somekind of services.)
5. Payment/NETS transaction done; transaction cannot rollback after
6. System would update the database to indicate the fine have been
But step 6 might fail. How do I ensure that all the steps is in
one single ...