Custom code during payments

Posted in CategoryDevelopment
  • Kushal Patel    ( User ) 2 years ago

    Hi there,

    I'd like a bit of assistance if possible;

    I'd like to add a custom function (slack notification) when a payment is being entered.

    Could you point me to the correct location (php file) where I could throw this in? I dont mind it being hardcoded for now.

  • Denis Duliçi    ( Admin ) 2 years ago


    You should listen to the App\Events\InvoicePaid event.

  • Kushal Patel    ( User ) 2 years ago


    Correct path that worked was app/Http/Controllers/Incomes/Invoices.php

  • Denis Duliçi    ( Admin ) 2 years ago

    You should not hack the core files, all changes will be lost after update. Instead, you should listen to the event I referred to.

  • Kushal Patel    ( User ) 2 years ago

    True, core files shouldn't be touched, I'll have to update them with each of your updates, because I cannot figure out how else to get it working.

    Any code I put into the /App/events/invoicepaid didn't seem to run at all.

    Or I don't know how to use this file. I'm just running a simle curl line, but it wasn't triggering. Any advice on that?


Please login or register to leave a response.