Adding Ticket Number On A Total Price

Hello i need for your help,

Conditions :

I have 2 payment, it is offline processor and credit card processor.

I have successfully add the ticket number on my offline processor, so when the total price is 125000 and the ticket number (which is 2 digit random) is 74 then it will save to database as 125074.

I succesfully integrated like this

1. Go to /app/functions/fn_calculate_cart_content on line 2695 find

$cart['options_style'] = $options_style; 
$cart['products'] = !empty($cart['products']) ? $cart['products'] : array();

2. After that line, add this

$cart['random'] = rand(pow(10, $digits-1), pow(10, $digits)-1); 

3. Next, on line 2985 find

$cart['subtotal'] = fn_format_price($cart['subtotal']); 
$cart['display_subtotal'] = fn_format_price($cart['display_subtotal']); 
$cart['total'] += $cart['tax_subtotal']; 

4. after that add this line

//shipping + random 
$cart['total'] = fn_format_price($cart['total'] + $cart['shipping_cost'] + $cart['random']); 

5. Last, dont forget to add $digits = 2 the function at line 2679

function fn_calculate_cart_content(&$cart, $auth, $calculate_shipping = 'A', $calculate_taxes = true, $options_style = 'F', $apply_cart_promotions = true, $digits = 2) { 

But the trouble with that way is my credit card processor doesnt allow me to include any "strange" value. I learn that cs cart only one variable using $cart['total'] to sent total price on order

My question is how can i solve that situation, i am really rookie programmer.

Basicly i want the order total value would be separated in value so if someone buy using offline processor it will display the ticket number and save it to database, and if using credit card payment it will display normally like it was (without ticket number) . How can i approach this?

I have 2 temporary theory

1. I post value on .tpl file to a database (how can i do that?)

2. I create other $cart['total'] and separated the payment

Please if you know, help me on this. Really appreciate that :)