Jump to content

localapi: UpdateInvoice vs AddInvoicePayment


mauzilla

Recommended Posts

we're in process of writing a module for SagePay that handles debit orders. When we draw a daily statement from SagePay, we want to mark invoices off as paid which is listed in the daily debit order statement. I already have a key relationship between the statement and the invoices, but I am not sure which option in the localAPI to make use of. To be clear, we want to mark the invoice off as paid (much like one would do by clicking the button within WHMCS). It makes more logical sense to make use of the AddInvoicePayment to pay for the invoice, however ...

 

As the debit order may also bounce (which we will only be notified by in future dated statements) we also want the ability to mark invoices as unpaid say 2 days later. For that I could not find a convinience method to achieve and it makes more sense in using UpdateInvoice for that purpose to set the invoice as status unpaid which hopefully will update the amount due back to original value (if not, please advise how this would need to work).

 

Am I correct? If not, what would be the best way forward in managing this process where we need to mark and unmark invoices as paid via the localAPI.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated