-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(order, types): Add Credit Line to order module #10636
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
38b9c25
to
5e16844
Compare
Upon adding a credit line, the order total and the pending difference will increase making it possible for the merchant | ||
to request the customer for a payment for an arbitrary reason, or prepare the order balance sheet to then allow |
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.
question: I wouldn't have expected credit lines to be used for additional payments, only refunds–can you expand on this?
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.
Good catch, this was incorrectly written - I had changed this in my current branch. Will port over the changes in a bit.
pending_difference
is what the customer needs to pay to settle the difference. If a credit line has been issued, the credit_line_total
needs to be subtracted from pending_difference
to accurately depict what should happen, which is not happening in this branch.
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.
That sounds right yeah
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.
Do you want to update this branch or do it in a follow up?
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 do either. Making good progress rn, so focusing on not hindering that flow. 😄
@Property({ | ||
columnType: "text", | ||
nullable: true, | ||
}) | ||
reference: string | null = null | ||
|
||
@Property({ | ||
columnType: "text", | ||
nullable: true, | ||
}) | ||
reference_id: string | null = null |
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.
question: How will these references be used in practise?
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.
Its the resource that will be the enabler of this operation, in this case payment-collection and its id.
We can scope it down to payments or refunds, but that would require creating multiple credit lines, which I can't see a benefit for.
* feat(order, types): Add Credit Line to order module * chore: add action to inject credit lines
what: