can someone give a sample implementation of 3d secure for an ecommerce application?
Implementation depends on payment gateway providers. you will have to contact their support or check their manual for it.
I have worked with "The Logic Group" and BT payment gateway providers in UK so if you are using one of these then let me know I can be of some help.