Створення підпису: відмінності між версіями
Матеріал з apidocs
Немає опису редагування |
Немає опису редагування |
||
Рядок 15: | Рядок 15: | ||
<code>base64_encode(hash('sha256', ($secretKey.$requestbody), true))</code> | <code>base64_encode(hash('sha256', ($secretKey.$requestbody), true))</code> | ||
<div style="width: 100%; display: flex; justify-content: space-between; gap: | <div style="width: 100%; display: flex; justify-content: space-between; gap: 16px; box-sizing: border-box; padding: 8px 0;"> | ||
<!-- Ліва кнопка --> | <!-- Ліва кнопка --> | ||
Рядок 21: | Рядок 21: | ||
position: relative; | position: relative; | ||
flex: 1; | flex: 1; | ||
min-width: | min-width: 150px; | ||
background: rgba(135, 206, 250, 0.1); | background: rgba(135, 206, 250, 0.1); | ||
padding: | padding: 10px 16px; | ||
border-radius: | border-radius: 8px; | ||
border: 1px solid #007BFF; | border: 1px solid #007BFF; | ||
color: #007BFF; | color: #007BFF; | ||
font-weight: bold; | font-weight: bold; | ||
font-size: | font-size: 16px; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
Рядок 35: | Рядок 35: | ||
cursor: pointer; | cursor: pointer; | ||
"> | "> | ||
<!-- Текст у кутку --><span style="position: absolute; top: | <!-- Текст у кутку --> | ||
<span style="position: absolute; top: 4px; left: 8px; font-size: 12px;">← Назад</span> | |||
<!-- Основний текст --> | <!-- Основний текст --> | ||
<span>[[ | <span>[[Тут твій текст]]</span> | ||
</div> | </div> | ||
Рядок 44: | Рядок 45: | ||
position: relative; | position: relative; | ||
flex: 1; | flex: 1; | ||
min-width: | min-width: 150px; | ||
background: rgba(135, 206, 250, 0.1); | background: rgba(135, 206, 250, 0.1); | ||
padding: | padding: 10px 16px; | ||
border-radius: | border-radius: 8px; | ||
border: 1px solid #007BFF; | border: 1px solid #007BFF; | ||
color: #007BFF; | color: #007BFF; | ||
font-weight: bold; | font-weight: bold; | ||
font-size: | font-size: 16px; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
Рядок 58: | Рядок 59: | ||
cursor: pointer; | cursor: pointer; | ||
"> | "> | ||
<!-- Текст у кутку --><span style="position: absolute; top: | <!-- Текст у кутку --> | ||
<span style="position: absolute; top: 4px; right: 8px; font-size: 12px;">Далі →</span> | |||
<!-- Основний текст --> | <!-- Основний текст --> | ||
[[ | <span>[[Тут твій текст]]</span> | ||
</div> | </div> | ||
</div> | </div> |
Версія за 08:16, 14 серпня 2025
Формування підпису Sign
(основний варіант для POST – запитів)
Sign = base64(sha256(secretKey + requestBody))
Де:
secretKey
– секретний ключ.requestBody
– тіло запиту у форматі JSON (ідентичне формату EasyPay).
Приклади коду
C#
Convert.ToBase64String(SHA256.Create().ComputeHash(Encoding.UTF8.GetBytes(data)))
PHP
base64_encode(hash('sha256', ($secretKey.$requestbody), true))
← Назад Тут твій текст
Далі → Тут твій текст