From 6819f9995c24b13646d6314cd042e4eff4b85568 Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Thu, 11 Sep 2025 17:16:55 +0500 Subject: [PATCH] fix --- core/apps/payment/views.py | 3 ++- core/services/payment.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/apps/payment/views.py b/core/apps/payment/views.py index 7c00e86..5a5d123 100644 --- a/core/apps/payment/views.py +++ b/core/apps/payment/views.py @@ -48,7 +48,8 @@ class AtmosCallbackApiView(APIView): print("Atmos yuborgan SIGN:", sign) check_string = f"{store_id}{transaction_id}{invoice}{amount}{settings.API_KEY}" - generated_sign = hashlib.sha256(check_string.encode()) + print(check_string) + generated_sign = hashlib.sha256(check_string.encode()).hexdigest() logger.info(f"Biz generatsiya qilgan SIGN: {generated_sign}") print("Biz generatsiya qilgan SIGN:", generated_sign) diff --git a/core/services/payment.py b/core/services/payment.py index b328d9e..20a031a 100644 --- a/core/services/payment.py +++ b/core/services/payment.py @@ -34,7 +34,7 @@ class Atmos: 'Authorization': f'Bearer {access_token}', } data = { - 'amount': int(amount), + 'amount': int(amount) * 100, 'account': str(account), 'store_id': f'{self.store_id}' }