Switch to doPayment() and stop using deprecated doTransferCheckout()
CiviCRM will start outputting deprecated warnings from 5.39: https://github.com/civicrm/civicrm-core/pull/20384 and the function has been deprecated for a while.
All core processors have now been changed over - see example: https://github.com/civicrm/civicrm-core/pull/20328
You need to check for 0 amount and return payment_status/payment_status_id. Paypal is the only core processor that was using doTransferCheckout
and you can see a "quick and dirty" initial refactor that allowed us to remove it here: https://github.com/civicrm/civicrm-core/pull/20030