Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

payments: maintain financial data consistency in the face of db errors #5

Open
aszs opened this issue May 7, 2014 · 0 comments
Open

Comments

@aszs
Copy link
Member

aszs commented May 7, 2014

  1. schema changes:

    a. add "prepare" to financialtransaction.status enum

    b. update the user schema so lastCharge is a reference to a financial transaction not a date.

  2. create records in the following order:

    a. the financial instrument, if error on save, return

    b. the financial transaction with status set to "prepare", if error on save, return

    c. save the user's payment plan with a reference to the transaction object, if error on save, return

    d. issue the debit with balanced

    e. update the transaction with success or failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant