In my payment plugin I want to update the order_transcation.custom_fields field on checkout-finish page. I want to put in it the provider Transaction ID. I read into the Dev guide how to update into the DB, but can not do it in real life. I inject in my class Order-Transaction repository the try update like this:
$resp = $this->orderTransactionRepo->update([ [ 'id' => $transaction->getOrderTransaction()->getId(), 'customFields' => 'some_number_here' ] ], $context);
The first error was my first parameter must be an array so I change it like this:
'id' => [$transaction->getOrderTransaction()->getId()]
other errors start appear and I never made it.
Any ideas how to do it?