Create Service Charge Transaction

i want to automatically create accounts transaction:

Orderline Visible Price * 0.1

add this amounts to account

how can this be done ???