I just tested this and can confirm that it works.
add_action(
'gform_post_payment_completed',
function( $entry, $action ) {
file_put_contents( __DIR__ . '/log.txt', print_r( $entry, true ), \FILE_APPEND );
},
10,
2
);
log.text
Array
(
[id] => 1
[form_id] => 1
[post_id] =>
[date_created] => 2023-05-26 12:44:02
[date_updated] => 2023-05-26 12:44:02
[is_starred] => 0
[is_read] => 0
[ip] => 172.20.0.1
[source_url] => https://localhost:8888/?page_id=8
[user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
[currency] => EUR
[payment_status] => Paid
[payment_date] => 23-05-26 12:44:14
[payment_amount] => 10
[payment_method] =>
[transaction_id] => tr_tyEa66hKCS
[is_fulfilled] => 1
[created_by] => 1
[transaction_type] => 1
[status] => active
[1.1] => Product Name
[1.2] => € 5,00
[1.3] => 2
)
??