A django-payments backend for the mercadopago payment gateway
Project description
django-payments-mercadopago
A mercadopago payment gateway backend for django-payments
Installation
You can install it via pip
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
Mercado Pago doesn't require you to specify a fixed sandbox endpoint, instead they provide you with a sandbox token and a production token, for testing and production, respectively.
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 instead.
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
For detailed instructions on how to use django-payments please visit the official django-payments documentation
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
Hashes for django-payments-mercadopago-0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdda09898ace9ce1760703df1eb6bd1021f234c8a3c6de796f78b20d44c34b8a |
|
MD5 | c73c7dfeae413fde0ed7b677c7471da6 |
|
BLAKE2b-256 | 63b4cfaf241b3d2c2b280a4f79156263d0f77b1d706366d12e587abee0d5d9b3 |