-
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) signature backend new endpoint to get signature state of a signing procedure #925
base: dev
Are you sure you want to change the base?
✨(backend) signature backend new endpoint to get signature state of a signing procedure #925
Commits on Sep 19, 2024
-
✨(backend) add order states and flow for the new sales tunnel
New order states are needed for the new sales tunnel: - ORDER_STATE_ASSIGNED - ORDER_STATE_TO_SAVE_PAYMENT_METHOD - ORDER_STATE_TO_SIGN - ORDER_STATE_TO_SIGN_AND_TO_SAVE_PAYMENT_METHOD
Configuration menu - View commit details
-
Copy full SHA for a069e59 - Browse repository at this point
Copy the full SHA a069e59View commit details -
Revert "👔(backend) favor author organization at organization order as…
…signment" This reverts commit ce938db.
Configuration menu - View commit details
-
Copy full SHA for de7f0e9 - Browse repository at this point
Copy the full SHA de7f0e9View commit details -
Revert "💩(backend) reassign organization for pending orders"
This reverts commit 35893fc.
Configuration menu - View commit details
-
Copy full SHA for 8e5e312 - Browse repository at this point
Copy the full SHA 8e5e312View commit details -
♻️(backend) assign orga in order create endpoint
With the new sale tunnel, we need to assign an organization directly on order creation.
Configuration menu - View commit details
-
Copy full SHA for 429c6ac - Browse repository at this point
Copy the full SHA 429c6acView commit details -
♻️(backend) add ProductTargetCourseRelation on order creation
As order submit endpoint will be removed, we set ProductTargetCourseRelation directly on order creation.
Configuration menu - View commit details
-
Copy full SHA for 22a4d85 - Browse repository at this point
Copy the full SHA 22a4d85View commit details -
♻️(backend) create main invoice in order create endpoint
As a main invoice is created at the first payment scgedule installment, we create it at order creation, and use it to store the billing address.
Configuration menu - View commit details
-
Copy full SHA for 210ecf5 - Browse repository at this point
Copy the full SHA 210ecf5View commit details -
♻️(backend) aadd credit card to order factory
We want to store the chosen credit card in an order, and use it to trigger scheduled payments.
Configuration menu - View commit details
-
Copy full SHA for 3ab5f70 - Browse repository at this point
Copy the full SHA 3ab5f70View commit details -
🔥(backend) remove order abort endpoint
As pending order state will be deleted, the abort endpoint will be useless.
Configuration menu - View commit details
-
Copy full SHA for 4332346 - Browse repository at this point
Copy the full SHA 4332346View commit details -
🔥(backend) remove order submit endpoint
As payment process is being rewritten, the submit endpoint will be useless.
Configuration menu - View commit details
-
Copy full SHA for 7cf816c - Browse repository at this point
Copy the full SHA 7cf816cView commit details -
🔥(backend) remove order validate endpoint
As validate order state will be deleted, the validate endpoint will be useless.
Configuration menu - View commit details
-
Copy full SHA for 81a5a81 - Browse repository at this point
Copy the full SHA 81a5a81View commit details -
🔥(backend) remove payment from submit transition
As the submit transition will be removed, the code executed in it is removed, and the tests are accordingly modified.
Configuration menu - View commit details
-
Copy full SHA for bc50182 - Browse repository at this point
Copy the full SHA bc50182View commit details -
🔥(backend) remove validated state usage
As the validated order state will not be used anymore, its usage has been removed.
Configuration menu - View commit details
-
Copy full SHA for ca26ab5 - Browse repository at this point
Copy the full SHA ca26ab5View commit details -
🔥(backend) remove order.submit
As order.submit content has been removed, we can delete it.
Configuration menu - View commit details
-
Copy full SHA for b006281 - Browse repository at this point
Copy the full SHA b006281View commit details -
🔥(backend) remove unused flow transitions
As some order flows has been removed, we can delete them.
Configuration menu - View commit details
-
Copy full SHA for de08fce - Browse repository at this point
Copy the full SHA de08fceView commit details -
🔥(backend) migrate order states
As the unused states have been removed, we have to add a database migration to replace them. Strings are used here to allow us to delete them from our enums module.
Configuration menu - View commit details
-
Copy full SHA for bbff8e0 - Browse repository at this point
Copy the full SHA bbff8e0View commit details -
🔥(backend) remove pending flow transition
Pending order state transition will not be used anymore.
Configuration menu - View commit details
-
Copy full SHA for 866d526 - Browse repository at this point
Copy the full SHA 866d526View commit details -
🔥(backend) remove validated state
Validated order state is not used anymore.
Configuration menu - View commit details
-
Copy full SHA for 2ccca30 - Browse repository at this point
Copy the full SHA 2ccca30View commit details -
🔥(backend) remove submitted state
Submitted state is not used anymore.
Configuration menu - View commit details
-
Copy full SHA for 64bfe0a - Browse repository at this point
Copy the full SHA 64bfe0aView commit details -
A test (probably randomized somewhere) was missing an object database refresh.
Configuration menu - View commit details
-
Copy full SHA for f30399f - Browse repository at this point
Copy the full SHA f30399fView commit details -
As we now have many test which contains asserts in loop, using subtests allows to continue the test to run, even if one of the assert fails.
Configuration menu - View commit details
-
Copy full SHA for d52e442 - Browse repository at this point
Copy the full SHA d52e442View commit details -
✅(backend) fix submit signature order test
This test was wrong with our new states. Subtest usage is introduced here. Also reverse path usage has been replaced by real path.
Configuration menu - View commit details
-
Copy full SHA for 41fba57 - Browse repository at this point
Copy the full SHA 41fba57View commit details -
✅(backend) use subtest in test loops
To ensure all cases are tested, even if one fails, subtest is added.
Configuration menu - View commit details
-
Copy full SHA for 778e92e - Browse repository at this point
Copy the full SHA 778e92eView commit details -
🎨(backend) cleanup order state flow
Order conditions and transitions were grouped by type. They are now grouped by usage, which make the code easier to read.
Configuration menu - View commit details
-
Copy full SHA for 40b73cf - Browse repository at this point
Copy the full SHA 40b73cfView commit details -
🩹(backend) fix pending transition conditions
Order state pending transition was missing source targets. We can actually go from assigned, to_sign, to_save_payment_method, and to_sign_and_to_save_payment_method to pending.
Configuration menu - View commit details
-
Copy full SHA for 9b8f8f6 - Browse repository at this point
Copy the full SHA 9b8f8f6View commit details -
🩹(backend) fix _post_transition_success state check
Order state _post_transition_success was missing source states to create an enrollment.
Configuration menu - View commit details
-
Copy full SHA for 2187fd7 - Browse repository at this point
Copy the full SHA 2187fd7View commit details -
Many things needs to be done before using the new states. Each of them are noted as TODO.
Configuration menu - View commit details
-
Copy full SHA for b3192c2 - Browse repository at this point
Copy the full SHA b3192c2View commit details -
👔(backend) update contract queryset
Contracts returned by the GenericContractViewSet queryset needs to be updated with the new state.
Configuration menu - View commit details
-
Copy full SHA for 86eab7e - Browse repository at this point
Copy the full SHA 86eab7eView commit details -
🔨(backend) add pylint ignore todos
As TODOs are used temporarily, CI linting needs to ignore them. Also, convenient make tasks have been added.
Configuration menu - View commit details
-
Copy full SHA for d68c7e8 - Browse repository at this point
Copy the full SHA d68c7e8View commit details -
✅(backend) fix another flaky test
As a test needs unique email generated, those provided by faker may collide.
Configuration menu - View commit details
-
Copy full SHA for f32247e - Browse repository at this point
Copy the full SHA f32247eView commit details -
💬(backend) fix order cancel error message
As states changed, an error message needed to be updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for fca63c0 - Browse repository at this point
Copy the full SHA fca63c0View commit details -
👔(backend) update filter nested order course
Orders returned by the NestedOrderCourseViewSet queryset needs to be updated with the new state.
Configuration menu - View commit details
-
Copy full SHA for 26c470e - Browse repository at this point
Copy the full SHA 26c470eView commit details -
💬(backend) fix order submit_for_signature error message
As states changed, an error message needed to be updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for 7ae5eaf - Browse repository at this point
Copy the full SHA 7ae5eafView commit details -
💡(backend) add todo for complete flow update
TODO added for triying to add more transitions to flow.update().
Configuration menu - View commit details
-
Copy full SHA for 9e0e87b - Browse repository at this point
Copy the full SHA 9e0e87bView commit details -
🩹(backend) check billing address before order assign
Order assign transition needs a billing address when creating the main invoice. If not present, the transition should fail.
Configuration menu - View commit details
-
Copy full SHA for 2b191d4 - Browse repository at this point
Copy the full SHA 2b191d4View commit details -
✅(backend) fix order.submit_for_signature test
Since user enrollment is not done at signature anymore, a test needs to be apdated accordingly.
Configuration menu - View commit details
-
Copy full SHA for 0076bac - Browse repository at this point
Copy the full SHA 0076bacView commit details -
A TODO was added to check if we need to set an enrollment in the LMS before unenrolling a user. As we need to keep it, the TODO is removed.
Configuration menu - View commit details
-
Copy full SHA for f81a65e - Browse repository at this point
Copy the full SHA f81a65eView commit details -
♻️(backend) rework flow.update
Order states stransitions related to payment weren't managed by flow.update. Now, in our code, everytime we want to change the order state, calling flow.update will suffice.
Configuration menu - View commit details
-
Copy full SHA for ea5a8f4 - Browse repository at this point
Copy the full SHA ea5a8f4View commit details -
♻️(backend) simplify order._set_installment_state
As all the states are managed in flow.update, we do not need to check if the current updated installment is the first or the last one.
Configuration menu - View commit details
-
Copy full SHA for 9a78159 - Browse repository at this point
Copy the full SHA 9a78159View commit details -
♻️(backend) rename flow.assign
As flow.assign is doing more than setting the order state to assign, and as it has to be called the first on an order lifetime, it has been renamed to init.
Configuration menu - View commit details
-
Copy full SHA for 7f99be8 - Browse repository at this point
Copy the full SHA 7f99be8View commit details -
🔥(backend) remove to_sign_and_to_save_payment order state
As we are simplifying the order state flow by signing contract before saving a payment method, the to_sign_and_to_save_payment state is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for 3bd6fab - Browse repository at this point
Copy the full SHA 3bd6fabView commit details -
♻️(backend) simplify flow.update
The order flowupdate method can be simplified.
Configuration menu - View commit details
-
Copy full SHA for 31b30c2 - Browse repository at this point
Copy the full SHA 31b30c2View commit details -
♻️(backend) extract assign transition
For clarity in the order state flow, we extract the assign transition from the init method.
Configuration menu - View commit details
-
Copy full SHA for dc739e0 - Browse repository at this point
Copy the full SHA dc739e0View commit details -
As the branch names have changed, the CI job needs to be updated as well.
Configuration menu - View commit details
-
Copy full SHA for 7d0d817 - Browse repository at this point
Copy the full SHA 7d0d817View commit details -
♻️(backend) deprecate
has_consent_to_terms
for Order modelFrom now on, the terms and conditions (CGV in French) must be specific to each organization. We can no longer use a global version for the entire platform. These terms will be included directly in the contract's context, so the Order model no longer needs to track user acceptance, as this will happen during contract signing. Fix #816
Configuration menu - View commit details
-
Copy full SHA for dbc1c3c - Browse repository at this point
Copy the full SHA dbc1c3cView commit details -
🎨(backend) update context for contract for terms and conditions
The terms and conditions will be written and stored in the contract definition body field. There's no need to prepare them separately for the contract context anymore. We've updated the generation of context by removing the key `terms_and_conditions` in the preparation. In this commit, we have also updated the contract definition html template for the section "Appendices". The use of `SiteConfig` to prepare terms and conditions in html is now deprecated.
Configuration menu - View commit details
-
Copy full SHA for edbed89 - Browse repository at this point
Copy the full SHA edbed89View commit details -
✅(backend) fix flow order tests
Fix flow order tests after merging main.
Configuration menu - View commit details
-
Copy full SHA for a04e486 - Browse repository at this point
Copy the full SHA a04e486View commit details -
✨(backend) sign all contracts but canceled orders
Contracts needs to be signed as soon as possible by the organizations.
Configuration menu - View commit details
-
Copy full SHA for f508e00 - Browse repository at this point
Copy the full SHA f508e00View commit details -
🧑💻(backend) add new order factory
Our order tests often needs related objects to be created. A new order factory takes care of this, depending on the order state.
Configuration menu - View commit details
-
Copy full SHA for 9b7a75d - Browse repository at this point
Copy the full SHA 9b7a75dView commit details -
✨(backend) generate payment schedule before signing
The order payment schedule needs to be generated before signing the contract.
Configuration menu - View commit details
-
Copy full SHA for 0afa232 - Browse repository at this point
Copy the full SHA 0afa232View commit details -
✨(backend) create order contract on init_flow
The order contract needs to be created before the signature submission.
Configuration menu - View commit details
-
Copy full SHA for 8a8027f - Browse repository at this point
Copy the full SHA 8a8027fView commit details -
🐛(backend) update order state after student signature
Once the student signs a contract, the order state needs to be updated.
Configuration menu - View commit details
-
Copy full SHA for 964ba45 - Browse repository at this point
Copy the full SHA 964ba45View commit details -
✨(backend) get signature reference exclude canceled orders
Signature backends should return all contracts, except for the cancelled orders.
Configuration menu - View commit details
-
Copy full SHA for 964a7f5 - Browse repository at this point
Copy the full SHA 964a7f5View commit details -
✨(backend) use product contract definition for has_unsigned_contract
The contract is created on the fly when the learner ask to sign it so we could have case where the order has no contract but there is one to sign.
Configuration menu - View commit details
-
Copy full SHA for 92f358c - Browse repository at this point
Copy the full SHA 92f358cView commit details -
✨(backend) order add payment method api endpoint
An endpoint is needed to bind a credit card to an order.
Configuration menu - View commit details
-
Copy full SHA for 8952b54 - Browse repository at this point
Copy the full SHA 8952b54View commit details -
🩹(backend) force card storage on payment
We need to force the credit card tokenization on payment. #801 (comment)
Configuration menu - View commit details
-
Copy full SHA for 6e4f0a5 - Browse repository at this point
Copy the full SHA 6e4f0a5View commit details -
✨(backend) use all enrollable order states for enroll mode
As we now allow more order states for enrollments, we use them to determine the enrollment mode used.
Configuration menu - View commit details
-
Copy full SHA for b447c3b - Browse repository at this point
Copy the full SHA b447c3bView commit details -
🩹(backend) always use installments for orders
We will always use installments for all orders.
Configuration menu - View commit details
-
Copy full SHA for b3333b9 - Browse repository at this point
Copy the full SHA b3333b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c10dbb - Browse repository at this point
Copy the full SHA 0c10dbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50906c7 - Browse repository at this point
Copy the full SHA 50906c7View commit details -
🎨(backend) installment required in payment methods
As we will always use installments for payments, all payment methods should not have an optional installment parameter, but a mandatory one.
Configuration menu - View commit details
-
Copy full SHA for 29e269e - Browse repository at this point
Copy the full SHA 29e269eView commit details -
🐛(backend) always use stockholm for installment amount
Amounts conversions to centimes using regular python types can lead to errors. Using Stockholm avoids problems.
Configuration menu - View commit details
-
Copy full SHA for debc847 - Browse repository at this point
Copy the full SHA debc847View commit details -
🐛(frontend) use new order states
As we have new order states, we need to use them in admin frontend.
Configuration menu - View commit details
-
Copy full SHA for 7b18a4b - Browse repository at this point
Copy the full SHA 7b18a4bView commit details -
✨(backend) add payment schedule to order admin api
As we want to display payment schedule in our admin frontend, we need to add it to the admin api.
Configuration menu - View commit details
-
Copy full SHA for a9ea441 - Browse repository at this point
Copy the full SHA a9ea441View commit details -
✨(frontend) add payment schedule to order view
We want to display the payment schedule in orders.
Configuration menu - View commit details
-
Copy full SHA for 4d9509b - Browse repository at this point
Copy the full SHA 4d9509bView commit details -
🐛(back) manage lyra card tokenization without order for a user
A user can tokenize a card outside any payment process and in this case no order information is receivend by the handle_notification endpoint. We have to deal with this case to create a card just linked to user and without order information
Configuration menu - View commit details
-
Copy full SHA for 25236c4 - Browse repository at this point
Copy the full SHA 25236c4View commit details -
🐛(back) fix payment debug view
The payment debug view has not been updated since backend payment signature has changed. This commit fix it and add a new case where we want to tokenize a card directly for a user without order information.
Configuration menu - View commit details
-
Copy full SHA for 5795a4d - Browse repository at this point
Copy the full SHA 5795a4dView commit details -
✨(backend) catch up on late payment schedule event
When the due date has come, the task `process_today_installment` now verifies if there are previous installments on the order that require a payment. Now, the task will trigger a payment for the installments that are in the past that are unpaid. Fix #792
Configuration menu - View commit details
-
Copy full SHA for 7fb975c - Browse repository at this point
Copy the full SHA 7fb975cView commit details -
🗃️(backend) store Order images through DocumentImage model
Currently, we are storing order images (organization logo) into json field as base64 encoded string. This is weird as it takes a lot of space in database then we duplicate images in each certificate where they are used. That's why, we decide to stop that and store Order images in a DocumentImage.
Configuration menu - View commit details
-
Copy full SHA for 4ffc432 - Browse repository at this point
Copy the full SHA 4ffc432View commit details -
🐛(backend) add signing order state
As the signature backend may take some time to validate a signature, a new state is added to properly wait for it.
Configuration menu - View commit details
-
Copy full SHA for 50992b3 - Browse repository at this point
Copy the full SHA 50992b3View commit details -
🐛(backend) realistic dummy signature behavior
Real behavior of signature provider is to set the submitted_for_signature_on when asking for a signature link, and to set student_signed_on when handle_notification is called.
Configuration menu - View commit details
-
Copy full SHA for dbadec8 - Browse repository at this point
Copy the full SHA dbadec8View commit details -
🐛(backend) update state on signature reset
When a signature is refused, we need to update the order state.
Configuration menu - View commit details
-
Copy full SHA for fbbb852 - Browse repository at this point
Copy the full SHA fbbb852View commit details -
🐛(backend) fix handle_notification of dummy signature backend
We recently remove the automatic update of contract when an API consumer request an invitation link with the dummy signature backend. That means now, the API consumer has to call manually the notification endpoint to confirm the signature but some information where missing to update properly the contract, so we complete the invitation_link method to bind missing information.
Configuration menu - View commit details
-
Copy full SHA for 011d005 - Browse repository at this point
Copy the full SHA 011d005View commit details -
🐛(frontend/admin) add support of signing order state
We recently add a new order state: "signing". But we do not update the admin application accordingly, so order views were broken when a signing order must be displayed.
Configuration menu - View commit details
-
Copy full SHA for c6d8b0f - Browse repository at this point
Copy the full SHA c6d8b0fView commit details -
👔(backend) update condition to transition order to pending_payment
Currently, an order in pending state is able to transition to pending_payment once no installment has been refused. That means we are able to transition to this state order to which we never try to pay an installment that is weird. Indeed, only orders with the first installment paid and all others installment not refused should be allowed to transition to pending_payment state
Configuration menu - View commit details
-
Copy full SHA for 1b4b656 - Browse repository at this point
Copy the full SHA 1b4b656View commit details -
✨(backend) add property has_submitted_contract to Order model
The `has_submitted_contract` returns True if the related Order has contract with field `submitted_for_signature_on` not None
Configuration menu - View commit details
-
Copy full SHA for 76ad53f - Browse repository at this point
Copy the full SHA 76ad53fView commit details -
👔(backend) prevent signing Order to go back to_sign state if submitted
Until a contract is submitted, it should not be possible to transition back to to_sign state.
Configuration menu - View commit details
-
Copy full SHA for 2d623ca - Browse repository at this point
Copy the full SHA 2d623caView commit details -
✨(backend) sort credit card per is_main then creation date
The list credit card endpoint now returns first the main credit card then all others credit cards sorted by descending creation date.
Configuration menu - View commit details
-
Copy full SHA for 0bfe52b - Browse repository at this point
Copy the full SHA 0bfe52bView commit details -
🔧(tray) add cronjob for process_payment_schedule management command
We have to add a cronjob in the tray to manage the process_payment_schedule management command.
Configuration menu - View commit details
-
Copy full SHA for 01cf1fb - Browse repository at this point
Copy the full SHA 01cf1fbView commit details -
🔧(backend) update PAYMENT_SCHEDULE_LIMITS
For product with a price less than 150, payment schedule should contain only one installment.
Configuration menu - View commit details
-
Copy full SHA for 35dba5b - Browse repository at this point
Copy the full SHA 35dba5bView commit details -
✨(backend) manage payment_schedule with certificate product
Currently, some logic were missing to be able to generate a payment schedule for a certificate product (which have no target_courses)
Configuration menu - View commit details
-
Copy full SHA for bdca6dd - Browse repository at this point
Copy the full SHA bdca6ddView commit details -
✨(backend) nestedOrderCourseViewSet filters order with binding states
The nested endpoint `courses/<course_code>/orders/` should return all order in binding states. Indeed, course manager should be able to list all learners who have subscribed to their trainings.
Configuration menu - View commit details
-
Copy full SHA for 954d4de - Browse repository at this point
Copy the full SHA 954d4deView commit details -
🔧(tray) add configMap env into db_migrate job
Currently, the env configMap volume is not mounted but we need it to be able to access to S3 Storage.
Configuration menu - View commit details
-
Copy full SHA for 9ed5803 - Browse repository at this point
Copy the full SHA 9ed5803View commit details -
🚚(tray) fix cronjob app service extension
The extension of the file to declare the cronjob process payment schedule was wrong
Configuration menu - View commit details
-
Copy full SHA for 265a5b5 - Browse repository at this point
Copy the full SHA 265a5b5View commit details -
🔥(admin) remove has_consent_to_terms
With the new workflow, the order field has_consent_to_terms has been deprecated so we can remove it from the order detail view in the BO application
Configuration menu - View commit details
-
Copy full SHA for 30d1c7d - Browse repository at this point
Copy the full SHA 30d1c7dView commit details -
✨(backend) allow to generate payment schedule for any kind of product
Currently, the payment schedule was generated on the signature submit. But this was weird as some product can have no contract and in this case, no payment schedule is generated. So in order to support this kind of product, we move the payment schedule generation logic on pending transition success.
Configuration menu - View commit details
-
Copy full SHA for 8082d2c - Browse repository at this point
Copy the full SHA 8082d2cView commit details -
👔(backend) update find_today_installments to retrieve past due payment
`find_today_installments` currently retrieve only installments which have a due_date sets to today. Instead we would like to retrieve all installements which are due to payment today.
Configuration menu - View commit details
-
Copy full SHA for ddc23a6 - Browse repository at this point
Copy the full SHA ddc23a6View commit details -
✨(backend) prevent duplicate addresses for a user or an organization
We have added a new uniqueness constraint into the model Address. A user or an organization can only have 1 address with the same values for the fields `address`, `postcode`, `city`, `country`, `first_name`, `last_name`. Fix #873
Configuration menu - View commit details
-
Copy full SHA for 4418fcf - Browse repository at this point
Copy the full SHA 4418fcfView commit details -
🐛(backend) fix payment schedule date calculation
The payment schedule dates were wrong when the withdrawal date was after the session start date.
Configuration menu - View commit details
-
Copy full SHA for 30f0fda - Browse repository at this point
Copy the full SHA 30f0fdaView commit details -
✨(backend) installment paid email mjml template
For every installment paid in a payment schedule, we trigger an email with the information about the last payment done. We needed to prepare a new MJML template for the email that is sent to the user.
Configuration menu - View commit details
-
Copy full SHA for 74b3d68 - Browse repository at this point
Copy the full SHA 74b3d68View commit details -
✨(backend) all installment paid email mjml template
When all installments are paid on the order's payment schedule, we needed to prepare a new MJML template for the email that is sent to the user summarizing all the installments paid and also confirming that the user has successfully paid every step on the payment schedule.
Configuration menu - View commit details
-
Copy full SHA for 6ec8abf - Browse repository at this point
Copy the full SHA 6ec8abfView commit details -
🧑💻(backend) debug view for installment payment email
To ease the life of our fellow developers, we have created a debug view to see the layout and how the email is rendered for installment payment that are paid.
Configuration menu - View commit details
-
Copy full SHA for c41c1d6 - Browse repository at this point
Copy the full SHA c41c1d6View commit details -
🧑💻(backend) debug view all installments paid email
To ease the life of our fellow developers, we have created a debug view to see the layout and how the email is rendered for when all the installments are paid on the payment schedule for the user.
Configuration menu - View commit details
-
Copy full SHA for db0e5cf - Browse repository at this point
Copy the full SHA db0e5cfView commit details -
✨(backend) send an email when new installment is paid
Once an installment is paid, we now send an email with the data on the payment made by the user. There are 2 different email templates, one is used when 1 installment is paid, an the other template is used when all the installments are paid on the payment schedule. Fix #862
Configuration menu - View commit details
-
Copy full SHA for ed16031 - Browse repository at this point
Copy the full SHA ed16031View commit details -
✨(backend) bind payment_schedule into OrderLightSerializer
On enrollment order resource, our api consumer needs to be able to retrieve payment schedule information so we update the OrderLightSerializer to add this field.
Configuration menu - View commit details
-
Copy full SHA for 1383619 - Browse repository at this point
Copy the full SHA 1383619View commit details -
✨(backend) installment refused debit email mjml template
When an installment debit has failed in a payment schedule, we trigger an email with the information. First, we need to create a new MJML template for this situation.
Configuration menu - View commit details
-
Copy full SHA for 5e1ab9d - Browse repository at this point
Copy the full SHA 5e1ab9dView commit details -
🧑💻(backend) debug view refused debit installment email
For our fellow developers, we have created a debug view to checkout the layout and the rendering of the email that is sent when an installment has failed to be debited.
Configuration menu - View commit details
-
Copy full SHA for c6c4d6a - Browse repository at this point
Copy the full SHA c6c4d6aView commit details -
✨(backend) send an email when installment debit refused
Once an installment debit has been refused, we send an email with the data about the failed payment in the payment schedule of the order. Fix #863
Configuration menu - View commit details
-
Copy full SHA for db63c06 - Browse repository at this point
Copy the full SHA db63c06View commit details -
✨(backend) cast due_date to date, amount to Money in payment_schedule
The `OrderPaymentScheduleDecoder` was returning a string representation of the `due_date` instead of a `datetime.date` object. The same way, it was returning a string representing the `amount` instead of a `Money` object. This behavior complicated comparisons and operations, as handling both strings and money and date objects increased the complexity. To simplify date and money handling and ensure consistency, a cast was added to the decoder, converting the string from the database into a `datetime.date` object for `due_date`, and the `amount` into a `Money` object. This change ensures that `due_date` is always a `date` object, and `amount` is always a `Money` object. It makes it easier to work with throughout the codebase. For our fellow developers, they can now freely pass strings to prepare their payment schedule with the `OrderFactory` or the `OrderGeneratorFactory` in tests, where for the fields `due_date` and `amount`, they both will be casted to their respective types after being created.
Configuration menu - View commit details
-
Copy full SHA for 29689ee - Browse repository at this point
Copy the full SHA 29689eeView commit details -
✨(backend) installment debit reminder email mjml template
When an installment debit will occur in the payment schedule of an order, we should trigger an email mentioning when the next debit will be and its amount. First, we need to create a new MJML template for the reminder of the next installment payment debit.
Configuration menu - View commit details
-
Copy full SHA for a269f08 - Browse repository at this point
Copy the full SHA a269f08View commit details -
🧑💻(backend) debug view reminder debit installment email
For our fellow developers, we have created a debug view to checkout the layout and the rendering of the reminder email that is sent when the next installment will be debited.
Configuration menu - View commit details
-
Copy full SHA for a0ffc58 - Browse repository at this point
Copy the full SHA a0ffc58View commit details -
✨(backend) send email reminder of upcoming debit installment
The new django command `send_mail_upcoming_debit` will retrieve all 'pending' state installments on orders payment schedules and send a reminder email with a certain amount of days in advance (configured with `JOANIE_INSTALLMENT_REMINDER_PERIOD_DAYS`) to the order's owner notifying them that they will be debited on their credit card. Fix #864
Configuration menu - View commit details
-
Copy full SHA for 6f8cc2e - Browse repository at this point
Copy the full SHA 6f8cc2eView commit details -
🔧(tray) add cronjob for send_mail_upcoming_debit management command
We have to add a cronjob in the tray to manage the `send_mail_upcoming_debit` management command.
Configuration menu - View commit details
-
Copy full SHA for 5bda0b5 - Browse repository at this point
Copy the full SHA 5bda0b5View commit details -
✨(backend) bind credit card info to order admin serializer
Now a credit card is linked to an order, we want to display that in our back office application to we bind this data the AdminOrderSerializer.
Configuration menu - View commit details
-
Copy full SHA for c86f34f - Browse repository at this point
Copy the full SHA c86f34fView commit details -
✨(backoffice) add utils numbers.toDigitString
Add an util to transform a number into a string. If the value is less than 10, it prefix it with a `0`
Configuration menu - View commit details
-
Copy full SHA for dd95b52 - Browse repository at this point
Copy the full SHA dd95b52View commit details -
👽️(backoffice) add credit_card field to Order resource
Now Joanie admin api returns credit card related to the order.
Configuration menu - View commit details
-
Copy full SHA for fab6a1d - Browse repository at this point
Copy the full SHA fab6a1dView commit details -
✨(backoffice) add CreditCard component
Add a presentational component to render credit card information
Configuration menu - View commit details
-
Copy full SHA for 725513c - Browse repository at this point
Copy the full SHA 725513cView commit details -
✨(backoffice) display credit card in order detail view
If an order has a payment method, we display it within the payment schedule section otherwise a warning alert message is displayed.
Configuration menu - View commit details
-
Copy full SHA for e9216ad - Browse repository at this point
Copy the full SHA e9216adView commit details
Commits on Sep 20, 2024
-
✨(backend) debit installment if due date is current day
We have added in post transition success to 'pending' state of an order that will trigger a payment to let the user have access to the course immediately when the installment's due date is on the current day. This case may happen when we generate the payment schedule and if the course has already started, the 1st installment due date of the order's payment schedule will be set to the current day. Since we only debit the next night through a cronjob, we need to be able to make the user pay to have access to his course, and avoid that the has to wait the next day to start it. Fix #913
Configuration menu - View commit details
-
Copy full SHA for ef1e8d3 - Browse repository at this point
Copy the full SHA ef1e8d3View commit details -
✨(backend) get signing progress on document for signature backends
Instead of waiting for the webhook that a document has been signed from the signature provider (the cause would be a latency to send us the notification event), we have decided to add a new endpoint on the backend signature provide to get the information if whether the student or the organization have signed the document. The new method returns a dictionary with boolean value that informs the progression of signing procedure of a document.
Configuration menu - View commit details
-
Copy full SHA for 35f1361 - Browse repository at this point
Copy the full SHA 35f1361View commit details -
🚧(backend) student_signed_on with signature provider on serializer
For the serializer client ContractLightSerializer, whether the notification from the signature provider takes some time to let us know that the student has signed, when the viewset is called, it will trigger our serializer method that will check if the student has finished signing his part on the document. That allows the frontend to get the latest information when the student gets to his dashboard of course orders.
Configuration menu - View commit details
-
Copy full SHA for 7c2897b - Browse repository at this point
Copy the full SHA 7c2897bView commit details