Can anybody tell me which function in Merchant posts an order total after validating the credit card number?
Look at the last function in merchant.mv After it authorizes payment, it runs the fulfillment modules (eg email notification, customer record update, order history update, or any other modules you might have as fulfillment). So by the time the fulfillment modules run, the l.total variable is valid.