diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..655d63d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Dependency directories +*/node_modules/* +node_modules/* diff --git a/README.md b/README.md index 3af00b7..719adce 100644 --- a/README.md +++ b/README.md @@ -1 +1,123 @@ -# NodeExampleAPI2 \ No newline at end of file +# Conekta integration node.js example + +This example shows a simple integration with Conekta API 2.0.0 + +## Getting Started + +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. + +### Prerequisites + + +You will need an actualized version of node and npm installed. + +In case you do not have the environment with node and npm, please refer to official documentation: + +``` +https://docs.npmjs.com/downloading-and-installing-node-js-and-npm + +``` + +You will also need Conekta API keys + +You can create a free account in minutes and use your sandbox API keys + +Create your account here: + +https://auth.conekta.com/sign_up + +### Set up this repo + +A step by step series of examples that tell you how to get a development env running + +Step 1. Clone the repo + +``` +git clone https://github.com/conekta-examples/NodeExampleAPI2.git +``` +Step 2. Install dependencies + + +Run the following command + +``` +npm install + +``` + +Step 3. Change your API keys + +You need + +Change your private Conekta API key + +Go to app.js file and change your private API key + +``` +var conekta = require('conekta'); +conekta.api_key = 'YOUR_PRIVATE_API_KEY'; +conekta.api_version = '2.0.0'; + +``` + +Now go to views/newCard.ejs + +In line 47 + +``` + + + + + + + + +<% include partials/footer %> \ No newline at end of file diff --git a/views/orden.ejs b/views/orden.ejs new file mode 100644 index 0000000..adf2117 --- /dev/null +++ b/views/orden.ejs @@ -0,0 +1,11 @@ +<% include partials/header %> +
+
+

Tu orden se ha enviado correctamente

+
+ Go HOME +
+
+
+ +<% include partials/footer %> \ No newline at end of file diff --git a/views/oxxo.ejs b/views/oxxo.ejs new file mode 100644 index 0000000..34dba7a --- /dev/null +++ b/views/oxxo.ejs @@ -0,0 +1,31 @@ +<% include partials/header %> + +
+
+
+

Oxxo

+

Visualiza tus referencias de pago generadas aqui

+

+ Add new oxxo order + Go HOME +

+

+

+
+
+ + +
+ <% oxxo.forEach(function(oxxo){ %> +
+
+
+

<%= oxxo.ref %>

+
+
+
+ <% }); %> +
+
+ +<% include partials/footer %> \ No newline at end of file diff --git a/views/oxxonew.ejs b/views/oxxonew.ejs new file mode 100644 index 0000000..18666b4 --- /dev/null +++ b/views/oxxonew.ejs @@ -0,0 +1,25 @@ +<% include partials/header %> +
+
+

Crea un nuevo pedido

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ Go HOME +
+
+
+ +<% include partials/footer %> \ No newline at end of file diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs new file mode 100644 index 0000000..aa1c9d6 --- /dev/null +++ b/views/partials/footer.ejs @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/views/partials/header.ejs b/views/partials/header.ejs new file mode 100644 index 0000000..c702b26 --- /dev/null +++ b/views/partials/header.ejs @@ -0,0 +1,22 @@ + + + + Conekta + + + + + \ No newline at end of file diff --git a/views/spei.ejs b/views/spei.ejs new file mode 100644 index 0000000..71a646f --- /dev/null +++ b/views/spei.ejs @@ -0,0 +1,31 @@ +<% include partials/header %> + +
+
+
+

SPEI

+

Visualiza tus clabes de pago aqui

+

+ Add new spei order + Go HOME +

+

+

+
+
+ + +
+ <% spei.forEach(function(spei){ %> +
+
+
+

<%= spei.clabe %>

+
+
+
+ <% }); %> +
+
+ +<% include partials/footer %> \ No newline at end of file diff --git a/views/speinew.ejs b/views/speinew.ejs new file mode 100644 index 0000000..91fd616 --- /dev/null +++ b/views/speinew.ejs @@ -0,0 +1,25 @@ +<% include partials/header %> +
+
+

Crea un nuevo pedido

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ Go HOME +
+
+
+ +<% include partials/footer %> \ No newline at end of file