Skip to main content

TodoPago modern SDK for python

Project description

python-todopago

Test

python-todopago is a library based on the TodoPagos's Python-SDK. The main purpose of this library is to provide a friendly and pythonic way to consume TodoPagos's services, using zeep as soap client and requests for rest client.

Installation

Use the package manager pip to install python-todopago.

pip install python-todopago

Usage

import python_todopago

# initialize connector class  
connector = TodoPagoConnector(
        "PRISMA A793D307441615AF6AAAD7497A75DE59", # token
        2159, # merchant id
        sandbox=True,
    )

# authorize operation
authorization = connector.authorize_operation(
        success_url="http://example.com/success/",
        failure_url="http://example.com/failure/",
        operation_id="ABC",
        currency=32,
        amount=2.00,
        city="Cordoba",
        country_code="AR",
        state_code="D",
        billing_first_name="Juan",
        billing_last_name="Lopez",
        billing_email="test@gmail.com",
        billing_phone="+543513840243",
        billing_postcode="5000",
        billing_address_1="Arrayan 8958",
        billing_address_2=None,
        customer_id="1",
        customer_ip_address="192.168.0.1",
        items=items, # List[Item]
    )

# get operation status
status = connector.get_operation_status(
            "1fb7cc9a-14dd-42ec-bf1e-6d5820799642", # request key
            "44caba31-1373-4544-aa6b-42abff696944", # answer key
        )

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This software is distributed under the MIT licence. See LICENCE for details.

Copyright (c) 2021-2022 Juan Pablo Senn juanpsenn@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-todopago-1.0.4.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_todopago-1.0.4-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file python-todopago-1.0.4.tar.gz.

File metadata

  • Download URL: python-todopago-1.0.4.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for python-todopago-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ffab0dc97b829b19cdcc2345d85bd49f0e9b7d2856e3d125f73db80cff2e4ca6
MD5 3f7c39548224f8252d11f87d4bb7795d
BLAKE2b-256 40599dd7c66a7c1310e7ab1a6f4a7b59942d360b15c325551c66839fe1f35671

See more details on using hashes here.

File details

Details for the file python_todopago-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: python_todopago-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for python_todopago-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc28239752cc21b2c9c37d619b7f0ef1da7e1c070994fe5c35c47bf89a6e872
MD5 6c31697abf7810069bc71a75338f3d24
BLAKE2b-256 a01853559f92a0844c9d209ff3992a0b1c92eed42394d1d2afc940a8a4db64eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page