One Hat Cyber Team
Your IP :
3.141.46.77
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
globify.live
/
fns
/
payments
/
viva_com
/
View File Name :
load.php
<?php function generate_viva_access_token($client_id, $client_secret, $test_mode) { $curl_url = 'https://accounts.vivapayments.com/connect/token'; if ($test_mode) { $curl_url = 'https://demo-accounts.vivapayments.com/connect/token'; } $result = array(); $result['success'] = false; $authorization = base64_encode($client_id . ':' . $client_secret); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $curl_url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = [ 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Basic ' . $authorization ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $post_fields = http_build_query([ 'grant_type' => 'client_credentials' ]); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); $response = curl_exec($ch); if (curl_errno($ch)) { $result['success'] = false; } else { $response = json_decode($response, true); if (!empty($response) && isset($response['access_token']) && !empty($response['access_token'])) { $result = array(); $result['success'] = true; $result['access_token'] = $response['access_token']; } } curl_close($ch); return $result; }