refactor bitpagos controller.