Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Custom code during payments

Kushal Patel   ( User )

Commented 6 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 Dulici   ( Admin )

Commented 6 years ago

Hello,


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

Kushal Patel   ( User )

Commented 6 years ago

Thanks.


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

Denis Dulici   ( Admin )

Commented 6 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 )

Commented 6 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.

Showing 1 to 5 of 5 discussions