Save Ubercart order in database, processed through custom payment gateway
You do not need to implement that hook. 

First you need to be sure whether the payment service method is gateway or redirect. Depending on this, the payment complete function is different.

Within that function, regardless how it is implemented, here is a list of functions that are helpful.


uc_cart_complete_sale() 



  This function is utilized by the default checkout system and can be
  used by third party checkout integration modules to complete a sale.



uc_order_comment_save() 


to leave comments in the order regarding the payment outcome, as well as watchdog()


uc_payment_enter()



  This function logs a payment for an order in the payment receipts table.