diff --git a/restoran_max_bot/restoran_max_bot/bot_message.py b/restoran_max_bot/restoran_max_bot/bot_message.py index 7128009..0f4043b 100644 --- a/restoran_max_bot/restoran_max_bot/bot_message.py +++ b/restoran_max_bot/restoran_max_bot/bot_message.py @@ -54,7 +54,7 @@ def get_bonus(client: Client, phone: str, default_bonus: float, contact: Contact else: birthday = f"1990-{month}-{date}" rs = rkiper_customer_create(rkiper_server=config['url'], rkiper_token=config['token'], phone=phone, - name=contact.name, birthday=birthday) + name=contact.name, birthday=birthday, card_type=config['card_type']) bonus = 0 return bonus diff --git a/restoran_max_bot/restoran_max_bot/rkiper_api.py b/restoran_max_bot/restoran_max_bot/rkiper_api.py index f335cac..779c197 100644 --- a/restoran_max_bot/restoran_max_bot/rkiper_api.py +++ b/restoran_max_bot/restoran_max_bot/rkiper_api.py @@ -26,7 +26,7 @@ def rkiper_customer_info(rkiper_server, rkiper_token, phone): return response -def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday): +def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday, card_type="16"): url = f"http://{rkiper_server}/cardimp" phone = normalize_mobile_phone(phone) payload = json.dumps([{ @@ -36,6 +36,7 @@ def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday): "phone1": f"{phone}", "phone2": f"{phone}", "email": f"{phone}", + "card_type": card_type, "birthday": f"{birthday}", "department": "max bot", }]) diff --git a/restoran_max_bot/restoran_max_bot/urls.py b/restoran_max_bot/restoran_max_bot/urls.py index 44a4d08..341e0fc 100644 --- a/restoran_max_bot/restoran_max_bot/urls.py +++ b/restoran_max_bot/restoran_max_bot/urls.py @@ -3,5 +3,6 @@ from django.urls import path, include urlpatterns = [ # path('admin/', admin.site.urls), - path('max/', include('max_bot.urls')) + path('max/', include('max_bot.urls')), + path('content/', include('content_bot.urls')) ]