Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 627961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:35:06+00:00 2026-05-13T19:35:06+00:00

I will be transmitting purchase info (like CC) to a bank gateway and retrieve

  • 0

I will be transmitting purchase info (like CC) to a bank gateway and retrieve the result by using Django thus via Python.

What would be the efficient and secure way of doing this?

I have read a documentation of this gateway for php, they seem to use this method:

$xml= Some xml holding data of a purchase.
$curl = `/usr/bin/curl -s -d 'DATA=$xml' "https://url of the virtual bank POS"`;
$data=explode("\n",$curl); //return value is also an xml, seems like they are splitting by each `\n`

and using the $data, they process if the payment is accepted, rejected etc..

I want to achieve this under python language, for this I have done some searching and seems like there is a python curl application named pycurl yet I have no experience using curl and do not know if this is library is suitable for this task. Please keep in mind that as this transfer requires security, I will be using SSL.

Any suggestion will be appreciated.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:35:06+00:00Added an answer on May 13, 2026 at 7:35 pm

    Use of the standard library urllib2 module should be enough:

    import urllib
    import urllib2
    
    request_data = urllib.urlencode({"DATA": xml})
    response = urllib2.urlopen("https://url of the virtual bank POS", request_data)
    
    response_data = response.read()
    data = response_data.split('\n')
    

    I assume that xml variable holds data to be sent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a .NET remoting client/server that will be transmitting thousands of files, of
Will Java 8 support pattern matching like Scala and other functional programs do? I'm
will using a shared_ptr on class instance members clean up the new'ed objects correctly
Will I run into problems using open_basedir to move files from one domain to
Will the simple Python code work on the web-server(with Apache2 installed). The code is
Will limiting a query to one result record, improve performance in a large(ish) MySQL
Will it still be evil and headbangingly frustrating and quirky like the others so
Will the following code cause a ConcurrentModificationException or other side effects? ArrayList<String> newList =
Will my windows-7, command prompt allow me to filter memory logcat messages for my
Will a thread stop if I send it SIGTSTP signal? Or in other words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.