Support » Plugin: Sliced Invoices - WordPress Invoice Plugin » Custom gateway, how to send emails?

  • Resolved Patrick Buntsma

    (@duisterdenhaag)


    Hi 🙂

    Am I creating my own custom online payment gateway. It works extremely different from the built-in PayPal, so I couldn’t really use that as a reference… I’ve got everything working (payment page, payment link, customer can pay online, webhook is correctly called, invoice status (term) is correctly updated, invoice history is updated, etc.)

    The only thing I cannot get to work, is sending out emails for “payment_received” to admin and client.

    I tried looking on your Developer section, but nothing helped me there. 🙁

    Could you please provide a hook or (better yet) a snippet to trigger the payment received emails, please?

    Many thanks in advance,
    Patrick.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Worked it out myself.

    Plugin Author SlicedInvoices

    (@slicedinvoices)

    I think this is what you are looking for:

    do_action( 'sliced_send_payment_notification', $id, $status );

    where $id = the post ID of the invoice, and $status = the payment status (probably ‘success’)

    Hope that helps!

    Best,
    David

    Plugin Author SlicedInvoices

    (@slicedinvoices)

    Oops… I had this browser tab open since yesterday and didn’t see your most recent message until after I submitted my reply. Glad you were able to work it out already. Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom gateway, how to send emails?’ is closed to new replies.