Skip to main content

A mercadopago payment gateway backend for django-payments.

Project description

django-payments-mercadopago

A mercadopago payment gateway backend for django-payments

Compatibility

  • Python 3.6 ≥ 3.8

  • Django 2.2 ≥ 3.2

Installation

You can install it via pip, pipenv or your favorite virtual environment manager

pip install django-payments-mercadopago

Add payments_mercadopago to your settings.py file

INSTALLED_APPS = [
    # ...
    'payments_mercadopago',
    ]

Settings.py configuration

Add the payments_mercadopago.MercadoPagoProvider to your PAYMENT_VARIANTS variable. Also to make it available add MercadoPago to your CHECKOUT_PAYMENT_CHOICES variable

Configuration for development

PAYMENT_VARIANTS = {
    # ...
    'MercadoPago':('payments_mercadopago.MercadoPagoProvider',{
        'access_token': 'MERCADO_PAGO_SANDBOX_ACCESS_TOKEN',
        'sandbox_mode': True})
}

CHECKOUT_PAYMENT_CHOICES = [('MercadoPago', 'Mercado Pago')]

If you have any problem using localhost urls as the return value of get_failure_url() or get_success_url() methods try using ngrok.

Configuration for production

PAYMENT_VARIANTS = {
    # ...
    'MercadoPago':('payments_mercadopago.MercadoPagoProvider',{
        'access_token': 'MERCADO_PAGO_ACCESS_TOKEN',
        'sandbox_mode': False})
}

CHECKOUT_PAYMENT_CHOICES = [('MercadoPago', 'Mercado Pago')]

Obtaining the Tokens

You can get your own Mercado Pago production and sandbox access tokens in your Mercado pago developer panel

Documentation

This project uses django-payments to work. For detailed instructions on how to make and configure payments using django-payments please visit the official django-payments documentation

History

0.4.0 (2020-10-17)

  • Change project layout, adapted from cookiecutter. Include tox tests, add AUTHOR, CONTRIBUTING, HISTORY, Docs, etc.

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

django-payments-mercadopago-0.4.1.tar.gz (13.5 kB view hashes)

Uploaded Source

Supported by

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