-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(Invoice Ninja Node): Fix assigning an invoice to a payment #9590
base: master
Are you sure you want to change the base?
fix(Invoice Ninja Node): Fix assigning an invoice to a payment #9590
Conversation
@Joffcom Can this PR please get a review asap? It's broken functionality that's not working with the latest InvoiceNinja software and should be fixed. I made the changes as minimal invasive as possible as not to break v4 functionality. Thank you. Same applies to #9589. As it seems InvoiceNinja v5 isn't working for 1.5 years when I look at the history of #4807 . So, I would really appreciate having this reviewed and merged asap. If there's anything I can do to speed this up, please let me know. |
Hey @CodeShakingSheep, Sorry I had a week off so wasn't able to get to this one, This PR is on my list to check tomorrow morning which is one of 2 review sessions I do each week. |
Hey @Joffcom, I made the changes in my Invoice Ninja PRs as small as possible. I'd appreciate a review of these PRs asap when you have your next review session. Thank you 🙏 |
Summary
Currently, when creating a payment and specifying an invoice ID for it, the invoice isn't assigned to the payment. Instead, an unapplied payment is created in InvoiceNinja. This is because the body for the payment create request has changed in API v5, see https://api-docs.invoicing.co/#post-/api/v1/payments.
This PR fixes this by keeping the current request body for API version 4 and changes adds an invoices array to the request body for API version 5.
Related tickets and issues
None available. I just used the Invoice Ninja API node and figured that a payment is never assigned to an invoice although an
invoice_id
has been specified.Review / Merge checklist
(no-changelog)
otherwise. (conventions)