add: add payme api
This commit is contained in:
@@ -25,6 +25,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'rest_framework_simplejwt',
|
||||
'corsheaders',
|
||||
'payme',
|
||||
# apps
|
||||
'core.apps.accounts',
|
||||
'core.apps.orders',
|
||||
@@ -147,4 +148,13 @@ ALLOWED_ATMOS_IPS = []
|
||||
CONSUMER_KEY = env.str('CONSUMER_KEY')
|
||||
CONSUMER_SECRET = env.str('CONSUMER_SECRET')
|
||||
STORE_ID = env.str('STORE_ID')
|
||||
API_KEY = env.str('API_KEY')
|
||||
API_KEY = env.str('API_KEY')
|
||||
|
||||
|
||||
PAYME_ID = env.str('PAYME_ID')
|
||||
PAYME_KEY = env.str('PAYME_KEY')
|
||||
PAYME_ACCOUNT_FIELD = "order_number"
|
||||
PAYME_AMOUNT_FIELD = "total_price"
|
||||
PAYME_ACCOUNT_MODEL = "core.apps.orders.models.Order"
|
||||
PAYME_ONE_TIME_PAYMENT = True
|
||||
PAYME_ACCOUNT_FIELD_TYPE = "int"
|
||||
|
||||
@@ -8,6 +8,8 @@ from rest_framework.permissions import IsAdminUser
|
||||
from drf_yasg.views import get_schema_view
|
||||
from drf_yasg import openapi
|
||||
|
||||
from core.apps.payment.views import PaymeCallBackAPIView
|
||||
|
||||
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
@@ -34,7 +36,8 @@ urlpatterns = [
|
||||
path('orders/', include('core.apps.orders.urls')),
|
||||
path('payment/', include('core.apps.payment.urls')),
|
||||
]
|
||||
))
|
||||
)),
|
||||
path('payment/update/', PaymeCallBackAPIView.as_view()),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user