Sunday, November 2, 2014

Working with requests app

Hello everyone,

I'm working with requests app so I can send post data in one of my views, I need to sent it to an external url, I'm integrating with an online payment provider.

I'm doing as the docs say:

import requests

def realizarPago(request):
    parametros_payu = {I use my params here in a dict}

    (That's PayU's default url to stage a payment request)

    return requests.post(url, data = parametros_payu)



When I was using the testing url I got the SSL not verified error, and I tried in my browser and I could see their certificate was broken, now I'm trying the production url, the certificate is ok, and I instead get the error:
'Response' object has no attribute 'get'

I'm using:
django 1.7.1
python 3.4.0

Any help would be very appreciated

--
Jorge Andres Vergara Ebratt
#SoftwareDeveloper (Or at least trying to be)
@javebratt

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAeX05H4%2B3PKbXOgtZrV9kAfMT-VnbN5zcZwzNzf4PAXPqRLRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment