braintree / braintree_python

Braintree Python library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
242 stars 115 forks source link

server certificate verification failed #19

Closed sidmitra closed 13 years ago

sidmitra commented 13 years ago
Traceback (most recent call last):

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/django/core/handlers/base.py", line 117, in get_response
    response = middleware_method(request, e)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/ubuntu/webapps/app/common/decorators.py", line 24, in new_func
    return view_func(request, *args, **kwargs)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)

  File "/home/ubuntu/webapps/app/app/profiles/views/expert.py", line 651, in checkout
    form_initial_data_dict = payments_helper.get_billing_info_dict(request.user)

  File "/home/ubuntu/webapps/app/common/payments/utils.py", line 199, in get_billing_info_dict
    customer = braintree.Customer.find(customer_id)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/customer.py", line 111, in find
    return Configuration.gateway().customer.find(customer_id)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/customer_gateway.py", line 34, in find
    response = self.config.http().get("/customers/" + customer_id)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/util/http.py", line 47, in get
    return self.__http_do("GET", path)

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/util/http.py", line 54, in __http_do
    self.__verify_ssl()

  File "/home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/util/http.py", line 116, in __verify_ssl
    curl.perform()

error: (60, 'server certificate verification failed. CAfile: /home/ubuntu/.virtualenvs/app/lib/python2.6/site-packages/braintree/ssl/www_braintreegateway_com.ca.crt CRLfile: none')
benmills commented 13 years ago

Thank's for letting us know about this, we're going to look into this now. Do you have openssl or pycurl installed in any specific way?

sidmitra commented 13 years ago

Ubuntu Lucid: sudo apt-get install libcurl4-openssl-dev Pycurl was using pip (pycurl==7.19.0)

BTW i just tested on production, and can't replicate the above bug. But i got a dozen of these error emails over the weekend with customers that were trying to checkout. So might have been intermittent?

benmills commented 13 years ago

Followed up with @sidmitra via email. This issue appears to be unrelated to the Python client library.

sidmitra commented 13 years ago

Thanks for the update.