|firstname.lastname@example.org||# Posted on May 3, 2018 at 2:32 am|
Ah okay, you learn something new every day, thanks 🙂
I’ve now inspected the $payment and $transaction objects that is passed to the hook (AHEE__EE_Payment_Processor__update_txn_based_on_payment__successful), and I can see all the data that I need there. But it is protected, So I’ve tried using get_first_event public method located in the EE_Payment class in order to get the data:
But this still isn’t working, even though it is a public method.
The thing is I want this to happen every time there is a successful payment applied to the transaction, either VIA bank transfer (applied from the backend) or from a payment gateway. So I wouldn’t necessarily know the ID of the transaction.