siip-whatsapp-notifications.../inspect_payment.php
2026-02-11 11:28:12 -06:00

25 lines
607 B
PHP
Executable File

<?php
chdir(__DIR__);
require_once 'vendor/autoload.php';
$ucrmConfig = json_decode(file_get_contents('ucrm.json'), true);
$ucrmUrl = $ucrmConfig['ucrmLocalUrl'] ?? 'http://localhost';
$appKey = $ucrmConfig['pluginAppKey'];
$client = new \GuzzleHttp\Client([
'base_uri' => rtrim($ucrmUrl, '/') . '/api/v1.0/',
'verify' => false,
'headers' => [
'X-Auth-App-Key' => $appKey
]
]);
$paymentId = 818; // From screenshot
try {
$response = $client->get("payments/$paymentId");
echo $response->getBody();
} catch (\Exception $e) {
echo "ERROR: " . $e->getMessage() . "\n";
}