-
Notifications
You must be signed in to change notification settings - Fork 2
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
🐛(backend) fix installment update #1036
Conversation
b538b06
to
cb4794e
Compare
self._do_on_payment_failure(order, installment["id"]) | ||
return False | ||
|
||
order.set_installment_refused(installment["id"]) |
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.
I wonder if we should not continue to set the installment to refused
state only if an UNPAID
transaction is found. But we should continue to iterate over the transactions list.
Actually, if a transaction has never been debited, its state will be set to refused
first.
# Mail is sent | ||
self._check_installment_refused_email_sent(owner.email, order) | ||
# No mail is sent | ||
self.assertEqual(mail.outbox, []) | ||
|
||
mail.outbox.clear() |
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.
Can we take away this line too ?
mail.outbox.clear()
json_response["answer"]["transactions"].append( | ||
json_response["answer"]["transactions"][0] | ||
) | ||
json_response["answer"]["transactions"] = [] |
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.
json_response["answer"]["transactions"].append( | |
json_response["answer"]["transactions"][0] | |
) | |
json_response["answer"]["transactions"] = [] | |
json_response["answer"]["transactions"] = [] |
When backend checks if an installment has already been paid, it should return True | ||
if the payment has been made and should update the installment state to paid. | ||
Last transaction is paid. |
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.
When backend checks if an installment has already been paid, it should return True | |
if the payment has been made and should update the installment state to paid. | |
Last transaction is paid. | |
When backend checks if an installment has already been paid, it should return False | |
if the no payment has been made and should not update the installment state. | |
No transaction paid. |
When we check for installemnt payment after retrying, only the first transaction was taken into account.
9a95030
to
cc4e48e
Compare
Purpose
When we check for installemnt payment after retrying, only the first transaction was taken into account.