ыыыы - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of ыыыы.php

  1. <?php
  2.  
  3. function recursive_ksort(&$array) {
  4.    foreach ($array as &$value) {
  5.       if (is_array($value)) recursive_ksort($value);
  6.    }
  7.    return ksort($array);
  8. }
  9.  
  10. $secret_key = 'ddee181d-f8e8-4f3f-90bf-1d7e8f122d9a';
  11.  
  12. $params = [
  13.     "recipient_pan" => "4111111111111111",
  14.     "amount" => 10000,
  15.     "transaction" => "f4462ba6-37c5-4455-b0b2-53b179f7a25c",
  16.     "description" => "test_transaction_1",
  17.     "customer" => "test@test.com"
  18. ];
  19.  
  20. // сортировка по ключам параметров
  21. recursive_ksort($params);
  22.  
  23. $data = json_encode($params);
  24.  
  25. $digest = $data . $secret_key;
  26.  
  27. $key = openssl_pkey_get_private(file_get_contents('privatekey.pem'));
  28.  
  29. $signature = "";
  30.  
  31.  
  32.  
  33. print("x-signature: " . $secret_key . "\n");
  34. ?>
File Description
  • ыыыы
  • PHP Code
  • 21 Feb-2024
  • 762 Bytes
You can Share it: