i have function to validate financial transactions and another one for push notification and client side logs... the fact is on event trigger in the financial transaction i m listen to creat and update and the log should listen to those transaction to logs them... creat then update the same document => the log will be written with the last doc status.. i need the first one is Pending until is Completed...
i have a payment gateway on the server side; if the admin allows auto funding for the user the payement will be processed and credit to the client account directly if not it will be pending until review and approval.
the pay triggers => Pending status
the approve triggers => Completed status
the issue is the logs function is writing both transaction with Completed ... and not having the time to bind the first one and inject the second one.