Створення підпису: відмінності між версіями

Матеріал з 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: 20px; box-sizing: border-box; padding: 12px 0;">
<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: 180px;  
     min-width: 150px;  
     background: rgba(135, 206, 250, 0.1);  
     background: rgba(135, 206, 250, 0.1);  
     padding: 14px 20px;  
     padding: 10px 16px;  
     border-radius: 10px;  
     border-radius: 8px;  
     border: 1px solid #007BFF;  
     border: 1px solid #007BFF;  
     color: #007BFF;  
     color: #007BFF;  
     font-weight: bold;  
     font-weight: bold;  
     font-size: 18px;  
     font-size: 16px;  
     display: flex;  
     display: flex;  
     align-items: center;  
     align-items: center;  
Рядок 35: Рядок 35:
     cursor: pointer;
     cursor: pointer;
   ">
   ">
<!-- Текст у кутку --><span style="position: absolute; top: 6px; left: 10px; font-size: 14px;">← Назад</span>
    <!-- Текст у кутку -->
    <span style="position: absolute; top: 4px; left: 8px; font-size: 12px;">← Назад</span>
     <!-- Основний текст -->
     <!-- Основний текст -->
<span>[[Інтеграція з ApplePay та GooglePay]]</span>
    <span>[[Тут твій текст]]</span>
   </div>
   </div>


Рядок 44: Рядок 45:
     position: relative;
     position: relative;
     flex: 1;  
     flex: 1;  
     min-width: 180px;  
     min-width: 150px;  
     background: rgba(135, 206, 250, 0.1);  
     background: rgba(135, 206, 250, 0.1);  
     padding: 14px 20px;  
     padding: 10px 16px;  
     border-radius: 10px;  
     border-radius: 8px;  
     border: 1px solid #007BFF;  
     border: 1px solid #007BFF;  
     color: #007BFF;  
     color: #007BFF;  
     font-weight: bold;  
     font-weight: bold;  
     font-size: 18px;  
     font-size: 16px;  
     display: flex;  
     display: flex;  
     align-items: center;  
     align-items: center;  
Рядок 58: Рядок 59:
     cursor: pointer;
     cursor: pointer;
   ">
   ">
<!-- Текст у кутку --><span style="position: absolute; top: 6px; right: 10px; font-size: 14px;">Далі →</span>
    <!-- Текст у кутку -->
 
    <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))