feat: Añadir botón de acceso rápido al CRM y v1.3.2

- Se añadió el botón 'Ver en CRM' en la vista de detalles del cliente. - Se implementó lógica dinámica para generar el enlace al perfil del cliente. - Actualización de versión a 1.3.2 en todos los metadatos y documentación.
This commit is contained in:
DANYDHSV 2026-01-07 12:07:08 -06:00
parent 7bb6d7c0e2
commit e1e1cf751e
6 changed files with 31 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## [1.3.2] - 06-01-2026
### Added
- Botón "Ver en CRM" en la vista de detalles del cliente para acceso rápido a su perfil en UCRM.
## [1.3.1] - 06-01-2026
### Fixed
- Eliminación de pagos duplicados: Delegación del registro de pagos a la integración nativa de UCRM mediante el ajuste de metadatos (`createdBy => UCRM`).

View File

@ -1,6 +1,6 @@
# SIIP - Generador de Payment Intents Stripe
![Version](https://img.shields.io/badge/version-1.3.1-blue.svg)
![Version](https://img.shields.io/badge/version-1.3.2-blue.svg)
![UCRM Compliancy](https://img.shields.io/badge/UCRM-v1.0.0%2B-success.svg)
![PHP](https://img.shields.io/badge/PHP-7.4%2B-777bb4.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
@ -45,5 +45,5 @@ Para que los pagos se registren automáticamente en UCRM, debe configurar un Web
- Si el cliente no tiene un "Stripe Customer ID", no se permitirá generar el pago.
---
**Versión**: 1.3.1
**Versión**: 1.3.2
**Copyright**: © 2024 SIIP Internet. Todos los derechos reservados.

View File

@ -22,3 +22,13 @@ Create Intent Result: {"success":true,"id":"pi_3Sg9DQEFY1WEUtgR1Ye5k6G3","status
Create Intent Result: {"success":true,"id":"pi_3Sg9PLEFY1WEUtgR1iAOyHlS","status":"succeeded","amount":600,"currency":"mxn","next_action":null}
Create Intent Result: {"success":true,"id":"pi_3Sg9kHEFY1WEUtgR0UDlXu7T","status":"requires_action","amount":250,"currency":"mxn","next_action":{"display_bank_transfer_instructions":{"amount_remaining":25000,"currency":"mxn","financial_addresses":[{"spei":{"account_holder_address":{"city":"Ciudad de M\u00e9xico","country":"MX","line1":"Av Paseo de la Reforma 180 piso 29 col Juarez","line2":null,"postal_code":"06600","state":"Ciudad de M\u00e9xico"},"account_holder_name":"SIIP INTERNET","bank_address":{"city":"Naucalpan","country":"MX","line1":"Blvd. Manuel Avila Camacho 1902","line2":"Planta Baja, Cd. Satelite","postal_code":"C.P. 53100","state":"Estado de Mexico"},"bank_code":"124","bank_name":"CITI","clabe":"124180257395215094"},"supported_networks":["spei"],"type":"spei"}],"hosted_instructions_url":"https:\/\/payments.stripe.com\/bank_transfers\/instructions\/test_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9UZFFiajNxbDd6bE9PNmgxOXNXSXZIRzlaaVAzd1pm0100rOmKqech","reference":"779272","type":"mx_bank_transfer"},"type":"display_bank_transfer_instructions"}}
Create Intent Result: {"success":true,"id":"pi_3Shc8dEFY1WEUtgR123bgp1n","status":"succeeded","amount":750,"currency":"mxn","next_action":null}
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
Plugin Config Loaded: Server=venus.siip.mx, UCRM Token=35lAi..., Stripe Token=sk_test...
PaymentIntent created: pi_3Sn091EFY1WEUtgR0KJnQmtz Status: requires_action
Create Intent Result: {"success":true,"id":"pi_3Sn091EFY1WEUtgR0KJnQmtz","status":"requires_action","amount":100,"currency":"mxn","next_action":{"display_bank_transfer_instructions":{"amount_remaining":10000,"currency":"mxn","financial_addresses":[{"spei":{"account_holder_address":{"city":"Ciudad de M\u00e9xico","country":"MX","line1":"Av Paseo de la Reforma 180 piso 29 col Juarez","line2":null,"postal_code":"06600","state":"Ciudad de M\u00e9xico"},"account_holder_name":"SIIP INTERNET","bank_address":{"city":"Naucalpan","country":"MX","line1":"Blvd. Manuel Avila Camacho 1902","line2":"Planta Baja, Cd. Satelite","postal_code":"C.P. 53100","state":"Estado de Mexico"},"bank_code":"124","bank_name":"CITI","clabe":"124180257395215094"},"supported_networks":["spei"],"type":"spei"}],"hosted_instructions_url":"https:\/\/payments.stripe.com\/bank_transfers\/instructions\/test_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9Ua1Y5M0lKbUQ1ZG02eUtKZm8xcGpuaHQzeUp4a0Q40100WiqtGS5n","reference":"813721","type":"mx_bank_transfer"},"type":"display_bank_transfer_instructions"}}

View File

@ -5,7 +5,7 @@
"displayName": "SIIP - Generador de Payment Intents Stripe",
"description": "Generador manual de Payment Intents Stripe para los clientes de UISP CRM, útil para conciliación de pagos no registrados en UISP CRM",
"url": "https://siip.mx",
"version": "1.3.1",
"version": "1.3.2",
"ucrmVersionCompliancy": {
"min": "1.0.0",
"max": null

View File

@ -624,6 +624,13 @@ if ($action === 'webhook') {
</div>
</div>
<div style="margin-bottom: 2rem;">
<a id="btnViewInCrm" href="#" target="_blank" class="btn btn-secondary" style="margin-top: -1rem; display: flex; align-items: center; gap: 8px; text-decoration: none; justify-content: center;">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
Ver en CRM
</a>
</div>
<div class="form-group">
<label for="amount">Monto a cobrar (MXN)</label>
<input type="number" id="amount" placeholder="0.00" min="10" step="0.01">
@ -725,6 +732,7 @@ if ($action === 'webhook') {
});
let debounceTimer;
const baseUrl = '<?= $baseUrl ?>';
let selectedClient = null;
// --- Search Logic ---
@ -787,6 +795,10 @@ if ($action === 'webhook') {
// Show details
detailsDiv.style.display = 'block';
// Update CRM Link
const btnViewInCrm = document.getElementById('btnViewInCrm');
btnViewInCrm.href = `${baseUrl}/client/${data.id}`;
// Validate Stripe ID for button
if (!data.stripeCustomerId) {
showAlert('error', 'El cliente no tiene vinculado un Clave Stripe Customer ID. No se puede generar el pago.');

View File

@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '070fb757d2f83111f7d49baa82baeade35c7bffa',
'reference' => '7bb6d7c0e2dcfaf848eb1c1b4bc72d81af970cef',
'name' => '__root__',
'dev' => false,
),
@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '070fb757d2f83111f7d49baa82baeade35c7bffa',
'reference' => '7bb6d7c0e2dcfaf848eb1c1b4bc72d81af970cef',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(