Giter Site home page Giter Site logo

conekta-android's Introduction

conekta

Conekta sdk

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.1.0
  • Package version: 6.0.3
  • Generator version: 7.5.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/conekta/openapi/issues

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/conekta/conekta-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/conekta/conekta-python.git)

Then import the package:

import conekta

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import conekta

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import conekta
from conekta.rest import ApiException
from pprint import pprint

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = conekta.Configuration(
    access_token = os.environ["API_KEY"]
)


# Enter a context with an instance of the API client
with conekta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = conekta.CustomersApi(api_client)
    customer = conekta.Customer(
        email='[email protected]',
        name='Customer Name',
        phone='5534343434'
    ) # Customer | requested field for create Customer
    accept_language = 'es' # str | Use for knowing which language to use (optional) (default to 'es')

    try:
        # Create Customer
        api_response = api_instance.create_customer(customer, accept_language=accept_language)
        print("The response of CustomersApi->create_customer:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CustomersApi->create_customer: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.conekta.io

Class Method HTTP request Description
AntifraudApi create_rule_blacklist POST /antifraud/blacklists Create blacklisted rule
AntifraudApi create_rule_whitelist POST /antifraud/whitelists Create whitelisted rule
AntifraudApi delete_rule_blacklist DELETE /antifraud/blacklists/{id} Delete blacklisted rule
AntifraudApi delete_rule_whitelist DELETE /antifraud/whitelists/{id} Delete whitelisted rule
AntifraudApi get_rule_blacklist GET /antifraud/blacklists Get list of blacklisted rules
AntifraudApi get_rule_whitelist GET /antifraud/whitelists Get a list of whitelisted rules
ApiKeysApi create_api_key POST /api_keys Create Api Key
ApiKeysApi delete_api_key DELETE /api_keys/{id} Delete Api Key
ApiKeysApi get_api_key GET /api_keys/{id} Get Api Key
ApiKeysApi get_api_keys GET /api_keys Get list of Api Keys
ApiKeysApi update_api_key PUT /api_keys/{id} Update Api Key
BalancesApi get_balance GET /balance Get a company's balance
ChargesApi get_charges GET /charges Get A List of Charges
ChargesApi orders_create_charge POST /orders/{id}/charges Create charge
ChargesApi update_charge PUT /charges/{id} Update a charge
CompaniesApi get_companies GET /companies Get List of Companies
CompaniesApi get_company GET /companies/{id} Get Company
CustomersApi create_customer POST /customers Create customer
CustomersApi create_customer_fiscal_entities POST /customers/{id}/fiscal_entities Create Fiscal Entity
CustomersApi delete_customer_by_id DELETE /customers/{id} Delete Customer
CustomersApi get_customer_by_id GET /customers/{id} Get Customer
CustomersApi get_customers GET /customers Get a list of customers
CustomersApi update_customer PUT /customers/{id} Update customer
CustomersApi update_customer_fiscal_entities PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} Update Fiscal Entity
DiscountsApi orders_create_discount_line POST /orders/{id}/discount_lines Create Discount
DiscountsApi orders_delete_discount_lines DELETE /orders/{id}/discount_lines/{discount_lines_id} Delete Discount
DiscountsApi orders_get_discount_line GET /orders/{id}/discount_lines/{discount_lines_id} Get Discount
DiscountsApi orders_get_discount_lines GET /orders/{id}/discount_lines Get a List of Discount
DiscountsApi orders_update_discount_lines PUT /orders/{id}/discount_lines/{discount_lines_id} Update Discount
EventsApi get_event GET /events/{id} Get Event
EventsApi get_events GET /events Get list of Events
EventsApi resend_event POST /events/{event_id}/webhook_logs/{webhook_log_id}/resend Resend Event
LogsApi get_log_by_id GET /logs/{id} Get Log
LogsApi get_logs GET /logs Get List Of Logs
OrdersApi cancel_order POST /orders/{id}/cancel Cancel Order
OrdersApi create_order POST /orders Create order
OrdersApi get_order_by_id GET /orders/{id} Get Order
OrdersApi get_orders GET /orders Get a list of Orders
OrdersApi order_cancel_refund DELETE /orders/{id}/refunds/{refund_id} Cancel Refund
OrdersApi order_refund POST /orders/{id}/refunds Refund Order
OrdersApi orders_create_capture POST /orders/{id}/capture Capture Order
OrdersApi update_order PUT /orders/{id} Update Order
PaymentLinkApi cancel_checkout PUT /checkouts/{id}/cancel Cancel Payment Link
PaymentLinkApi create_checkout POST /checkouts Create Unique Payment Link
PaymentLinkApi email_checkout POST /checkouts/{id}/email Send an email
PaymentLinkApi get_checkout GET /checkouts/{id} Get a payment link by ID
PaymentLinkApi get_checkouts GET /checkouts Get a list of payment links
PaymentLinkApi sms_checkout POST /checkouts/{id}/sms Send an sms
PaymentMethodsApi create_customer_payment_methods POST /customers/{id}/payment_sources Create Payment Method
PaymentMethodsApi delete_customer_payment_methods DELETE /customers/{id}/payment_sources/{payment_method_id} Delete Payment Method
PaymentMethodsApi get_customer_payment_methods GET /customers/{id}/payment_sources Get Payment Methods
PaymentMethodsApi update_customer_payment_methods PUT /customers/{id}/payment_sources/{payment_method_id} Update Payment Method
PayoutOrdersApi create_payout_order POST /payout_orders Create payout order
PayoutOrdersApi get_payout_order_by_id GET /payout_orders/{id} Get Payout Order
PayoutOrdersApi get_payout_orders GET /payout_orders Get a list of Payout Orders
PlansApi create_plan POST /plans Create Plan
PlansApi delete_plan DELETE /plans/{id} Delete Plan
PlansApi get_plan GET /plans/{id} Get Plan
PlansApi get_plans GET /plans Get A List of Plans
PlansApi update_plan PUT /plans/{id} Update Plan
ProductsApi orders_create_product POST /orders/{id}/line_items Create Product
ProductsApi orders_delete_product DELETE /orders/{id}/line_items/{line_item_id} Delete Product
ProductsApi orders_update_product PUT /orders/{id}/line_items/{line_item_id} Update Product
ShippingContactsApi create_customer_shipping_contacts POST /customers/{id}/shipping_contacts Create a shipping contacts
ShippingContactsApi delete_customer_shipping_contacts DELETE /customers/{id}/shipping_contacts/{shipping_contacts_id} Delete shipping contacts
ShippingContactsApi update_customer_shipping_contacts PUT /customers/{id}/shipping_contacts/{shipping_contacts_id} Update shipping contacts
ShippingsApi orders_create_shipping POST /orders/{id}/shipping_lines Create Shipping
ShippingsApi orders_delete_shipping DELETE /orders/{id}/shipping_lines/{shipping_id} Delete Shipping
ShippingsApi orders_update_shipping PUT /orders/{id}/shipping_lines/{shipping_id} Update Shipping
SubscriptionsApi cancel_subscription POST /customers/{id}/subscription/cancel Cancel Subscription
SubscriptionsApi create_subscription POST /customers/{id}/subscription Create Subscription
SubscriptionsApi get_all_events_from_subscription GET /customers/{id}/subscription/events Get Events By Subscription
SubscriptionsApi get_subscription GET /customers/{id}/subscription Get Subscription
SubscriptionsApi pause_subscription POST /customers/{id}/subscription/pause Pause Subscription
SubscriptionsApi resume_subscription POST /customers/{id}/subscription/resume Resume Subscription
SubscriptionsApi update_subscription PUT /customers/{id}/subscription Update Subscription
TaxesApi orders_create_taxes POST /orders/{id}/tax_lines Create Tax
TaxesApi orders_delete_taxes DELETE /orders/{id}/tax_lines/{tax_id} Delete Tax
TaxesApi orders_update_taxes PUT /orders/{id}/tax_lines/{tax_id} Update Tax
TokensApi create_token POST /tokens Create Token
TransactionsApi get_transaction GET /transactions/{id} Get transaction
TransactionsApi get_transactions GET /transactions Get List transactions
TransfersApi get_transfer GET /transfers/{id} Get Transfer
TransfersApi get_transfers GET /transfers Get a list of transfers
WebhookKeysApi create_webhook_key POST /webhook_keys Create Webhook Key
WebhookKeysApi delete_webhook_key DELETE /webhook_keys/{id} Delete Webhook key
WebhookKeysApi get_webhook_key GET /webhook_keys/{id} Get Webhook Key
WebhookKeysApi get_webhook_keys GET /webhook_keys Get List of Webhook Keys
WebhookKeysApi update_webhook_key PUT /webhook_keys/{id} Update Webhook Key
WebhooksApi create_webhook POST /webhooks Create Webhook
WebhooksApi delete_webhook DELETE /webhooks/{id} Delete Webhook
WebhooksApi get_webhook GET /webhooks/{id} Get Webhook
WebhooksApi get_webhooks GET /webhooks Get List of Webhooks
WebhooksApi test_webhook POST /webhooks/{id}/test Test Webhook
WebhooksApi update_webhook PUT /webhooks/{id} Update Webhook

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Author

[email protected]

conekta-android's People

Contributors

dinerdaniel avatar erickcta avatar fcarrero avatar javiermurillo avatar karlarobinson avatar leofischer avatar mauriciomurga avatar picharras avatar richpeniche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conekta-android's Issues

Maven Command

Cuando corro el comando para instalar la librería me arroja lo siguiente:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[ERROR] The specified file '/home/jupazave/AndroidStudioProjects/MobileTerminal/app/libs/tokenizer-release.aar' not exists
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.529 s
[INFO] Finished at: 2015-05-21T19:04:59-05:00
[INFO] Final Memory: 6M/159M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The specified file '/home/jupazave/AndroidStudioProjects/MobileTerminal/app/libs/tokenizer-release.aar' not exists -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

NO work

When converting this code to Kotlin it doesn't work,

Type mismatch: inferred type is but Token.CreateToken! was expected

token.onCreateTokenListener(new Token.CreateToken() {
@OverRide
public void onCreateTokenReady(JSONObject data) {
showTokenResult(data);
}
});

Proguard y conekta-android

Buenas tardes, hay alguna configuración especial de proguard que se tenga que agregar para poder utilizarlo con Conekta? ya que estoy estoy intentado generar el token pero me arroja un error que dice: "El recurso no ha sido encontrado".

el token no existe

Cuando intento generar una tarjeta tokenizada para almacenarla en los paymentSources,
al devolverla esta devuelve "el token no existe"
pero si intento con tarjeta de un solo uso, entonces me deja proceder con la compra normalmente

[Solicitud de documentación] Error ApacheLogging

Al momento de ejecutar la version 2.1

E  FATAL EXCEPTION: AsyncTask #2
   Process: mx.com.sfinx.jal.misaldo, PID: 4584
   java.lang.RuntimeException: An error occurred while executing doInBackground()
   	at android.os.AsyncTask$4.done(AsyncTask.java:415)
   	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
   	at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:269)
   	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
   	at java.lang.Thread.run(Thread.java:1012)
   Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory;
   	at org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:182)
   	at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:150)
   	at io.conekta.conektasdk.Connection$Task.doInBackground(Connection.java:48)
   	at io.conekta.conektasdk.Connection$Task.doInBackground(Connection.java:43)
   	at android.os.AsyncTask$3.call(AsyncTask.java:394)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) 
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 
   	at java.lang.Thread.run(Thread.java:1012) 
   Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.logging.LogFactory" on path: DexPathList
   	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
   	at org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:182) 
   	at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:150) 
   	at io.conekta.conektasdk.Connection$Task.doInBackground(Connection.java:48) 
   	at io.conekta.conektasdk.Connection$Task.doInBackground(Connection.java:43) 
   	at android.os.AsyncTask$3.call(AsyncTask.java:394) 
   	at java.util.concurrent.FutureTask.run(FutureTask.java:264) 
   	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) 
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 
   	at java.lang.Thread.run(Thread.java:1012) 

La solución se encuentra al añadir en AndroidManifest.xml dentro la etiquieta

    <uses-library android:name ="org.apache.http.legacy" android:required ="false"/>

Error en Conekta Android

Hola buenas noches, tengo un problema con conekta que cuando quiero tokenizar una tarjeta me sale lo siguiente en el apartado de http logs

{
"object": "error",
"type": null,
"message": "We can only process data from cards that have been properly tokenized or that come from a site that meets PCI compilance. If your site meets the standards , send a copy of your certificate and PCI [email protected] requests access.",
"message_to_purchaser": "Solamente podemos procesar datos de tarjetas que han sido tokenizadas o que provengan de sitios seguros que cumplan los estándares de PCI.",
"param": null,
"code": "processing_error"
}

al principio si funcionaba pero despues me dio este problema... segun yo toma el certificado (que no deberia) de conekta java

agradezco la atención

Conekta SDK on api 9

Buenas tardes, tengo una pregunta, el SDK que ustedes proveen puede trabajar en API 9??

Android 9- El recurso no encotrado

the object customer "cus_XXXXXXXX" could not be found

Al instlar al aplicación en un telefono con version 9.0 no pasa el cargo,
Pero en otras versiones si pasa me pueden ayudar

Proguard Expecting java type before ';'

Hola, estoy implementado conekta en una aplicación android con compileSdkVersion 27, minSdkVersion 19 y targetSdkVersion 26 y hago uso de proguard, agregue la regla a mi archivo:

-keep class com.conekta.** { ; }

Pero al momento de generar el apk firmado me da el error:

Warning: Exception while processing task java.io.IOException: proguard.ParseException: Expecting java type before ';' in line 24 of file 'C:\Users\user\StudioProjects\myapp\app\proguard-rules.pro'

¿Cual es la regla correcta para implementarlo?

ClassNotFoundException: Didn't find class "org.apache.http.message.BasicNameValuePair"

I had a problem using the conekta library on Android 9.

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/message/BasicNameValuePair; at io.conekta.conektasdk.Token.create(Token.java:41) at com.caffenio.app.fragments.payment.SummaryPaymentFragment.tokenizeCard(SummaryPaymentFragment.java:577) at com.caffenio.app.fragments.payment.SummaryPaymentFragment.lambda$onViewCreated$1(SummaryPaymentFragment.java:166)

Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.message.BasicNameValuePair" on path: DexPathList[[zip file "/data/app/

I fix the problem adding the next lines on android manifest

android:usesCleartextTraffic="true"
on application

and inside
<uses-library android:name="org.apache.http.legacy" android:required="false" />

https://imgur.com/hbtwrIA

I hope someone who has the same problem could fix it

Best regards

authentication_error

No puedo crear un token con la referencia de Android.

El error obtenido es el siguiente:

{"object":"error","type":"authentication_error","message":"Unauthorized access, please check the permissions of your key for this call.","message_to_purchaser":"Acceso no autorizado.","param":null,"code":"authentication_error","validation_error":null}

El token utilizado es: key_eYvWV7gSDkNYXsmr (El mismo de la documentación)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.