Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Zepeda committed Aug 23, 2020
1 parent 0b35347 commit 9d3f86d
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,45 @@ 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```Python
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](https://ngrok.com/) instead.

Configuration for production
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

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

Mercado Pago doesn't require you to specify a sandbox endpoint, instead they provide you with a sandbox token and a production token, for testing and production, respectively.
You can get your own Mercado Pago production or sandbox access token in your [Mercado Pago developer panel](https://www.mercadopago.com.mx/developers/panel/credentials)
Obtaining the Tokens
--------------------

You can get your own Mercado Pago production and sandbox access tokens in your [Mercado Pago developer panel](https://www.mercadopago.com.mx/developers/panel/credentials)


Usage
-----
Documentation
-------------

For detailed instructions on how to use django-payments please visit the official [django-payments documentation](https://django-payments.readthedocs.io/en/latest/)

0 comments on commit 9d3f86d

Please sign in to comment.