siip-stripe-payment_intents/archivos_webhook_destino/main.php
DANYDHSV 7e4a535038 feat(stripe-sync): implementar resolución dinámica de métodos de pago y corregir validación API
- Se agregó 'getPaymentMethodIdByName' para buscar automáticamente el ID de "Transferencia bancaria" por nombre, asegurando portabilidad entre servidores UISP.
- Se implementó el manejo del webhook 'customer_cash_balance_transaction.created' para el registro automático de pagos fondeados.
- Fix: Se corrigió error 422 en la API de UCRM forzando el cast de 'clientId' a integer y 'methodId' a string (GUID).
- Se actualizó la documentación (README/CHANGELOG) con instrucciones de configuración de webhooks.
2025-12-23 14:50:01 -06:00

24 lines
612 B
PHP
Executable File

<?php
chdir(__DIR__);
require 'vendor/autoload.php';
(static function () {
$builder = new \DI\ContainerBuilder();
$container = $builder->build();
$plugin = $container->get(\SmsNotifier\Plugin::class);
try {
$plugin->run();
// cleanup plugin log
//$container->get(\SmsNotifier\Service\LogCleaner::class)->clean();
} catch (Exception $e) {
$logger = new \SmsNotifier\Service\Logger();
$logger->error($e->getMessage());
$logger->debug($e->getTraceAsString());
}
})();
http_response_code(200); //Response OK when it's called by a webhook.