From cd7124ef0eba70f88cfb1ea9b678a927270c4a42 Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Tue, 14 Jan 2025 21:06:18 +0330 Subject: [PATCH 1/5] 0 payment --- backend/.gitignore | 4 +- backend/aaiss_backend/settings.py | 5 +- backend/aaiss_backend/urls.py | 17 ++ backend/backend_api/views.py | 6 + backend/requirements.txt | Bin 1036 -> 1340 bytes frontend/package-lock.json | 198 ++++++++++++++++------ frontend/src/providers/APIProvider/URL.js | 2 +- 7 files changed, 177 insertions(+), 55 deletions(-) diff --git a/backend/.gitignore b/backend/.gitignore index 03c9941..c8271d4 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -1,4 +1,6 @@ data media static -*.json \ No newline at end of file +*.json +.venv/ +db.sqlite3 \ No newline at end of file diff --git a/backend/aaiss_backend/settings.py b/backend/aaiss_backend/settings.py index dade865..471d350 100644 --- a/backend/aaiss_backend/settings.py +++ b/backend/aaiss_backend/settings.py @@ -23,7 +23,7 @@ # production/development key SECRET_KEY = env.str("SECRET_KEY", 'orlch#mu_+2-my=fo)akh_3+^j7+7tc@v*-*z^(g*%(&lih@pv') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = env.bool("DEBUG", False) +DEBUG = env.bool("DEBUG", True) ALLOWED_HOSTS = ['autaaiss.com', '127.0.0.1', 'localhost', "185.252.86.114"] CSRF_TRUSTED_ORIGINS = ['https://autaaiss.com', 'https://localhost', 'https://127.0.0.1', "http://185.252.86.114"] @@ -41,6 +41,7 @@ 'rest_framework_simplejwt', 'corsheaders', 'backend_api', + 'drf_yasg', ] MIDDLEWARE = [ @@ -100,7 +101,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'data' / 'db.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', } } diff --git a/backend/aaiss_backend/urls.py b/backend/aaiss_backend/urls.py index 5990f90..c1e29ac 100644 --- a/backend/aaiss_backend/urls.py +++ b/backend/aaiss_backend/urls.py @@ -15,8 +15,25 @@ """ from django.contrib import admin from django.urls import path, include +from rest_framework import permissions +from drf_yasg.views import get_schema_view +from drf_yasg import openapi +schema_view = get_schema_view( + openapi.Info( + title="Your Project API", + default_version='v1', + description="API documentation for your project", + terms_of_service="https://www.google.com/policies/terms/", + contact=openapi.Contact(email="contact@yourdomain.com"), + license=openapi.License(name="BSD License"), + ), + public=True, + permission_classes=[permissions.AllowAny,], +) urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('backend_api.urls')), + path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ] + diff --git a/backend/backend_api/views.py b/backend/backend_api/views.py index a08003a..f40e45c 100644 --- a/backend/backend_api/views.py +++ b/backend/backend_api/views.py @@ -232,6 +232,12 @@ def payment(self, request): except ValidationError as e: return Response(e) payment = Payment.create_payment_for_user(user, discount) + + if payment.amount < 1: + payment.update_payment_status(Payment.PaymentStatus.PAYMENT_CONFIRMED) + return redirect(urllib.parse.urljoin(BASE_URL, 'callback') + '?client_ref_id=' + str( + payment.pk) + '&payment_status=succeeded') + response = ZIFYRequest().create_payment(str(payment.pk), payment.discounted_amount, user.name, user.phone_number, user.account.email) diff --git a/backend/requirements.txt b/backend/requirements.txt index 719333d55d679169cdc4e910a7f4ab997f8f9bf4..4d6b2d04b9d300eb08ac239188ef26c13b52b7b2 100644 GIT binary patch delta 524 zcmXw$!Ab&Q6ot<}vk76SO^b+8LL@{g9W9k|A+#wgS_IK5B&V=UB}XVXE!wt7hMu5R zt6rctXx$^UXwf@#&aX23mtpRA&VSFH=ef_sOVW5_-)E_=vYc6j0?NZ-ChzmqydSpc8No?{I=;eYQ%TVy_Cj*AZB5dv^AC{{Q~&?~ delta 154 zcmdnP)x$ACZlZ$BL_4*KX(kir$V}X2Hu00*WF=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -2153,9 +2193,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -2171,11 +2211,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -2215,9 +2256,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", + "version": "1.0.30001692", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", + "integrity": "sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==", "dev": true, "funding": [ { @@ -2232,7 +2273,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "2.4.2", @@ -2501,10 +2543,11 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.549", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.549.tgz", - "integrity": "sha512-gpXfJslSi4hYDkA0mTLEpYKRv9siAgSUgZ+UWyk+J5Cttpd1ThCVwdclzIwQSclz3hYn049+M2fgrP1WpvF8xg==", - "dev": true + "version": "1.5.82", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.82.tgz", + "integrity": "sha512-Zq16uk1hfQhyGx5GpwPAYDwddJuSGhtRhgOA2mCxANYaDT79nAeGnaXogMGng4KqLaJUVnOnuL0+TDop9nLOiA==", + "dev": true, + "license": "ISC" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -2667,10 +2710,11 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3269,6 +3313,20 @@ "node": ">= 6" } }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4229,10 +4287,11 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4243,6 +4302,16 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5628,9 +5697,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "funding": [ { @@ -5646,9 +5715,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -7281,6 +7351,20 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dev": true, + "requires": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + } + }, "available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -7348,15 +7432,15 @@ } }, "browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" } }, "call-bind": { @@ -7381,9 +7465,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", + "version": "1.0.30001692", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", + "integrity": "sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==", "dev": true }, "chalk": { @@ -7591,9 +7675,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.549", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.549.tgz", - "integrity": "sha512-gpXfJslSi4hYDkA0mTLEpYKRv9siAgSUgZ+UWyk+J5Cttpd1ThCVwdclzIwQSclz3hYn049+M2fgrP1WpvF8xg==", + "version": "1.5.82", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.82.tgz", + "integrity": "sha512-Zq16uk1hfQhyGx5GpwPAYDwddJuSGhtRhgOA2mCxANYaDT79nAeGnaXogMGng4KqLaJUVnOnuL0+TDop9nLOiA==", "dev": true }, "emoji-regex": { @@ -7735,9 +7819,9 @@ } }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true }, "escape-string-regexp": { @@ -8179,6 +8263,12 @@ "mime-types": "^2.1.12" } }, + "fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -8839,9 +8929,9 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, "normalize-path": { @@ -8850,6 +8940,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -9780,13 +9876,13 @@ } }, "update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.1" } }, "uri-js": { diff --git a/frontend/src/providers/APIProvider/URL.js b/frontend/src/providers/APIProvider/URL.js index eeba4d7..46f7d12 100644 --- a/frontend/src/providers/APIProvider/URL.js +++ b/frontend/src/providers/APIProvider/URL.js @@ -1,5 +1,5 @@ const URL = { - baseURL: 'https://autaaiss.com/', + baseURL: 'http://localhost:8000/', services: { default: 'api/', 2021: 'api/2021/', From ad6c17bd781f84b92d013467aa57b73dc2699594 Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Tue, 14 Jan 2025 21:40:39 +0330 Subject: [PATCH 2/5] 0 payment debug --- backend/aaiss_backend/settings.py | 2 +- ..._rename_teachers_presentation_presenters.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py diff --git a/backend/aaiss_backend/settings.py b/backend/aaiss_backend/settings.py index 19df824..97465f8 100644 --- a/backend/aaiss_backend/settings.py +++ b/backend/aaiss_backend/settings.py @@ -23,7 +23,7 @@ # production/development key SECRET_KEY = env.str("SECRET_KEY", 'orlch#mu_+2-my=fo)akh_3+^j7+7tc@v*-*z^(g*%(&lih@pv') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = env.bool("DEBUG", True) +DEBUG = env.bool("DEBUG", False) ALLOWED_HOSTS = ['autaaiss.com', '127.0.0.1', 'localhost', "185.252.86.114"] CSRF_TRUSTED_ORIGINS = ['https://autaaiss.com', 'https://localhost', 'https://127.0.0.1', "http://185.252.86.114"] diff --git a/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py b/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py new file mode 100644 index 0000000..4fc4cbe --- /dev/null +++ b/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.4 on 2025-01-14 17:48 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('backend_api', '0063_remove_presentation_presenters_presentation_teachers'), + ] + + operations = [ + migrations.RenameField( + model_name='presentation', + old_name='teachers', + new_name='presenters', + ), + ] From f0ebd3f17f1989500ea161d86011bc72c9305e46 Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Tue, 14 Jan 2025 21:53:07 +0330 Subject: [PATCH 3/5] 0 payment debug 2 --- backend/backend_api/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/backend_api/views.py b/backend/backend_api/views.py index f40e45c..03c4a6d 100644 --- a/backend/backend_api/views.py +++ b/backend/backend_api/views.py @@ -235,8 +235,7 @@ def payment(self, request): if payment.amount < 1: payment.update_payment_status(Payment.PaymentStatus.PAYMENT_CONFIRMED) - return redirect(urllib.parse.urljoin(BASE_URL, 'callback') + '?client_ref_id=' + str( - payment.pk) + '&payment_status=succeeded') + return Response(new_detailed_response(status.HTTP_202_ACCEPTED, "Payment created successfully",{})) response = ZIFYRequest().create_payment(str(payment.pk), payment.discounted_amount, user.name, user.phone_number, From ec6d3d6197c8144389a23d8806ee994bfce46cd8 Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Tue, 14 Jan 2025 22:05:18 +0330 Subject: [PATCH 4/5] 0 payment debug 3 --- ..._rename_teachers_presentation_presenters.py | 18 ------------------ frontend/src/providers/APIProvider/URL.js | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py diff --git a/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py b/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py deleted file mode 100644 index 4fc4cbe..0000000 --- a/backend/backend_api/migrations/0064_rename_teachers_presentation_presenters.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.4 on 2025-01-14 17:48 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('backend_api', '0063_remove_presentation_presenters_presentation_teachers'), - ] - - operations = [ - migrations.RenameField( - model_name='presentation', - old_name='teachers', - new_name='presenters', - ), - ] diff --git a/frontend/src/providers/APIProvider/URL.js b/frontend/src/providers/APIProvider/URL.js index 46f7d12..eeba4d7 100644 --- a/frontend/src/providers/APIProvider/URL.js +++ b/frontend/src/providers/APIProvider/URL.js @@ -1,5 +1,5 @@ const URL = { - baseURL: 'http://localhost:8000/', + baseURL: 'https://autaaiss.com/', services: { default: 'api/', 2021: 'api/2021/', From 6bac3a6dd76f411414e4cafeebd3d65bcdf0876d Mon Sep 17 00:00:00 2001 From: AlirezaYousefpour <93353496+AlirezaYousefpourM@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:12:19 +0330 Subject: [PATCH 5/5] Update settings.py --- backend/aaiss_backend/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/aaiss_backend/settings.py b/backend/aaiss_backend/settings.py index 97465f8..91ea51e 100644 --- a/backend/aaiss_backend/settings.py +++ b/backend/aaiss_backend/settings.py @@ -101,7 +101,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'NAME': BASE_DIR / 'data' / 'db.sqlite3', } }