E-commerce websites are entirely lawful when used to test mobile applications using fictitious credit card numbers. However, if you use it for scamming or hacking, it will be against the law, and you can face the repercussions. So it entirely depends on your purpose.