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

Don't allow debit for specific users #5

Open
cristan opened this issue Sep 30, 2018 · 0 comments
Open

Don't allow debit for specific users #5

cristan opened this issue Sep 30, 2018 · 0 comments

Comments

@cristan
Copy link
Owner

cristan commented Sep 30, 2018

You're bound to run in to customers where paying is really troublesome. For this, you should be able to indicate they can't have any credit.

For this you'll need 2 features

Indicating that a user can't have any credit
This should be a regular boolean property of a customer.

Disallow ordering when applicable
After determining whether the user can order at all, we should now check if the user is allowed to have a debit, and when he/she doesn't, we should disable any products which would make this user have a credit below €0. This needs to be done every time a user is selected, a product is added or a product is deleted.

Checking server side
To prevent hacking attempts, we should not only check client side, but server side as well. If a user like this creates a transaction which would cause her/him to have a debit, the server should return an error.

@cristan cristan changed the title Don't allow debit for some users Don't allow debit for specific users Sep 30, 2018
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