-
Notifications
You must be signed in to change notification settings - Fork 33
fix: additional payments #435
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narekcat sorry, I forgot to mention one more thing.
If we process a payment with days = 0
then amount
is required to be provided and it must be more than 0
. Otherwise, if I try to process a payment with days = 0
there would be an internal server error:
So if we are trying to create a payment with days = 0
we should validate that amount
is provided and it's more than 0
otherwise return error: "amount" has to be provided when processing additional payment for 0 days
. It's preferable to use Joi validation for this if possible https://github.com/topcoder-platform/taas-apis/blob/dev/src/services/ResourceBookingService.js#L358-L365.
Could you please add this validation? I would increase payment for the task to $30.
Hi @maxceem . Ok, I am already working on it. |
@maxceem . I have fixed that issue, please check it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narekcat looks like it doesn't work:
Let me clarify.
If days
and/or amount
is not provided - it's calculated automatically. This was already implemented.
The only thing we are changing now, is that we allow providing days = 0
(before we didn't allow this). So now we only should allow providing days = 0
, but if we provide days = 0
then we should require providing amount > 0
because when days =0
we cannot calculate amount
automatically anymore.
@maxceem , I have fixed that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narekcat thanks for the quick update, works well now.
No description provided.