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}' }