I don't think those need to be transactions they can be done with atomic operations
- Adding to a shopping basket is adding a row to a table which is atomic (same for deletions)
- topping up a online credit is "UPDATE credit_balance SET credit=new_value WHERE credit=expected_old_value AND user_id=this_user", which is atomic and then check the number of affected rows is 1.
- Adding to a shopping basket is adding a row to a table which is atomic (same for deletions)
- topping up a online credit is "UPDATE credit_balance SET credit=new_value WHERE credit=expected_old_value AND user_id=this_user", which is atomic and then check the number of affected rows is 1.