GithubHelp home page GithubHelp logo

conekta / conekta-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from julsdelatierra/conekta-python

23.0 17.0 34.0 1.33 MB

Python Bindings for conekta.io

Home Page: https://developers.conekta.com

License: MIT License

Python 98.48% Makefile 0.02% Mustache 1.50%

conekta-python's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

conekta-python's Issues

"Shipment is needed for physical goods." error when processing card payment

Hi guys,

so I am using the python library to charge via credit card.
I get this error when trying to charge it:

{u'code': u'parameter_validation', u'validation_error': None, u'object': u'error', u'param': None, u'message_to_purchaser': u'Shipment is needed for physical goods.', u'message': u'Shipment is needed for physical goods.', u'type': u'parameter_validation_error'}

This is my JSON:

{
"customer": {
"corporation_name": "",
"logged_in": true,
"email": ""
},
"line_items": [

],
"referenceId": "590cbb0ca75c4d12ebdc6cf2",
"description": "Compra de ropa de mujer",
"shipping_lines": [
{
"amount": 1500,
"carrier": "mi compania"
}
],
"shipping_contact": {
"phone": "+52181818181",
"address": {
"city": "Cuahutemoc",
"residential": true,
"street1": "Calle 123 int 2 Col. Chida",
"state": "Ciudad de Mexico",
"postal_code": "06100",
"country": "MX"
},
"receiver": "Bruce Wayne"
},
"currency": "MXN",
"amount": 67500,
"billing_address": {

},
"details": {
"line_items": [
{
"sku": "BLU-BON-001-2",
"name": "Blusa bonita",
"description": "Esta blusa esta muy bonita",
"unit_price": 325,
"type": "clothing",
"quantity": 1
},
{
"sku": "BLU-BON-001-3",
"name": "Blusa bonita",
"description": "Esta blusa esta muy bonita",
"unit_price": 350,
"type": "clothing",
"quantity": 1
}
],
"billing_address": {
"city": "ensenada",
"name": "Darien",
"lastname": "Miranda",
"street2": "interior 5",
"email": "[email protected]",
"phone": "6688888888",
"state": "baja california",
"notes": "",
"street1": "1st street",
"cp": "22880",
"company": ""
},
"name": "Darien Alberto",
"phone": "6681172376",
"shipment": {
"city": "ensenada",
"name": "Darien",
"lastname": "Miranda",
"street2": "interior 5",
"email": "[email protected]",
"phone": "6688888888",
"state": "baja california",
"notes": "",
"street1": "1st street",
"cp": "22880",
"company": ""
},
"email": "[email protected]"
},
"shipment": {
"city": "ensenada",
"name": "Darien",
"lastname": "Miranda",
"street2": "interior 5",
"email": "[email protected]",
"phone": "6688888888",
"state": "baja california",
"notes": "",
"street1": "1st street",
"cp": "22880",
"company": ""
},
"card": "tok_test_visa_4242"
}

I am not sure how to specify the shipping details and the documentation is not clear about it: https://developers.conekta.com/api?language=python#order

thank you!

-Darien

No se puede eliminar un PaymentSource

Al intentar eliminar un PaymentSource con un api_key especifico ocurre un error de Autenticación:

method.delete(api_key=client.api_key)

Error:

{AuthenticationError}AuthenticationError({'details': [{'debug_message': 'Please include your access key in your request.', 'message': 'Unauthorized access.', 'code': 'conekta.errors.authentication.missing_key'}], 'object': 'error', 'type': 'authentication_error'})

Al buscar en el código de conekta/init.py, el metodo delete no envía el paramentro api_key en la llamada a super

class PaymentSource(_CreatableResource, _UpdatableResource, _DeletableResource, _FindableResource):

    def delete(self, params={}, api_key=None):
        return super(PaymentSource, self).delete(params, self.parent.payment_sources)

Además parece que al intentar eliminar un solo método de pago se eliminan todos los métodos de pago.

No se puede completar un pago con un api_key especifico

Al intentar hacer un cargo con un api_key:

conekta.Order.create(data, api_key=client.api_key)

Regresa un error:

{'debug_message': 'Please include your access key in your request.', 'message': 'Acceso no autorizado.', 'code': 'conekta.errors.authentication.missing_key'}

El cargo si es generado pero al construir una instancia Order a partir de la respuesta, el api_key no se propaga al obtener line_items en conekta/init.py linea 302:

if 'line_items' in attributes.keys():
    endpoint = 'orders/{}/line_items'.format(attributes['id'])
    response = self.load_url(endpoint,'GET',query,api_key=api_key)

En estas lineas el api_key es el establecido al nivel del modulo, no el enviado al crear Order.

En mi caso la lógica de negocio depende de usar distintos api_keys por lo tanto necesito enviar un api_key posiblemente diferente al crear cada Order.

Object of type 'method' is not JSON serializable

Hi guys!

I am having next issue trying to create a customer, it seems like the method build_http_request is failing:

This is part of the log:

Traceback (most recent call last):
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/Users/developer/web/apps/shop/views.py", line 146, in pay_order
    "type": "card"
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/conekta/__init__.py", line 227, in create
    return cls(cls.load_url(endpoint, method='POST', params=params, api_key=api_key))
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/conekta/__init__.py", line 138, in load_url
    response = cls.build_http_request(method, path, params, _api_key = api_key)
  File "/Users/developer/web/.venv/lib/python3.6/site-packages/conekta/__init__.py", line 107, in build_http_request
    body = requests.request(method, absolute_url, headers=HEADERS, verify=CA_PATH, data=json.dumps(params))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'method' is not JSON serializable

The implemented code is

customer = conekta.Customer.create({
    "name": user.get_full_name,
    "email": user.email,
    "payment_sources": [{
        "token_id": token_conekta,
        "type": "card"
    }]
})

Dependencies

Python 3.6
Django==2.2.9
conekta==2.5.1

conekta.errors.processing.undefined method credit_commission for nil:NilClass

Al intententar hacer una orden con tarjeta de credito me regresa este erro, también al crear la orden con oxxo(oxxo_comission) o con spei me genera un error parecido

orden que envio
{'currency': 'MXN', 'customer_info': {'customer_id': 'cus_2nJmd3HZ9y8zgEBov'}, 'charges': [{'payment_method': {'type': 'card', 'token_id': 'tok_test_visa_4242'}}], 'line_items': [{'name': 'Servicio de transporte de ague de 5 Mil', 'unit_price': 120000, 'quantity': 1}]}

error message que regresa
translation missing: undefined method `credit_commission' for nil:NilClass_purchaser

SSL Error

Conekta al momento de querer crear un cargo marca un error en consola sobre SSL.

File "/root/eyezoom_api/main.py", line 95, in on_post
    resp.body = json.dumps(orders.begin_order(json_["userid"], json_["email"], json_["album"], json_["mes"], json_["anio"],json_["conekta_payment"], json_["device"]))
  File "/root/eyezoom_api/orders.py", line 10, in begin_order
    charge = conekta.Order.create(conekta_payment)
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/conekta/__init__.py", line 201, in create
    return cls(cls.load_url(endpoint, method='POST', params=params, api_key=api_key))
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/conekta/__init__.py", line 112, in load_url
    response = cls.build_http_request(method, path, params, _api_key = api_key)
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/conekta/__init__.py", line 84, in build_http_request
    headers, body = request(absolute_url, method, headers=HEADERS, body=json.dumps(params))
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/root/eyezoom_api/venv/lib/python3.5/site-packages/httplib2/__init__.py", line 995, in _conn_request
    conn.connect()
  File "/usr/lib/python3.5/http/client.py", line 1260, in connect
    server_hostname=server_hostname)
  File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

Alguna idea? Simplemente marco un error sin instalar nada mas.

SSLError al crear un cliente

Estoy siguiendo los pasos de Pagos únicos con Component https://developers.conekta.com/docs/componente-de-pago

Pero al querer crear un cliente con esta librería me da un error:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.conekta.io', port=443): Max retries exceeded with url: /customers (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))

El error no sucede si uso el código de la API:

import requests

url = "https://api.conekta.io/customers"

payload = { "corporate": False }
headers = {
    "accept": "application/vnd.conekta-v2.1.0+json",
    "Accept-Language": "es",
    "content-type": "application/json",
    "authorization": "Bearer key_MySecretKeyHere"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

SSL handshake timeout, conektion reset by peer

Que tal equipo Conekta.
He econtrado que desde ayer varios métodos estan fallando al conectarse.

Este es el código que ejecuto:

import conekta  # v.2.4.0

conekta.api_key="my_llave_privada"
conekta.Customer.find("my_customer_id")

Y esta es la el traceback que obtengo:

ConnectionResetError                      Traceback (most recent call last)
<ipython-input-6-d5db867cce64> in <module>()
----> 1 conekta.Customer.find("xxxxxxxxxxx")

/var/environments/sion/lib/python3.4/site-packages/conekta/__init__.py in find(cls, _id, api_key)
    206     def find(cls, _id, api_key=None):
    207         endpoint = cls.class_url()
--> 208         return cls(cls.load_url("%s/%s" % (endpoint, _id), api_key=api_key ))
    209 
    210     @classmethod

/var/environments/sion/lib/python3.4/site-packages/conekta/__init__.py in load_url(cls, path, method, params, api_key)
    110     @classmethod
    111     def load_url(cls, path, method='GET', params=None, api_key=None):
--> 112         response = cls.build_http_request(method, path, params, _api_key = api_key)
    113         return response
    114 

/var/environments/sion/lib/python3.4/site-packages/conekta/__init__.py in build_http_request(cls, method, path, params, _api_key)
     73                     url = "%s?%s" % (absolute_url, urllib.urlencode(params, True))
     74 
---> 75             headers, body = request(url, method, headers=HEADERS)
     76         else:
     77             if params is None:

/var/environments/sion/lib/python3.4/site-packages/httplib2/__init__.py in request(self, uri, method, body, headers, redirections, connection_type)
   1320                     content = b""
   1321                 else:
-> 1322                     (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
   1323         except Exception as e:
   1324             if self.force_exception_to_status_code:

/var/environments/sion/lib/python3.4/site-packages/httplib2/__init__.py in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey)
   1070             auth.request(method, request_uri, headers, body)
   1071 
-> 1072         (response, content) = self._conn_request(conn, request_uri, method, body, headers)
   1073 
   1074         if auth:

/var/environments/sion/lib/python3.4/site-packages/httplib2/__init__.py in _conn_request(self, conn, request_uri, method, body, headers)
    993             try:
    994                 if conn.sock is None:
--> 995                     conn.connect()
    996                 conn.request(method, request_uri, body, headers)
    997             except socket.timeout:

/usr/lib/python3.4/http/client.py in connect(self)
   1229 
   1230             self.sock = self._context.wrap_socket(self.sock,
-> 1231                                                   server_hostname=server_hostname)
   1232             if not self._context.check_hostname and self._check_hostname:
   1233                 try:

/usr/lib/python3.4/ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname)
    363                          suppress_ragged_eofs=suppress_ragged_eofs,
    364                          server_hostname=server_hostname,
--> 365                          _context=self)
    366 
    367     def set_npn_protocols(self, npn_protocols):

/usr/lib/python3.4/ssl.py in __init__(self, sock, keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, do_handshake_on_connect, family, type, proto, fileno, suppress_ragged_eofs, npn_protocols, ciphers, server_hostname, _context)
    599                         # non-blocking
    600                         raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
--> 601                     self.do_handshake()
    602 
    603             except (OSError, ValueError):

/usr/lib/python3.4/ssl.py in do_handshake(self, block)
    826             if timeout == 0.0 and block:
    827                 self.settimeout(None)
--> 828             self._sslobj.do_handshake()
    829         finally:
    830             self.settimeout(timeout)

ConnectionResetError: [Errno 104] Connection reset by peer

Problemas con Update subscription

customer.subscription.update({'plan':'otro_plan'})
Traceback (most recent call last):
File "", line 1, in
File ".../conekta/init.py", line 192, in update
return self.load_via_http_request(uri, 'PUT', params, api_key=api_key)
File ".../conekta/init.py", line 148, in load_via_http_request
response = self.load_url(url, method=method, params=params, api_key=api_key)
File ".../conekta/init.py", line 111, in load_url
response = cls.build_http_request(method, path, params, _api_key = api_key)
File ".../conekta/init.py", line 101, in build_http_request
raise ResourceNotFoundError(json.loads(body))
conekta.ResourceNotFoundError: {u'log_id': u'58cc2f4bdba34d28c5899771', u'object': u'error', u'type': u'resource_not_found_error', u'details': [{u'debug_message': u'The route requested does not exist.', u'message': u'The route requested does not exist.', u'code': u'conekta.errors.resource_not_found.unknown_route'}]}

Name error for class Checkout

Line (467) of __init__.py you name the class Checkout, but in line (470) it's been initialised as super(Checkouts, self).__init__(*args, **kwargs), so when creating a checkout, the compiler responds with NameError: name 'Checkouts' is not defined.

Checkout error on create overridden function

Class Checkout inherits from _CreatableResource, which as a create(cls, params, api_key=None) method, but this method is been overridden as create(self, params, api_key=None).

When trying to create a checkout by using checkout = conekta.Checkout.create(data), the compiler responds with: TypeError: create() missing 1 required positional argument: 'params'.

Is there any reason why this create method should be called by a Checkout object or am I missing something?

Cargos con OXXOPay

Hola,

Para hacer cargos a través de su servicio OXXOPay, en su documentación aquí y aquí, se especifica que la sintaxis para crear el cargo es: conekta.Order.create. Sin embargo, al probar me arroja el sig. error: 'module' object has no attribute 'Order'. En su repo de Github solo hay ejemplos de cargos creados con el objeto client en lugar del objeto conekta, pero arroja el mismo error. Cuál es la sintaxis correcta?

Gracias!

Cambios recientes en API

Qué tal equipo Conekta,

Tengo algunas dudas acerca de unos cambios que hemos notado en nuestra empresa con respecto al funcionamiento del API, una parte de los cargos los hacíamos por medio de una función llamada.

conekta.Charge.create

Sin embargo esa función a pesar de generar el cobro ya no aparece en la documentación, notamos que cambiaron los request y ahora se maneja como una

conekta.Order.create

En este caso vemos, que el objeto a enviar cambia considerablemente y ahora la propiedad principal en vez de una tarjeta espera payment_method y dentro de ella definir que es de tipo tarjeta.

Nunca notamos el cambio de versión debido a que no vemos un log update por parte de Conekta y eso nos afectaría bastante en producción.

Mis preguntas acerca de este tema es:

  1. El método en Python de conekta.Charge.create aún seguirá en las siguientes versiones o estará como deprecated? .
  2. Por qué el atributo de unit_price es de tipo [String, Integer]? Si quiero manejar decimales en este caso es confuso tener que usar 100050 para representar "100.50"
  3. Hasta que versión la API de PHP descartará el objeto de "card" directamente en el cargo.

Saludos.

AttributeError: module 'conekta' has no attribute 'Order'

I'm trying to integrate Conekta in my webpage. I'm using Python 3 as my backend programming language, but when I import the module, I receive an error that the attribute Order nor ConektaError, as the document example provides, doesn't exist.

Here is my code:

import conekta

conekta.api_key = 'api_key' # api key development
conekta.api_version = '2.0.0'
conekta.locale = 'es'

try:
  order = conekta.Order.create({
      'line_items': [{
          'name': 'Tacos',
          'unit_price': 1000,
          'quantity': 120
      }],
      'currency': 'MXN',
      'customer_info': {
          'name': 'Brando Pérez Pacheco',
          'phone': '9981231289',
          'email': '[email protected]',
      },
      'charges': [{
          'payment_method': {
              'type': 'card',
              'token_id': 'tok_test_visa_4242'
          }
      }]

  })

  print(order)

except conekta.ConektaError as e:
  print(e.message)

This is the error:

Traceback (most recent call last):                                                                                                                  
  File "conekta.py", line 1, in <module>                                                                                                            
    import conekta                                                                                                                                  
  File "/home/Brandopp/mysite/conekta.py", line 8, in <module>                                                                                      
    conekta.Order.create({                                                                                                                          
AttributeError: module 'conekta' has no attribute 'Order'                                                                                           
03:32 ~/mysite $ python3 conekta.py                                                                                                                 
Traceback (most recent call last):                                                                                                                  
  File "conekta.py", line 1, in <module>                                                                                                            
    import conekta                                                                                                                                  
  File "/home/Brandopp/mysite/conekta.py", line 8, in <module>                                                                                      
    conekta.Order.create({                                                                                                                          
AttributeError: module 'conekta' has no attribute 'Order'```

SSLEOFError: EOF occurred in violation of protocol

Hola,

Recientemente obtengo el error mencionado, ya intenete actualizar request como meciona aqui:
psf/requests#3006 (comment) pero el problema persiste.

En algunas ocasiones genera este error, alguna idea del problema?

TraceBack

`SSLEOFError: EOF occurred in violation of protocol (_ssl.c:581)
  File "celery/app/trace.py", line 367, in trace_task
    R = retval = fun(*args, **kwargs)
  File "celery/app/trace.py", line 622, in __protected_call__
    return self.run(*args, **kwargs)
  File "wisp/tasks.py", line 637, in generar_facturas_automaticamente
    factura_cliente = crear_nueva_factura(empresa, cliente, cliente.user.perfilusuario.descuento, user_admin[0])
  File "wisp_factura/views.py", line 2293, in crear_nueva_factura
    recibo_oxxo = generar_recibo_oxxo(nueva_factura, empresa)
  File "wisp_cliente/views.py", line 767, in generar_recibo_oxxo
    "type": "oxxo_cash"
  File "conekta/__init__.py", line 201, in create
    return cls(cls.load_url(endpoint, method='POST', params=params, api_key=api_key))
  File "conekta/__init__.py", line 112, in load_url
    response = cls.build_http_request(method, path, params, _api_key = api_key)
  File "conekta/__init__.py", line 84, in build_http_request
    headers, body = request(absolute_url, method, headers=HEADERS, body=json.dumps(params))
  File "httplib2/__init__.py", line 1659, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "httplib2/__init__.py", line 1399, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "httplib2/__init__.py", line 1319, in _conn_request
    conn.connect()
  File "httplib2/__init__.py", line 1069, in connect
    self.ssl_version, self.host)
  File "httplib2/__init__.py", line 97, in _ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=hostname)
  File "gevent/_sslgte279.py", line 68, in wrap_socket
    _context=self)
  File "gevent/_sslgte279.py", line 270, in __init__
    raise x`

paquetes instalados:
requests==2.12.4
pyOpenSSL==18.0.0
ndg-httpsclient==0.5.0
conekta==2.3.4
cryptography==2.2.2
pyasn1==0.4.3

Gracias por la ayuda.

[Question] Find charges from subscription

Hi!. i was searching in docs about how i can get a charges from a subscription. i try Order.where and pass "customer id" but not worked.

In the documentation not exist a clear way for do a search charges from subscription.

Indentation error

Very last line (629) of __init__.py you need to indent the return statement.

Indent error on line 629 on __init__.py

File "/usr/local/lib/python3.5/site-packages/conekta/init.py", line 629
return "orders"
^
IndentationError: expected an indented block

class CheckoutOrder(_CreatableResource, _UpdatableResource, _DeletableResource, _FindableResource):

    def instance_url(self):

-> return "orders"

Any charge in version 2.3.4 fails with an SSL exception

Hi guys, me again.

So I noticed you updated the lib to 2.3.4 and now everytime I try to charge with credit card or oxxo I get the following error:

127.0.0.1 - - [09/May/2017 11:54:40] "POST /api/orders HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/darien/dev/panzer/projects/piruet/main.py", line 125, in order
_result = O.createOrder(_order)
File "/home/darien/dev/panzer/projects/piruet/models/Orders.py", line 100, in createOrder
_result = _CC.chargeCreditDebit(_package)
File "/home/darien/dev/panzer/projects/piruet/models/ConektaCharge.py", line 85, in chargeCreditDebit
charge = conekta.Charge.create(_payment)
File "build/bdist.linux-x86_64/egg/conekta/init.py", line 201, in create
return cls(cls.load_url(endpoint, method='POST', params=params, api_key=api_key))
File "build/bdist.linux-x86_64/egg/conekta/init.py", line 112, in load_url
response = cls.build_http_request(method, path, params, _api_key = api_key)
File "build/bdist.linux-x86_64/egg/conekta/init.py", line 84, in build_http_request
headers, body = request(absolute_url, method, headers=HEADERS, body=json.dumps(params))
File "/usr/lib/python2.7/site-packages/httplib2/init.py", line 1609, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/python2.7/site-packages/httplib2/init.py", line 1351, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/lib/python2.7/site-packages/httplib2/init.py", line 1272, in _conn_request
conn.connect()
File "/usr/lib/python2.7/site-packages/httplib2/init.py", line 1036, in connect
self.disable_ssl_certificate_validation, self.ca_certs)
File "/usr/lib/python2.7/site-packages/httplib2/init.py", line 80, in _ssl_wrap_socket
cert_reqs=cert_reqs, ca_certs=ca_certs)
File "/usr/lib64/python2.7/ssl.py", line 941, in wrap_socket
ciphers=ciphers)
File "/usr/lib64/python2.7/ssl.py", line 548, in init
self._context.load_verify_locations(cafile=cafile, capath=capath)
IOError: [Errno 20] Not a directory

Now I am not so sure what's going on here but maybe the conekta lib is trying to use some missing SSL certificate from Python stock libraries. Could you take a look at this?

Bests,
-Darien.

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.