django-chelseru 1.1.1__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_chelseru-1.1.1/django_chelseru.egg-info → django_chelseru-1.1.3}/PKG-INFO +1 -1
- {django_chelseru-1.1.1 → django_chelseru-1.1.3/django_chelseru.egg-info}/PKG-INFO +1 -1
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/django_chelseru.egg-info/SOURCES.txt +1 -0
- django_chelseru-1.1.3/drfchelseru/migrations/0017_alter_payment_callback_url_alter_payment_gateway_url.py +23 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/models.py +2 -2
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/views.py +21 -6
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/setup.py +1 -1
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/LICENSE +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/MANIFEST.in +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/README.md +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/README_PA.md +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/django_chelseru.egg-info/dependency_links.txt +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/django_chelseru.egg-info/requires.txt +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/django_chelseru.egg-info/top_level.txt +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/__init__.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/admin.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/apps.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/consumers.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/middlewares.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0001_initial.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0002_otpcode_session_user.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0003_rename_mobile_otpcode_mobile_number.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0004_rename_message_message_sms.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0005_rename_message_sms_messagesms_chatroom_messagechat.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0006_alter_chatroom_user_1_alter_chatroom_user_2_and_more.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0007_chatroom_pinned_for_chatroom_status_chatroom_users_and_more.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0008_alter_chatroompermissions_user.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0009_alter_chatroom_status.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0010_chatroom_banneds_chatroom_descriptions_chatroom_name_and_more.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0011_alter_chatroom_user_1_alter_chatroom_user_2.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0012_payment.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0013_payment_authority_payment_data_payment_status_code.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0014_payment_gateway_title_payment_gateway_url.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0015_payment_message.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0016_payment_card_hash_payment_card_pan_and_more.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/__init__.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/routing.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/serializers.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/services.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/settings.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/signals.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/tests.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/urls.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/validators.py +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/pyproject.toml +0 -0
- {django_chelseru-1.1.1 → django_chelseru-1.1.3}/setup.cfg +0 -0
|
@@ -40,4 +40,5 @@ drfchelseru/migrations/0013_payment_authority_payment_data_payment_status_code.p
|
|
|
40
40
|
drfchelseru/migrations/0014_payment_gateway_title_payment_gateway_url.py
|
|
41
41
|
drfchelseru/migrations/0015_payment_message.py
|
|
42
42
|
drfchelseru/migrations/0016_payment_card_hash_payment_card_pan_and_more.py
|
|
43
|
+
drfchelseru/migrations/0017_alter_payment_callback_url_alter_payment_gateway_url.py
|
|
43
44
|
drfchelseru/migrations/__init__.py
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 5.1.6 on 2025-08-28 07:17
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("drfchelseru", "0016_payment_card_hash_payment_card_pan_and_more"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="payment",
|
|
15
|
+
name="callback_url",
|
|
16
|
+
field=models.URLField(),
|
|
17
|
+
),
|
|
18
|
+
migrations.AlterField(
|
|
19
|
+
model_name="payment",
|
|
20
|
+
name="gateway_url",
|
|
21
|
+
field=models.URLField(blank=True, null=True),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -172,13 +172,13 @@ class Payment(models.Model):
|
|
|
172
172
|
order_id = models.CharField(max_length=20)
|
|
173
173
|
amount = models.FloatField()
|
|
174
174
|
description = models.TextField()
|
|
175
|
-
callback_url = models.
|
|
175
|
+
callback_url = models.URLField()
|
|
176
176
|
mobile = models.CharField(max_length=11, blank=True, null=True)
|
|
177
177
|
email = models.EmailField(blank=True, null=True)
|
|
178
178
|
currency = models.CharField(max_length=20, blank=True, null=True)
|
|
179
179
|
|
|
180
180
|
gateway_title = models.CharField(max_length=25, blank=True, null=True)
|
|
181
|
-
gateway_url = models.
|
|
181
|
+
gateway_url = models.URLField(blank=True, null=True)
|
|
182
182
|
authority = models.TextField(blank=True, null=True)
|
|
183
183
|
status_code = models.IntegerField(blank=True, null=True)
|
|
184
184
|
message = models.CharField(max_length=25, blank=True, null=True)
|
|
@@ -282,23 +282,38 @@ class PaymentCreate(APIView):
|
|
|
282
282
|
'''
|
|
283
283
|
|
|
284
284
|
try:
|
|
285
|
-
assert 'order_id' in self.request.data, 'order_id is required.'
|
|
285
|
+
# assert 'order_id' in self.request.data, 'order_id is required.'
|
|
286
286
|
assert 'amount' in self.request.data, 'amount is required.'
|
|
287
|
-
assert 'description' in self.request.data, 'description is required.'
|
|
287
|
+
# assert 'description' in self.request.data, 'description is required.'
|
|
288
288
|
|
|
289
289
|
data = {
|
|
290
|
-
'order_id': self.request.data['order_id'],
|
|
290
|
+
# 'order_id': self.request.data['order_id'],
|
|
291
291
|
'amount': self.request.data['amount'],
|
|
292
|
-
'description':
|
|
292
|
+
'description': 'django-chelseru: new order',
|
|
293
|
+
'mobile': '',
|
|
294
|
+
'email': '',
|
|
293
295
|
}
|
|
294
296
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
if self.request.user.mobile_drf_chelseru.mobile:
|
|
298
|
+
data['mobile'] = self.request.user.mobile_drf_chelseru.mobile
|
|
299
|
+
|
|
300
|
+
if self.request.user.email:
|
|
301
|
+
data['email'] = self.request.user.email
|
|
302
|
+
|
|
303
|
+
obj = self.model.objects.create(user=request.user, amount=data['amount'], description=data['description'], mobile=data['mobile'], email=data['email'])
|
|
297
304
|
|
|
298
305
|
if 'callback_url' in request.data:
|
|
299
306
|
data['callback_url'] = request.data['callback_url']
|
|
300
307
|
obj.callback_url = data['callback_url']
|
|
301
308
|
|
|
309
|
+
if 'order_id' in self.request.data:
|
|
310
|
+
data['order_id'] = self.request.data['order_id']
|
|
311
|
+
obj.order_id = data['order_id']
|
|
312
|
+
|
|
313
|
+
if 'description' in self.request.data:
|
|
314
|
+
data['description'] = self.request.data['description']
|
|
315
|
+
obj.description = data['description']
|
|
316
|
+
|
|
302
317
|
if 'mobile' in self.request.data:
|
|
303
318
|
data['mobile'] = self.request.data['mobile']
|
|
304
319
|
obj.mobile = data['mobile']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_chelseru-1.1.1 → django_chelseru-1.1.3}/django_chelseru.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0002_otpcode_session_user.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0009_alter_chatroom_status.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django_chelseru-1.1.1 → django_chelseru-1.1.3}/drfchelseru/migrations/0015_payment_message.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|