IMP Allow API testing

Mailcertificado has a test API and a production one. With this change you can use both depending on the test flag.