Wrapper to connect with https://api.conekta.io.
npm install conekta
This last release works with API 2, if you are using 1.0 type:
npm install [email protected]
var conekta = require('conekta');
conekta.api_key = '9YxqfRnx4sMQDnRsqdYn';
conekta.locale = 'es';
conekta.Order.create({
"currency": "MXN",
"customer_info": {
"name": "Jul Ceballos",
"phone": "+5215555555555",
"email": "[email protected]"
},
"line_items": [{
"name": "Box of Cohiba S1s",
"unit_price": 35000,
"quantity": 1
}],
"charges": [{
"payment_method": {
"type": "card",
"token_id": "tok_test_visa_4242"
}
}]
}).then(function (result) {
console.log(result.toObject())
}, function (error) {
console.log(error)
})
Conekta.Order.create
Conekta.Order.update
Conekta.Order.find
Conekta.Order.where
Conekta.Order.createCharge
Conekta.Order.createLineItem
Conekta.Lineitem.update
Conekta.Order.createTaxLine
Conekta.TaxLine.update
Conekta.Order.createShippingLine
Conekta.ShippingLine.update
Conekta.Order.createDiscountLine
Conekta.DiscountLine.update
Conekta.Customer.create
Conekta.Customer.update
Conekta.Customer.find
Conekta.Customer.where
Conekta.Customer.destroy
Conekta.Customer.createSource
Conekta.Source.update
Conekta.Customer.createShippingContact
Conekta.ShippingContact.update
Please see https://developers.conekta.com/api?language=node for up-to-date documentation.
$ git clone https://github.com/conekta/conekta-node
$ cd conekta-node
$ npm install
$ bin/console
Welcome to Conekta node console!
Help: exit() to quit
> conekta.api_key = '9YxqfRnx4sMQDnRsqdYn';
'9YxqfRnx4sMQDnRsqdYn'
> conekta.locale = 'es';
'es'
>
$ npm test
We love pull requests, send them from your fork to branch dev into conekta/conekta-node
Developed in Mexico by Conekta. Available with MIT License.
-
Fork the repository
-
Clone the repository
git clone [email protected]:yourUserName/conekta-node.git
- Create a branch
git checkout develop
git pull origin develop
# You should choose the name of your branch
git checkout -b <feature/my_branch>
- Make necessary changes and commit those changes
git add .
git commit -m "my changes"
- Push changes to GitHub
git push origin <feature/my_branch>
-
Submit your changes for review, create a pull request
To create a pull request, you need to have made your code changes on a separate branch. This branch should be named like this: feature/my_feature or fix/my_fix.
Make sure that, if you add new features to our library, be sure that corresponding unit tests are added.
If you go to your repository on GitHub, you’ll see a Compare & pull request button. Click on that button.
If you are a comfortable working with a range of backend languages (Java, Python, Ruby, PHP, etc) and frameworks, you have solid foundation in data structures, algorithms and software design with strong analytical and debugging skills, check our open positions: https://www.conekta.com/careers