conekta alternatives and similar packages
Based on the "Third Party APIs" category.
Alternatively, view conekta alternatives based on common mentions on social networks and blogs.
-
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS. -
sparkpost
SparkPost client library for Elixir https://developers.sparkpost.com -
elixtagram
:camera: Instagram API client for the Elixir language (elixir-lang) -
google_sheets
Elixir library for fetching Google Spreadsheet data in CSV format -
pay_pal
:money_with_wings: PayPal REST API client for the Elixir language (elixir-lang) -
amazon_product_advertising_client
An Amazon Product Advertising API client for Elixir -
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP -
elixir_ipfs_api
The Elixir library that is used to communicate with the IPFS REST endpoint.
TestGPT | Generating meaningful tests for busy devs
Do you think we are missing an alternative of conekta or a related project?
README
Conekta Library
Wrapper to connect with https://api.conekta.io.
Setup
Installation
Add Conekta to your mix.exs
dependencies:
#mix.exs
defp deps do
[
#If you have trouble with poison add
#{:poison, "~> 3.1", override: true}
{:conekta, "~> 1.0"}
]
end
Configuration
Add your keys in your config.exs
file
# config.exs
config :conekta,
publickey: "YOUR-PUBLIC-KEY",
privatekey: "YOUR-PRIVATE-KEY"
Customers
Get
Get all current customers
#Get the last
Conekta.Customers.customers()
Create
Create a customer by passing a %Conekta.Customer{}
struct
#Create a new customer map
new_customer = %Customer{
name: "Fake Name",
email: "[email protected]",
corporate: true,
payment_sources: [%{
token_id: "tok_test_visa_4242",
type: "card"
}]
}
#Create a new customer
Conekta.Customers.create(new_customer)
Find
Find a customer by passing the unique ID
Conekta.Customers.find(id)
Delete
Delete a customer by passing the unique ID
Conekta.Customers.delete(id)
Orders
Get
Conekta.Orders.orders()
Create
#Create a new order map
new_order = %Order{currency: "MXN",
customer_info: %{
customer_id: content.id
}, line_items: [%{
name: "Product 1",
unit_price: 35000,
quantity: 1
}], charges: [%{
payment_method: %{
type: "default"
}
}]}
#Create an order
response = Conekta.Orders.create(new_order)
WebHooks
Helper function for webhook handling. check possible events
case Conekta.WebHook.received(params) do
{:charge_created, struct} -> ...
{:charge_paid, struct} -> ...
{:plan_created, struct} -> ...
{:customer_created, struct} -> ...
{:subscription_created, struct} -> ...
{:subscription_paid, struct} -> ...
{:subscription_canceled, struct} -> ...
{:chargeback_created, struct} -> ...
{:chargeback_lost, struct} -> ...
end
Test
If you want to add something new, make sure all the tests pass before making a PR
mix test
Send pull request
I would love to check new contributions to this repository. Fork from dev and do a PR into dev again.
License
Developed by Jorge Chavez. Available with MIT License.
*Note that all licence references and agreements mentioned in the conekta README section above
are relevant to that project's source code only.