diff --git a/controllers/controllers.js b/controllers/controllers.js index 26b84d7..cd19804 100644 --- a/controllers/controllers.js +++ b/controllers/controllers.js @@ -124,11 +124,24 @@ function checkout( .catch((error) => [error.status, []]); } +function transaction(key) { + const conf = { + params: { + key: key, + } + }; + return axios + .post(HOST + "/transaction", null, conf) + .then((response) => [response.status, response.data]) + .catch((error) => [error.status, []]); +} + module.exports = { getProducts, getProduct, register, login, verify_mail, - checkout + checkout, + transaction }; \ No newline at end of file