Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ma1onso committed Jan 26, 2020
1 parent 426d566 commit 0830c85
Showing 1 changed file with 47 additions and 35 deletions.
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,61 @@
Django integration with ePayco ([epayco.co](https://www.epayco.co)), Colombian payment gateway.

## Installation
- `pip install depayco`.
- `pip install depayco`

- Set _depayco_ on INSTALLED_APPS

- Set secret and public key in `settings`:

**EPAYCO_PUBLIC_KEY**: String

**EPAYCO_SECRET_KEY**: String

- Add plans to `settings` file:

```
PLANS = (
{
'id_plan': 'love2d_course',
'name': 'love2d Course',
'description': 'The most beautiful love2d course',
'amount': 29.99,
'currency': 'USD',
'interval': 'month',
'interval_count': 1,
'trial_days': 14,
},
{
'id_plan': 'defold_course',
'name': 'defold Course',
'description': 'The most mad defold course',
'amount': 29.99,
'currency': 'USD',
'interval': 'month',
'interval_count': 1,
'trial_days': 14,
}
)
```
**Note**: for create plan in epayco.co run command `sync_plans`

- Create tables in DB `python manage.py migrate`

## Commands

- Set _depayco_ on INSTALLED_APPS.
`python manage.py sync_plans` to create plans on epayco.co

`python manage.py sync_subscriptions` to keep update your subscriptions on DB

- Run `python manage.py migrate`.
## Configurations

## Configurations (settings.py)
**DEBUG_EPAYCO**: Boolean

**EPAYCO_PUBLIC_KEY**: String

**EPAYCO_SECRET_KEY**: String

**DEBUG_EPAYCO**: Boolean

**PLANS**
```
PLANS = (
{
'id_plan': 'love2d_course',
'name': 'love2d Course',
'description': 'The most beautiful love2d course',
'amount': 29.99,
'currency': 'USD',
'interval': 'month',
'interval_count': 1,
'trial_days': 14,
},
{
'id_plan': 'defold_course',
'name': 'defold Course',
'description': 'The most mad defold course',
'amount': 29.99,
'currency': 'USD',
'interval': 'month',
'interval_count': 1,
'trial_days': 14,
}
)
```

## How to use

`python manage.py sync_plans` to create plans on epayco.co
**PLANS**: Tuple

## Buy me a coffee

Expand Down

0 comments on commit 0830c85

Please sign in to comment.