Olegos

for vlito pay link

Aug 15th, 2021 (edited)
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. from hashlib import sha256
  2.  
  3. amount = format(10, ".2f") # Добавит к числу два нуля после точки, без этого не будет работать
  4. user_id = 242175861
  5. group_id = 168433436
  6. secret_key = 'secret_key'
  7.  
  8. array_sign = [str(group_id), str(user_id), amount, secret_key] # Все переменные должны быть типа str
  9. array_sign = sha256(':'.join(array_sign).encode('utf-8')).hexdigest()
  10.  
  11. link = f"https://vlito.ru/paying/?bot_id={group_id}&amount={amount}&p=Доп параметры&vk_id={user_id}&sign={array_sign}"
  12. print(link)
  13.  
Add Comment
Please, Sign In to add comment