0

I want to integrate a credit card processing in my website using Paybox.com API's.

I have to send a POST request (using urllib2) to Paybox API's with credit card details (number, date, cvv) when a user submit a form.

How can I secure that? is it enougth to put https://www.mywebsite.com/card/processing in my form action?

How can I send POST data over HTTPS using urllib2?

PS: I work on Django.

aniss.bouraba
  • 443
  • 9
  • 18
  • There's a secret to this. It's called "search". The question has already been asked, and answered. – S.Lott May 26 '11 at 20:50
  • possible duplicate of [Python URLLib / URLLib2 POST](http://stackoverflow.com/questions/3238925/python-urllib-urllib2-post) – S.Lott May 26 '11 at 20:51

2 Answers2

1

Well in terms of security refer to this QA: POST data encryption - Is HTTPS enough?

As far as how to do it, here's an explanation about using urllib: http://www.codercaste.com/2009/11/28/how-to-use-the-urllib-python-library-to-fetch-url-data-and-more/

The idea is to use the urlencode command to create a parameters object for the request, then create a request object from the url and the parameters object, and then call urlopen on the request object in order to actually send the request.

Community
  • 1
  • 1
jhocking
  • 5,527
  • 1
  • 24
  • 38
0

Here are solutions using python-request lib: http://www.python-requests.org/en/latest/user/advanced/

By the way, python-request is a very powerful and easy way to make requests.

vinyll
  • 11,017
  • 2
  • 48
  • 37