Make create_secret() and create_order() return objects rather than dicts
and get metadata before returning

Create unittests for those two functions

Turn debug log messages off by default