How can I access the TXN_ID in the following object with PHP? Below is a print_r of the object:
$txn_object = $txn_params[last_payment];
error_log( print_r($txn_object,true) );
I get this in the error log:
EE_Payment Object
(
[_props_n_values_provided_in_constructor:protected] => Array(
[PAY_ID] => 4168
[TXN_ID] => 746919
[STS_ID] => PAP
[PAY_timestamp] => 2017-08-29 14:06:26
[PAY_source] => CART
[PAY_amount] => 24.000
[PMD_ID] => 11
[PAY_gateway_response] => submitted_for_settlement
[PAY_txn_id_chq_nmbr] => 96g71gxv
[PAY_po_number] =>
[PAY_extra_accntng] =>
[PAY_details] =>
)
)
I've tried a few things, but can't seem to get that value but comes back blank:
$txn_object->_props_n_values_provided_in_constructor[0]->TXN_ID