Sberbank payments service
Project description
Sberbank
========
Installation
-----------
1. Add "sberbank" to your INSTALLED_APPS settings:
```python
INSTALLED_APPS = [
...
'sberbank',
]
```
2. Add merchants params to your settings:
```python
MERCHANTS = {
%merchant_id%: {
'username': %merchant_username%,
'password': %merchant_password%,
'success_url': %default_success_url%
}
}
```
3. Add callback url to you urls.py:
```python
urlpatterns = [
...
url('/sberbank', include('sberbank.urls'))
]
```
Sberbank
========
Installation
-----------
1. Add "sberbank" to your INSTALLED_APPS settings:
```python
INSTALLED_APPS = [
...
'sberbank',
]
```
2. Add merchants params to your settings:
```python
MERCHANTS = {
%merchant_id%: {
'username': %merchant_username%,
'password': %merchant_password%,
'success_url': %default_success_url%
}
}
```
3. Add callback url to you urls.py:
```python
urlpatterns = [
...
url('/sberbank', include('sberbank.urls'))
]
```
4. Run `python manage.py migrate` to create models.
Usage
-----------
* Pay
```python
from sberbank.service import BankService
instance = BankService(%merchant_id%)
payment = instance.pay(amount=%amount%)
```
Response:
| name | type | example |
|----- | ---- | ------- |
| payment_id | UUID | UUID('8b7e1798-eb96-402d-ac0e-fa23042d05a7') |
| redirest_url | string | https://3dsec.sberbank.ru/payment/merchants/upravdoma/payment_ru.html?mdOrder=c12f8fae-447c-7853-c12f-8fae0000302b |
* Check payment status:
```python
from sberbank.service import BankService
instance = BankService(%merchant_id%)
status = instance.get_status(%payment_id%)
```
Response:
| name | type | example |
|----- | ---- | ------- |
| status | ENUM | <Status.CREATED: 0> |
| amount | decimal | 190.82 |
| created| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) |
| updated| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) |
========
Installation
-----------
1. Add "sberbank" to your INSTALLED_APPS settings:
```python
INSTALLED_APPS = [
...
'sberbank',
]
```
2. Add merchants params to your settings:
```python
MERCHANTS = {
%merchant_id%: {
'username': %merchant_username%,
'password': %merchant_password%,
'success_url': %default_success_url%
}
}
```
3. Add callback url to you urls.py:
```python
urlpatterns = [
...
url('/sberbank', include('sberbank.urls'))
]
```
Sberbank
========
Installation
-----------
1. Add "sberbank" to your INSTALLED_APPS settings:
```python
INSTALLED_APPS = [
...
'sberbank',
]
```
2. Add merchants params to your settings:
```python
MERCHANTS = {
%merchant_id%: {
'username': %merchant_username%,
'password': %merchant_password%,
'success_url': %default_success_url%
}
}
```
3. Add callback url to you urls.py:
```python
urlpatterns = [
...
url('/sberbank', include('sberbank.urls'))
]
```
4. Run `python manage.py migrate` to create models.
Usage
-----------
* Pay
```python
from sberbank.service import BankService
instance = BankService(%merchant_id%)
payment = instance.pay(amount=%amount%)
```
Response:
| name | type | example |
|----- | ---- | ------- |
| payment_id | UUID | UUID('8b7e1798-eb96-402d-ac0e-fa23042d05a7') |
| redirest_url | string | https://3dsec.sberbank.ru/payment/merchants/upravdoma/payment_ru.html?mdOrder=c12f8fae-447c-7853-c12f-8fae0000302b |
* Check payment status:
```python
from sberbank.service import BankService
instance = BankService(%merchant_id%)
status = instance.get_status(%payment_id%)
```
Response:
| name | type | example |
|----- | ---- | ------- |
| status | ENUM | <Status.CREATED: 0> |
| amount | decimal | 190.82 |
| created| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) |
| updated| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sberbank-0.1.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file sberbank-0.1.tar.gz
.
File metadata
- Download URL: sberbank-0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b69379e2bda9337da285c98451d5f18da2b1cfdef51acf58cce7ee5d0d3817 |
|
MD5 | 457482dbeffc7474b0a0db6394cd3fc2 |
|
BLAKE2b-256 | 8b09f065300c0813404da4e66cd6f13896d080ba5d62a1f8b2f3c71fcaf1526f |
File details
Details for the file sberbank-0.1-py3-none-any.whl
.
File metadata
- Download URL: sberbank-0.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110cc85daf5a779c2491bcffc1fb69edcf3f8cb5fee4d46df9c1ea2377df8f87 |
|
MD5 | d3ba3dc01dae2d3856a2ce27a5773f23 |
|
BLAKE2b-256 | 612d32e160d57662c8c0bb8dd460962612555de0072cb485b20c06f130275e87 |