- Migrated PaymentIntentService with plugin-specific namespacing. - Added AJAX endpoints for client searching and SPEI reference generation. - Implemented global premium header with SIIP Blue gradient. - Optimized sidebar UI: increased logo size to 180px and nav icons/text. - Improved Dark Mode accessibility with high-contrast primary colors. - Added "View in CRM" functionality and automated Stripe admin logic. - Fixed layout nesting issues and polished CSS layering.
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
|
|
use SmsNotifier\Service\Logger;
|
|
use SmsNotifier\Service\OptionsManager;
|
|
use SmsNotifier\Service\PluginDataValidator;
|
|
use SmsNotifier\Factory\NotificationDataFactory;
|
|
use SmsNotifier\Facade\PluginNotifierFacade;
|
|
use Ubnt\UcrmPluginSdk\Service\UcrmApi;
|
|
use Ubnt\UcrmPluginSdk\Service\PluginConfigManager;
|
|
use GuzzleHttp\Client;
|
|
|
|
$config = PluginConfigManager::create()->loadConfig();
|
|
$ipServer = $config['ipserver'] ?? 'localhost';
|
|
$apiUrl = "https://$ipServer/crm/api/v1.0/";
|
|
$token = $config['apitoken'] ?? '';
|
|
|
|
$client = new Client([
|
|
'base_uri' => $apiUrl,
|
|
'verify' => false,
|
|
]);
|
|
|
|
$ucrmApi = new UcrmApi($client, $token);
|
|
|
|
try {
|
|
echo "Fecthing custom attributes from $apiUrl\n";
|
|
$attributes = $ucrmApi->get('custom-attributes', ['attributeType' => 'client']);
|
|
echo "Total attributes: " . count($attributes) . "\n";
|
|
foreach ($attributes as $attr) {
|
|
echo sprintf("ID: %s | Name: %s | Key: %s\n", $attr['id'], $attr['name'], $attr['key']);
|
|
}
|
|
} catch (\Exception $e) {
|
|
echo "Error: " . $e->getMessage() . "\n";
|
|
}
|