工艺商务插件如何在工艺cms中生成引用ID

I have query regarding a commerce plugin which if anybody has solution it will be great help for me. We created a plugin for payment which extends commerce plugin in Craft CMS. But the transaction done through our plugin is failing because of an "invalid payment id." If a user does a transaction through the payment methods present in commerce, then it is successful. Reference ids generated by commerce plugin have a certain standard format like tr_UVDTDEFMB6 but in the case of our plugin, I am unable to do find where and how such reference id generates.

There is one method in Commerce_PaymentsService.php

private function _sendRequest($request, $transaction)
{
   $response = $request->send();//this generates transaction number and stores in db
}

How does $request->send() process? Please help me to find solution.

Thank You!