• Resolved delsey

    (@delsey)


    Just wondering if anyone has any experience of programatically creating an invoice from within PHP – I would like to send an invoice automatically when a post of a certain type is created, and the hook into the IPN event to know when it has been paid and update the post status.

    Anyone done anything like this using Sprout?

    https://www.ads-software.com/plugins/sprout-invoices/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Dan Cameron

    (@dancameron)

    programatically creating an invoice from within PHP – I would like to send an invoice automatically when a post of a certain type is created

    SI_Invoice::create_invoice is the function to use to create an invoice.

    and the hook into the IPN event to know when it has been paid and update the post status

    Sprout Invoices does not use IPN, instead it uses Paypal’s API to get the status of the payment. This is more secure and trustworthy since IPN is horrible. Anyway, you can hook into when the invoice status changes to complete; whenever a new payment is added to an invoice the hook si_new_payment is available.

Viewing 1 replies (of 1 total)
  • The topic ‘Can you create an invoice from PHP’ is closed to new replies.