Skip to content

Commit 6a0fa3a

Browse files
committed
v1.0.5
* Minor bug fixes * Minor improvements
1 parent e1377a5 commit 6a0fa3a

File tree

9 files changed

+23
-28
lines changed

9 files changed

+23
-28
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ urlpatterns = [
5757
]
5858
```
5959

60+
Add your BlockBee API Key (obtained from our [Dashboard](https://dash.blockbee.io/)).
61+
62+
```python
63+
64+
BLOCKBEE_API_KEY = 'your_api_key'
65+
66+
```
67+
6068
## Configuration
6169

6270
After the installation you need to set up Providers for each coin you wish to accept.
@@ -295,4 +303,7 @@ Contact us @ https://blockbee.io/contacts/
295303
* Removed deprecated fields from the payment model
296304
297305
#### 1.0.4
306+
* Minor fixes
307+
308+
#### 1.0.5
298309
* Minor fixes

blockbee/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
from blockbee.meta import VERSION
21
from blockbee.dispatchers import RequestDispatcher as Invoice # noqa
3-
from blockbee.utils import get_active_providers as valid_providers, get_order_request as get_order_invoices, build_callback_url as callback_url
4-
5-
6-
__version__ = str(VERSION)
2+
from blockbee.utils import get_active_providers as valid_providers, get_order_request as get_order_invoices, build_callback_url as callback_url

blockbee/apikey.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
apikey = '' # provide your API Key here
1+
from django.conf import settings
2+
3+
apikey = settings.BLOCKBEE_API_KEY

blockbee/dispatchers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from blockbee.apikey import apikey
2+
13
class CallbackDispatcher:
24
def __init__(self, coin, request, payment, raw_data, result=None):
35
self.coin = coin
@@ -7,10 +9,8 @@ def __init__(self, coin, request, payment, raw_data, result=None):
79
self.result = result
810

911
def callback(self):
10-
1112
from blockbee.models import Request, PaymentLog
1213
from blockbee.signals import payment_received, payment_complete, payment_pending
13-
from blockbee.blockbee import get_address
1414

1515
try:
1616
request = Request.objects.get(
@@ -89,8 +89,7 @@ def callback(self):
8989

9090

9191
class RequestDispatcher:
92-
93-
def __init__(self, request, order_id, coin, value, apikey):
92+
def __init__(self, request, order_id, coin, value):
9493
self._request = request
9594
self.order_id = order_id
9695
self.coin = coin

blockbee/meta.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

blockbee/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
SECRET_KEY = '//BlockBee_TEST_KEY//'
66

7+
BLOCKBEE_API_KEY = '//BlockBee_API_KEY//'
8+
79
DEBUG = True
810

911
INSTALLED_APPS = [

setup.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,14 @@
33

44
from setuptools import setup, find_packages
55

6-
import blockbee
7-
86
with open("README.md", "r") as fh:
97
long_description = fh.read()
108

119
setup(
12-
1310
name='django-blockbee',
14-
15-
version=blockbee.__version__,
16-
11+
version='1.0.5',
1712
packages=find_packages(),
18-
1913
author="BlockBee",
20-
2114
author_email="[email protected]",
2215
install_requires=[
2316
'django',
@@ -26,9 +19,7 @@
2619
description="Django implementation of BlockBee's payment gateway",
2720
long_description_content_type="text/markdown",
2821
long_description=long_description,
29-
3022
include_package_data=True,
31-
3223
url='https://github.com/blockbee-io/django-blockbee',
3324
classifiers=[
3425
"Programming Language :: Python",
@@ -40,8 +31,6 @@
4031
"Operating System :: OS Independent",
4132
"Programming Language :: Python :: 3",
4233
],
43-
4434
license="MIT",
45-
4635
zip_safe=False,
4736
)

store/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.urls import include, path
1+
from django.urls import path
22
from . import views
33

44
app_name = 'store'

store/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def request(_r):
1818
request=_r,
1919
order_id=order_id,
2020
coin=coin,
21-
value=value,
22-
apikey=apikey # Your API Key here
21+
value=value
2322
)
2423

2524
payment_address = invoice.request()

0 commit comments

Comments
 (0)