From 01f42e07d721cd5ef821677be8d8c7f03bdb4590 Mon Sep 17 00:00:00 2001 From: DANYDHSV Date: Mon, 30 Mar 2026 13:34:50 -0600 Subject: [PATCH] =?UTF-8?q?Se=20ajust=C3=B3=20el=20campo=20de=20RESUMEN=20?= =?UTF-8?q?que=20se=20sincroniza=20con=20callbell=20par=20redicir=20los=20?= =?UTF-8?q?caracteres=20a=20menos=20de=20500=20porque=20se=20estaban=20rec?= =?UTF-8?q?hazando=20por=20la=20API=20de=20callbell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 +- ...e la versión para el equipo - WhatsApp.txt | 0 data/config.json | 36 +- data/plugin.log | 290 ++++++++++++ public.php | 445 +----------------- scripts-uisp/audit_client_passwords.php | 0 scripts-uisp/debug_clients.php | 0 scripts-uisp/ejemplo_script_actualizador.php | 0 .../generate_invalid_password_list.php | 0 src/.DS_Store | Bin src/Data/NotificationData.php | 0 src/Data/PluginData.php | 0 src/Data/UcrmData.php | 0 src/Exception/CurlException.php | 0 src/Facade/AbstractMessageNotifierFacade.php | 0 src/Facade/AbstractOxxoOperationsFacade.php | 0 src/Facade/AbstractStripeOperationsFacade.php | 0 src/Facade/AbstractUpdateClientFacade.php | 0 src/Facade/ClientCallBellAPI.php | 3 - src/Facade/PluginNotifierFacade.php | 0 src/Facade/PluginOxxoNotifierFacade.php | 0 src/Facade/TwilioNotifierFacade.php | 0 src/Facade/pruebas_ucrm_api.php | 0 src/Factory/MessageTextFactory.php | 0 src/Factory/NotificationDataFactory.php | 0 src/Plugin.php | 0 src/Service/CurlExecutor.php | 0 src/Service/LogCleaner.php | 0 src/Service/Logger.php | 0 src/Service/MinioStorageService.php | 0 src/Service/OptionsManager.php | 0 src/Service/PaymentIntentService.php | 0 src/Service/PluginDataValidator.php | 0 src/Service/SmsNumberProvider.php | 0 src/Service/UcrmApi.php | 0 test_facade_crash.php | 0 views/oxxo.php | 208 ++++++++ views/stripe.php | 243 ++++++++++ 38 files changed, 754 insertions(+), 480 deletions(-) mode change 100644 => 100755 Datos de la versión para el equipo - WhatsApp.txt mode change 100644 => 100755 public.php mode change 100644 => 100755 scripts-uisp/audit_client_passwords.php mode change 100644 => 100755 scripts-uisp/debug_clients.php mode change 100644 => 100755 scripts-uisp/ejemplo_script_actualizador.php mode change 100644 => 100755 scripts-uisp/generate_invalid_password_list.php mode change 100644 => 100755 src/.DS_Store mode change 100644 => 100755 src/Data/NotificationData.php mode change 100644 => 100755 src/Data/PluginData.php mode change 100644 => 100755 src/Data/UcrmData.php mode change 100644 => 100755 src/Exception/CurlException.php mode change 100644 => 100755 src/Facade/AbstractMessageNotifierFacade.php mode change 100644 => 100755 src/Facade/AbstractOxxoOperationsFacade.php mode change 100644 => 100755 src/Facade/AbstractStripeOperationsFacade.php mode change 100644 => 100755 src/Facade/AbstractUpdateClientFacade.php mode change 100644 => 100755 src/Facade/ClientCallBellAPI.php mode change 100644 => 100755 src/Facade/PluginNotifierFacade.php mode change 100644 => 100755 src/Facade/PluginOxxoNotifierFacade.php mode change 100644 => 100755 src/Facade/TwilioNotifierFacade.php mode change 100644 => 100755 src/Facade/pruebas_ucrm_api.php mode change 100644 => 100755 src/Factory/MessageTextFactory.php mode change 100644 => 100755 src/Factory/NotificationDataFactory.php mode change 100644 => 100755 src/Plugin.php mode change 100644 => 100755 src/Service/CurlExecutor.php mode change 100644 => 100755 src/Service/LogCleaner.php mode change 100644 => 100755 src/Service/Logger.php mode change 100644 => 100755 src/Service/MinioStorageService.php mode change 100644 => 100755 src/Service/OptionsManager.php mode change 100644 => 100755 src/Service/PaymentIntentService.php mode change 100644 => 100755 src/Service/PluginDataValidator.php mode change 100644 => 100755 src/Service/SmsNumberProvider.php mode change 100644 => 100755 src/Service/UcrmApi.php mode change 100644 => 100755 test_facade_crash.php create mode 100755 views/oxxo.php create mode 100755 views/stripe.php diff --git a/.gitignore b/.gitignore index f79daec7..288b49c6 100755 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,12 @@ *.jpeg .vscode/ *.zip +*.apib +*.jrxml +*.jasper vouchers_oxxo/ -comprobantes/ \ No newline at end of file +comprobantes/ +pack-plugin-versioned.php +*.txt +Callbell Public API.postman_collection.json +unms-swagger.json diff --git a/Datos de la versión para el equipo - WhatsApp.txt b/Datos de la versión para el equipo - WhatsApp.txt old mode 100644 new mode 100755 diff --git a/data/config.json b/data/config.json index 14d0354d..eae757f3 100755 --- a/data/config.json +++ b/data/config.json @@ -1,35 +1 @@ -{ - "ipserver": "venus.siip.mx", - "apitoken": "gvcnIJqXdUjneVSjhl6THLlQcYXJyIFCcwHKVba2bvIrNraanCTb5VeoWuJ0TFZ9", - "unmsApiToken": "4f5219de-cc5b-413d-b2fb-5133d02f3b26", - "tokencallbell": "g8thcZkXGd3xBj2g3TtYNYFMH1fuesbJ.b6a940ea7d78cf6c9e42f067b21c8ddf96e9fa2a9e307bfd0c7c7c4d7fa38f79", - "tokenstripe": "sk_test_51OkG0REFY1WEUtgRH6UxBK5pu80Aq5Iy8EcdPnf0cOWzuVLQTpyLCd7CbPzqMsWMafZOHElCxhEHF7g8boURjWlJ00tBwE0W1M", - "hostServerFTP": "siip.mx", - "usernameServerFTP": "siip0001", - "passServerFTP": "$spGiT,[wa)n", - "ipPuppeteer": "172.16.5.134", - "portPuppeteer": "4100", - "idPaymentAdminCRM": "1180", - "cashPaymentMethodId": true, - "courtesyPaymentMethodId": true, - "bankTransferPaymentMethodId": true, - "paypalPaymentMethodId": true, - "creditCardPaypalPaymentMethodId": true, - "creditCardStripePaymentMethodId": true, - "stripeSubscriptionCreditCardPaymentMethodId": true, - "paypalSubscriptionPaymentMethodId": true, - "mercadopagoPaymentMethodId": true, - "checkPaymentMethodId": true, - "customPaymentMethodId": true, - "oxxoPayPaymentMethodId": true, - "creditDebitCardPaymentMethodId": true, - "notificationTypeText": false, - "installersDataWhatsApp": "{\"instaladores\":[{\"id\":1019,\"nombre\":\"Mucio Robledo\",\"whatsapp\":\"4181878106\"},{\"id\":1173,\"nombre\":\"Ángel Arvizu\",\"whatsapp\":\"4181878106\"},{\"id\":1172,\"nombre\":\"Juan Rostro\",\"whatsapp\":\"4181878106\"},{\"id\":1015,\"nombre\":\"Daniel Humberto\",\"whatsapp\":\"4181878106\"},{\"id\":1131,\"nombre\":\"Gricelda Avalos\",\"whatsapp\":\"4181817609\"},{\"id\":\"1184\",\"nombre\":\"José Luis Enrique Sánchez\",\"whatsapp\":\"4181878106\"}]}", - "debugMode": true, - "minioEndpoint": "http:\/\/172.16.5.134:9002", - "minioPublicUrl": "https:\/\/aws-venus.siip.mx", - "minioAccessKey": "minioadmin", - "minioSecretKey": "minioadmin", - "minioBucket": "vouchers-oxxo", - "logging_level": true -} \ No newline at end of file +{"ipserver":"venus.siip.mx","apitoken":"gvcnIJqXdUjneVSjhl6THLlQcYXJyIFCcwHKVba2bvIrNraanCTb5VeoWuJ0TFZ9","unmsApiToken":"4f5219de-cc5b-413d-b2fb-5133d02f3b26","tokencallbell":"g8thcZkXGd3xBj2g3TtYNYFMH1fuesbJ.b6a940ea7d78cf6c9e42f067b21c8ddf96e9fa2a9e307bfd0c7c7c4d7fa38f79","tokenstripe":"sk_test_51OkG0REFY1WEUtgRH6UxBK5pu80Aq5Iy8EcdPnf0cOWzuVLQTpyLCd7CbPzqMsWMafZOHElCxhEHF7g8boURjWlJ00tBwE0W1M","hostServerFTP":"siip.mx","usernameServerFTP":"siip0001","passServerFTP":"$spGiT,[wa)n","ipPuppeteer":"172.16.5.134","portPuppeteer":"4100","idPaymentAdminCRM":"1180","cashPaymentMethodId":true,"courtesyPaymentMethodId":true,"bankTransferPaymentMethodId":true,"paypalPaymentMethodId":true,"creditCardPaypalPaymentMethodId":true,"creditCardStripePaymentMethodId":true,"stripeSubscriptionCreditCardPaymentMethodId":true,"paypalSubscriptionPaymentMethodId":true,"mercadopagoPaymentMethodId":true,"checkPaymentMethodId":true,"customPaymentMethodId":true,"oxxoPayPaymentMethodId":true,"creditDebitCardPaymentMethodId":true,"notificationTypeText":false,"installersDataWhatsApp":"{\"instaladores\":[{\"id\":1019,\"nombre\":\"Mucio Robledo\",\"whatsapp\":\"4181878106\"},{\"id\":1173,\"nombre\":\"Ángel Arvizu\",\"whatsapp\":\"4181878106\"},{\"id\":1172,\"nombre\":\"Juan Rostro\",\"whatsapp\":\"4181878106\"},{\"id\":1015,\"nombre\":\"Daniel Humberto\",\"whatsapp\":\"4181878106\"},{\"id\":1131,\"nombre\":\"Gricelda Avalos\",\"whatsapp\":\"4181817609\"},{\"id\":\"1184\",\"nombre\":\"José Luis Enrique Sánchez\",\"whatsapp\":\"4181878106\"}]}","debugMode":true,"minioEndpoint":"http://172.16.5.134:9002","minioPublicUrl":"https://aws-venus.siip.mx","minioAccessKey":"minioadmin","minioSecretKey":"minioadmin","minioBucket":"vouchers-oxxo","logging_level":true} \ No newline at end of file diff --git a/data/plugin.log b/data/plugin.log index f91545af..156eb682 100755 --- a/data/plugin.log +++ b/data/plugin.log @@ -2202,3 +2202,293 @@ EJECUTANDO PATCH - Se detectaron cambios Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Payaso Loco","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-03-19T19:28:26Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https://dash.callbell.eu/chat/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Resumen":"{\"Cliente\": \"131\",\"Nombre\": \"Payaso Loco\",\"URL\": \"https://sistema.siip.mx/crm/client/131\",\"Saldo Actual\": \"💲300 pendientes\",\"Monto Ultimo Pago\": \"$ 300\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 12/03/2026 14:26 con Efectivo 💵\",\"Fecha Ultima Actualizacion\": \"22/03/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}}","Domicilio":"📍 Campeche 15, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México","Saldo Actual":"💲300 pendientes","Clabe Interbancaria":"124180599808752427","URL":"🌐 https://sistema.siip.mx/crm/client/131","Site":"0LOCS","Fecha Ultima Actualizacion":"📆🔄️ 22/03/2026 10:00","Cliente":"131","Monto Ultimo Pago":"💲 300","Antena/Sectorial":"Sectorial-4b 172.16.13.16/24","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}","Estado":"🟢 Activo ","Fecha Ultimo Pago":"📆💸 12/03/2026 14:26 con Efectivo 💵","user name":"Daniel Humberto","Nombre":"👤 Payaso Loco"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-24 6:25:03.641654] [notice] Logging level set to:debug +[2026-03-24 6:25:03.641716] [debug] Payload recibido: {"uuid":"1974083b-cbcb-48f9-926b-261f27f22fca","changeType":"overdue","entity":"invoice","entityId":"3225","eventName":"invoice.overdue","extraData":{"entity":{"id":3225,"clientId":118,"number":"003171","createdDate":"2026-03-09T10:00:01-0600","dueDate":"2026-03-23T10:00:01-0600","emailSentDate":"2026-03-24T00:00:00-0600","maturityDays":14,"taxableSupplyDate":"2026-03-07T18:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3242,"type":"service","label":"plan300 09\/02\/2026 \u2013 08\/03\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":105,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Toro Sentado","clientLastName":"Ram\u00edrez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"56 Chiapas","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-24 6:25:03.853774] [debug] Evento recibido: invoice.overdue +[2026-03-24 6:25:03.853889] [debug] Factura vencida + +[2026-03-24 6:25:03.853938] [debug] datos del notification para el invoice overdue:{"uuid":"1974083b-cbcb-48f9-926b-261f27f22fca","changeType":"overdue","entity":"invoice","entityId":3225,"message":null,"clientId":118,"eventName":"invoice.overdue","clientData":{"id":118,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"56 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 56, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":null,"sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-04-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Toro Sentado","lastName":"Ram\u00edrez","username":null,"contacts":[{"id":122,"clientId":118,"email":"pepeeltoro141089@gmail.com","phone":null,"name":null,"isBilling":true,"isContact":true,"types":[{"id":1,"name":"Billing"},{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":119,"clientId":118,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180173419260258","clientZoneVisible":true},{"id":216,"clientId":118,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"gYAIEK:Be}SK*01z5+\/V","clientZoneVisible":false},{"id":277,"clientId":118,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true}],"accountBalance":-300,"accountCredit":0,"accountOutstanding":300,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#fb8c00","addressGpsLat":21.1572733,"addressGpsLon":-100.9403274,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":true,"hasOutage":false,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":{"id":3225,"clientId":118,"number":"003171","createdDate":"2026-03-09T10:00:01-0600","dueDate":"2026-03-23T10:00:01-0600","emailSentDate":"2026-03-24T00:00:00-0600","maturityDays":14,"taxableSupplyDate":"2026-03-07T18:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3242,"type":"service","label":"plan300 09\/02\/2026 \u2013 08\/03\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":105,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":-0,"discountQuantity":0,"discountTotal":-0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":-0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Toro Sentado","clientLastName":"Ram\u00edrez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"56 Chiapas","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"paymentData":null} + +contac vacio +[2026-03-24 16:00:06.096209] [notice] Logging level set to:debug +[2026-03-24 16:00:06.096283] [debug] Payload recibido: {"uuid":"2d5d3f5f-d458-4294-a075-df97f2e05c76","changeType":"draft_approved","entity":"invoice","entityId":"3259","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3259,"clientId":126,"number":"003205","createdDate":"2026-03-24T10:00:02-0600","dueDate":"2026-04-07T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-23T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":3277,"type":"service","label":"PREMIUM 24\/02\/2026 \u2013 23\/03\/2026","price":700,"quantity":1,"total":700,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":108,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":700,"discount":null,"discountLabel":"Descuento","taxes":[],"total":700,"amountPaid":0,"totalUntaxed":700,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":700,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"DANIEL INNU","clientLastName":"RATA","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"Chiapas","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-24 16:00:06.317420] [debug] Evento recibido: invoice.draft_approved +[2026-03-24 16:00:06.317631] [debug] Aprobación de Factura + +[2026-03-24 18:30:03.532710] [notice] Logging level set to:debug +[2026-03-24 18:30:03.532932] [debug] Payload recibido: {"uuid":"cac0f515-a664-4691-9458-e097dccd2136","changeType":"suspend","entity":"service","entityId":"105","eventName":"service.suspend","extraData":{"entity":{"id":105,"prepaid":false,"clientId":118,"status":3,"name":"plan300","fullAddress":"Chiapas 56, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","street1":"56 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","note":null,"addressGpsLat":21.1572733,"addressGpsLon":-100.9403274,"servicePlanId":2,"servicePlanPeriodId":7,"price":300,"hasIndividualPrice":false,"totalPrice":300,"currencyCode":"MXN","invoiceLabel":null,"contractId":null,"contractLengthType":1,"minimumContractLengthMonths":null,"activeFrom":"2024-05-09T00:00:00-0600","activeTo":null,"contractEndDate":null,"discountType":0,"discountValue":null,"discountInvoiceLabel":"Descuento","discountFrom":null,"discountTo":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"invoicingStart":"2024-05-09T00:00:00-0600","invoicingPeriodType":1,"invoicingPeriodStartDay":9,"nextInvoicingDayAdjustment":0,"invoicingProratedSeparately":true,"invoicingSeparately":false,"sendEmailsAutomatically":null,"useCreditAutomatically":true,"servicePlanName":"plan300","servicePlanPrice":300,"servicePlanPeriod":1,"servicePlanType":"Internet","downloadSpeed":6,"uploadSpeed":6,"hasOutage":false,"unmsClientSiteStatus":null,"fccBlockId":null,"lastInvoicedDate":"2026-03-08T00:00:00-0600","unmsClientSiteId":"90bd91a5-5a63-4b3b-9970-d5b4e3bbd49e","attributes":[],"addressData":null,"suspensionReasonId":1,"serviceChangeRequestId":null,"setupFeePrice":null,"earlyTerminationFeePrice":null,"downloadSpeedOverride":null,"uploadSpeedOverride":null,"trafficShapingOverrideEnd":null,"trafficShapingOverrideEnabled":false,"servicePlanGroupId":null,"suspensionPeriods":[{"id":99,"startDate":"2024-06-09T00:00:00-0600","endDate":"2026-01-19T00:00:00-0600"},{"id":198,"startDate":"2026-02-24T00:00:00-0600","endDate":"2026-02-27T00:00:00-0600"},{"id":208,"startDate":"2026-03-24T12:30:02-0600","endDate":null}],"surcharges":[]},"entityBeforeEdit":{"id":105,"prepaid":false,"clientId":118,"status":1,"name":"plan300","fullAddress":"Chiapas 56, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","street1":"56 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","note":null,"addressGpsLat":21.1572733,"addressGpsLon":-100.9403274,"servicePlanId":2,"servicePlanPeriodId":7,"price":300,"hasIndividualPrice":false,"totalPrice":300,"currencyCode":"MXN","invoiceLabel":null,"contractId":null,"contractLengthType":1,"minimumContractLengthMonths":null,"activeFrom":"2024-05-09T00:00:00-0600","activeTo":null,"contractEndDate":null,"discountType":0,"discountValue":null,"discountInvoiceLabel":"Descuento","discountFrom":null,"discountTo":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"invoicingStart":"2024-05-09T00:00:00-0600","invoicingPeriodType":1,"invoicingPeriodStartDay":9,"nextInvoicingDayAdjustment":0,"invoicingProratedSeparately":true,"invoicingSeparately":false,"sendEmailsAutomatically":null,"useCreditAutomatically":true,"servicePlanName":"plan300","servicePlanPrice":300,"servicePlanPeriod":1,"servicePlanType":"Internet","downloadSpeed":6,"uploadSpeed":6,"hasOutage":false,"unmsClientSiteStatus":null,"fccBlockId":null,"lastInvoicedDate":"2026-03-08T00:00:00-0600","unmsClientSiteId":"90bd91a5-5a63-4b3b-9970-d5b4e3bbd49e","attributes":[],"addressData":null,"suspensionReasonId":null,"serviceChangeRequestId":null,"setupFeePrice":null,"earlyTerminationFeePrice":null,"downloadSpeedOverride":null,"uploadSpeedOverride":null,"trafficShapingOverrideEnd":null,"trafficShapingOverrideEnabled":false,"servicePlanGroupId":null,"suspensionPeriods":[{"id":99,"startDate":"2024-06-09T00:00:00-0600","endDate":"2026-01-19T00:00:00-0600"},{"id":198,"startDate":"2026-02-24T00:00:00-0600","endDate":"2026-02-27T00:00:00-0600"},{"id":208,"startDate":"2026-03-24T12:30:02-0600","endDate":null}],"surcharges":[]}}} + +[2026-03-24 18:30:03.945204] [debug] Evento recibido: service.suspend +[2026-03-24 18:30:03.945446] [debug] Se suspendió el servicio a un cliente + +[2026-03-24 18:30:04.165610] [notice] Logging level set to:debug +[2026-03-24 18:30:04.165769] [debug] Payload recibido: {"uuid":"7b6f189f-81c2-43fe-84b7-5ca200bbbd1b","changeType":"edit","entity":"service","entityId":"105","eventName":"service.edit","extraData":{"entity":{"id":105,"prepaid":false,"clientId":118,"status":3,"name":"plan300","fullAddress":"Chiapas 56, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","street1":"56 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","note":null,"addressGpsLat":21.1572733,"addressGpsLon":-100.9403274,"servicePlanId":2,"servicePlanPeriodId":7,"price":300,"hasIndividualPrice":false,"totalPrice":300,"currencyCode":"MXN","invoiceLabel":null,"contractId":null,"contractLengthType":1,"minimumContractLengthMonths":null,"activeFrom":"2024-05-09T00:00:00-0600","activeTo":null,"contractEndDate":null,"discountType":0,"discountValue":null,"discountInvoiceLabel":"Descuento","discountFrom":null,"discountTo":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"invoicingStart":"2024-05-09T00:00:00-0600","invoicingPeriodType":1,"invoicingPeriodStartDay":9,"nextInvoicingDayAdjustment":0,"invoicingProratedSeparately":true,"invoicingSeparately":false,"sendEmailsAutomatically":null,"useCreditAutomatically":true,"servicePlanName":"plan300","servicePlanPrice":300,"servicePlanPeriod":1,"servicePlanType":"Internet","downloadSpeed":6,"uploadSpeed":6,"hasOutage":false,"unmsClientSiteStatus":null,"fccBlockId":null,"lastInvoicedDate":"2026-03-08T00:00:00-0600","unmsClientSiteId":"90bd91a5-5a63-4b3b-9970-d5b4e3bbd49e","attributes":[],"addressData":null,"suspensionReasonId":1,"serviceChangeRequestId":null,"setupFeePrice":null,"earlyTerminationFeePrice":null,"downloadSpeedOverride":null,"uploadSpeedOverride":null,"trafficShapingOverrideEnd":null,"trafficShapingOverrideEnabled":false,"servicePlanGroupId":null,"suspensionPeriods":[{"id":99,"startDate":"2024-06-09T00:00:00-0600","endDate":"2026-01-19T00:00:00-0600"},{"id":198,"startDate":"2026-02-24T00:00:00-0600","endDate":"2026-02-27T00:00:00-0600"},{"id":208,"startDate":"2026-03-24T12:30:02-0600","endDate":null}],"surcharges":[]},"entityBeforeEdit":{"id":105,"prepaid":false,"clientId":118,"status":1,"name":"plan300","fullAddress":"Chiapas 56, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","street1":"56 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","note":null,"addressGpsLat":21.1572733,"addressGpsLon":-100.9403274,"servicePlanId":2,"servicePlanPeriodId":7,"price":300,"hasIndividualPrice":false,"totalPrice":300,"currencyCode":"MXN","invoiceLabel":null,"contractId":null,"contractLengthType":1,"minimumContractLengthMonths":null,"activeFrom":"2024-05-09T00:00:00-0600","activeTo":null,"contractEndDate":null,"discountType":0,"discountValue":null,"discountInvoiceLabel":"Descuento","discountFrom":null,"discountTo":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"invoicingStart":"2024-05-09T00:00:00-0600","invoicingPeriodType":1,"invoicingPeriodStartDay":9,"nextInvoicingDayAdjustment":0,"invoicingProratedSeparately":true,"invoicingSeparately":false,"sendEmailsAutomatically":null,"useCreditAutomatically":true,"servicePlanName":"plan300","servicePlanPrice":300,"servicePlanPeriod":1,"servicePlanType":"Internet","downloadSpeed":6,"uploadSpeed":6,"hasOutage":false,"unmsClientSiteStatus":null,"fccBlockId":null,"lastInvoicedDate":"2026-03-08T00:00:00-0600","unmsClientSiteId":"90bd91a5-5a63-4b3b-9970-d5b4e3bbd49e","attributes":[],"addressData":null,"suspensionReasonId":null,"serviceChangeRequestId":null,"setupFeePrice":null,"earlyTerminationFeePrice":null,"downloadSpeedOverride":null,"uploadSpeedOverride":null,"trafficShapingOverrideEnd":null,"trafficShapingOverrideEnabled":false,"servicePlanGroupId":null,"suspensionPeriods":[{"id":99,"startDate":"2024-06-09T00:00:00-0600","endDate":"2026-01-19T00:00:00-0600"},{"id":198,"startDate":"2026-02-24T00:00:00-0600","endDate":"2026-02-27T00:00:00-0600"},{"id":208,"startDate":"2026-03-24T12:30:02-0600","endDate":null}],"surcharges":[]}}} + +[2026-03-24 18:30:04.479372] [debug] Evento recibido: service.edit +[2026-03-24 18:30:04.479590] [debug] Se editó el servicio a un cliente + +[2026-03-24 18:30:04.481663] [info] Iniciando verificación/sincronización de contraseña para el cliente ID: 118 +[2026-03-25 16:00:04.753396] [notice] Logging level set to:debug +[2026-03-25 16:00:04.753459] [debug] Payload recibido: {"uuid":"d17f781c-54a0-4ed8-a47d-3bcd9bd59083","changeType":"draft_approved","entity":"invoice","entityId":"3260","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3260,"clientId":1,"number":"003206","createdDate":"2026-03-25T10:00:01-0600","dueDate":"2026-04-08T10:00:01-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-25T00:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3278,"type":"service","label":"PREMIUM 25\/03\/2026 \u2013 24\/04\/2026","price":700,"quantity":1,"total":700,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":132,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":700,"discount":null,"discountLabel":"Descuento","taxes":[],"total":700,"amountPaid":0,"totalUntaxed":700,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":700,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Don Miguel \u00c1ngel","clientLastName":"Guerrero Gonz\u00e1lez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"Calle Morelos 34","clientStreet2":null,"clientCity":"Dolores Hidalgo","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-25 16:00:05.003508] [debug] Evento recibido: invoice.draft_approved +[2026-03-25 16:00:05.003623] [debug] Aprobación de Factura + +[2026-03-25 16:00:05.003747] [debug] onlyUpdate: Iniciando actualización para teléfono: 5214181148554 +[2026-03-25 16:00:05.003869] [debug] onlyUpdate: Teléfono validado: 5214181148554 +[2026-03-25 16:00:05.992825] [debug] onlyUpdate: Contacto obtenido de CallBell: {"contact":{"uuid":"0e53e926ce424db5b9284a75915d24fe","name":"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","phoneNumber":"5214181148554","avatarUrl":null,"createdAt":"2024-01-26T17:29:28Z","closedAt":"2025-10-09T16:32:07Z","source":"whatsapp","funnelId":null,"href":"https:\/\/dash.callbell.eu\/contacts\/0e53e926ce424db5b9284a75915d24fe","conversationHref":"https:\/\/dash.callbell.eu\/chat\/f017e454a6b94ab297509274216c6795","tags":["SIIP","Sus","Contra."],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Clientes Relacionados":"oxxo","Antena\/Sectorial":"1","Nombre":"\ud83d\udc64 Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","Clabe Interbancaria":"002180697144444854","Acciones":"1","Domicilio":"\ud83d\udccd Calle Morelos 34, Dolores Hidalgo, 37800","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/1","Cliente":"1","user name":"Angel","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/1\",\"Saldo Actual\": \"\ud83d\udcb27500 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"22\/03\/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}","Saldo Actual":"\ud83d\udcb27500 pendientes","Monto Ultimo Pago":"\ud83d\udcb2 70","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5","Estado":"\ud83d\udfe0 Suspendido","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}","Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 22\/03\/2026 10:00"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-25 16:00:05.992944] [info] onlyUpdate: Ejecutando patchWhatsapp para teléfono: 5214181148554 +Notificacion data: {"uuid":"d17f781c-54a0-4ed8-a47d-3bcd9bd59083","changeType":"draft_approved","entity":"invoice","entityId":3260,"message":null,"clientId":1,"eventName":"invoice.draft_approved","clientData":{"id":1,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Calle Morelos 34","street2":null,"city":"Dolores Hidalgo","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Calle Morelos 34, Dolores Hidalgo, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"El jefe","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-15T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Don Miguel \u00c1ngel","lastName":"Guerrero Gonz\u00e1lez","username":"dguerrero01","contacts":[{"id":1,"clientId":1,"email":"mangelgg@gmail.com","phone":"5214181148554","name":null,"isBilling":true,"isContact":true,"types":[{"id":1,"name":"Billing"},{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":110,"clientId":1,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PdQvAvQ2wipl5k","clientZoneVisible":true},{"id":111,"clientId":1,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180697144444854","clientZoneVisible":true},{"id":203,"clientId":1,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"gYAIEK:Be}SK*01z5+\/V","clientZoneVisible":false}],"accountBalance":-8200,"accountCredit":0,"accountOutstanding":8200,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3f51b5","addressGpsLat":21.1572096,"addressGpsLon":-100.9377327,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":true,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":{"id":3260,"clientId":1,"number":"003206","createdDate":"2026-03-25T10:00:01-0600","dueDate":"2026-04-08T10:00:01-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-25T00:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3278,"type":"service","label":"PREMIUM 25\/03\/2026 \u2013 24\/04\/2026","price":700,"quantity":1,"total":700,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":132,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":-0,"discountQuantity":0,"discountTotal":-0}],"subtotal":700,"discount":null,"discountLabel":"Descuento","taxes":[],"total":700,"amountPaid":0,"totalUntaxed":700,"totalDiscount":-0,"totalTaxAmount":0,"amountToPay":700,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Don Miguel \u00c1ngel","clientLastName":"Guerrero Gonz\u00e1lez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"Calle Morelos 34","clientStreet2":null,"clientCity":"Dolores Hidalgo","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"paymentData":null} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":696,"clientId":1,"methodId":"6efe0fa8-36b2-4dd1-b049-427bffc7d369","checkNumber":null,"createdDate":"2025-11-28T12:22:40-0600","amount":70,"currencyCode":"MXN","note":null,"receiptSentDate":"2025-11-28T12:22:43-0600","providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[{"id":832,"invoiceId":2712,"paymentId":696,"creditNoteId":null,"refundId":null,"amount":70}],"creditAmount":0,"userId":1015,"attributes":[]}] + +Nombre del cliente que se va a actualizar: Don Miguel Ángel Guerrero González + +UUID: 0e53e926ce424db5b9284a75915d24fe + +JSON con los datos a actualizar: {"name":"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","custom_fields":{"Site":"","Estado":"\ud83d\udfe0 Suspendido","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/1","Nombre":"\ud83d\udc64 Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","Cliente":1,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 25\/03\/2026 10:00","Saldo Actual":"\ud83d\udcb28200 pendientes","Monto Ultimo Pago":"\ud83d\udcb2 70","Clabe Interbancaria":"002180697144444854","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5","Antena\/Sectorial":"","Domicilio":"\ud83d\udccd Calle Morelos 34, Dolores Hidalgo, 37800","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/1\",\"Saldo Actual\": \"\ud83d\udcb28200 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"25\/03\/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲7500 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲8200 pendientes' + +DEBUG COMPARACIÓN - CallBell Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - UCRM Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - Diferencia encontrada en Saldo Actual. CallBell: '💲7500 pendientes', UCRM: '💲8200 pendientes' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"0e53e926ce424db5b9284a75915d24fe","name":"Don Miguel Ángel Guerrero González","phoneNumber":"5214181148554","avatarUrl":null,"createdAt":"2024-01-26T17:29:28Z","closedAt":"2025-10-09T16:32:07Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/0e53e926ce424db5b9284a75915d24fe","conversationHref":"https://dash.callbell.eu/chat/f017e454a6b94ab297509274216c6795","tags":["SIIP","Sus","Contra."],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Clientes Relacionados":"oxxo","Antena/Sectorial":"1","Nombre":"👤 Don Miguel Ángel Guerrero González","Clabe Interbancaria":"002180697144444854","Acciones":"1","Domicilio":"📍 Calle Morelos 34, Dolores Hidalgo, 37800","URL":"🌐 https://sistema.siip.mx/crm/client/1","Cliente":"1","user name":"Angel","Saldo Actual":"💲8200 pendientes","Monto Ultimo Pago":"💲 70","Fecha Ultimo Pago":"📆💸 28/11/2025 12:22 con Efectivo 💵","Estado":"🟠 Suspendido","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}","Fecha Ultima Actualizacion":"📆🔄️ 25/03/2026 10:00","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel Ángel Guerrero González\",\"URL\": \"https://sistema.siip.mx/crm/client/1\",\"Saldo Actual\": \"💲8200 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28/11/2025 12:22 con Efectivo 💵\",\"Fecha Ultima Actualizacion\": \"25/03/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}}"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} + +[2026-03-26 19:37:10.825170] [notice] Logging level set to:debug +[2026-03-26 19:37:10.825855] [debug] Payload recibido: {"uuid":"manual-trigger","changeType":"insert","entity":"payment","entityId":990,"eventName":"payment.add","clientData":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola dfg","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"paymentData":{"id":990,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}} + +[2026-03-26 19:37:10.972754] [debug] Evento recibido: payment.add +[2026-03-26 19:37:10.972904] [debug] Notification encodificado en JSON:{"uuid":"manual-trigger","changeType":"insert","entity":"payment","entityId":990,"message":null,"clientId":2,"eventName":"payment.add","clientData":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola dfg","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":990,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}} + +[2026-03-26 19:37:10.972937] [info] Verificando existencia de atributo 'tipoPagoStripe' para Payment ID: 990 +[2026-03-26 19:37:10.976382] [warning] Microservice metadata fetch failed: cURL error 7: Failed to connect to 172.16.5.134 port 4100 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://172.16.5.134:4100/stripe-metadata/990 +[2026-03-26 19:37:11.073437] [debug] Payment 990 already has User ID: 1180 +[2026-03-26 19:37:11.156362] [info] Payment 990 has wrong Method ID (1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae). Patching to 93814765-66a1-4c7d-a777-05c18fd6aab3 via Microservice. +[2026-03-26 19:37:11.156848] [error] Failed to patch Payment Method ID via microservice: cURL error 7: Failed to connect to 172.16.5.134 port 4100 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://172.16.5.134:4100/payments/990/method +[2026-03-26 19:37:11.228297] [debug] Payment 990 ya tiene atributo 'OXXO Pay' y no hay metadata. Respetando. +Eviando comprobante de pago al cliente: 2 con número: 5214181878106 + +El archivo PDF se ha descargado y guardado correctamente en: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.pdf + +El archivo PDF es válido y tiene contenido: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.pdf + +Procesando PDF con microservicio: http://pdf-cropper-service:8000/process + +Imagen generada por microservicio guardada en: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.jpg + +[2026-03-26 19:37:11.914164] [info] Archivo subido exitosamente a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Daniel_Humberto_Soto_Villegas_1774553831.jpg +Imagen subida a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Daniel_Humberto_Soto_Villegas_1774553831.jpg + +Archivos temporales (PDF/JPG) eliminados tras subida exitosa. + +Proceso de obtención de imagen finalizado. + +La cadena CURL que se envia es: { + "to": "5214181878106", + "from": "whatsapp", + "type": "document", + "content": { + "text": "S/M", + "url": "https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Daniel_Humberto_Soto_Villegas_1774553831.jpg" + }, + "template_values": ["Daniel Humberto Soto Villegas", "$280", "$910 a favor"], + "template_uuid": "57ead79cebd14902921477922403093b", + "optin_contact": true + } +Response del CallBell: {"message":{"uuid":"06b32e16290a49f795f39a734a5cac17","status":"enqueued"}} +Hay menos de 100 archivos en el directorio. No se eliminarán archivos. + +La notificación fue enviada correctamente con estado: enqueued + +Notificacion data: {"uuid":"manual-trigger","changeType":"insert","entity":"payment","entityId":990,"message":null,"clientId":2,"eventName":"payment.add","clientData":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola dfg","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":990,"clientId":2,"methodId":"93814765-66a1-4c7d-a777-05c18fd6aab3","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":990,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}] + +Nombre del cliente que se va a actualizar: Daniel Humberto Soto Villegas + +UUID: 74cc2bb45eb8409f92cd5dba99200d26 + +JSON con los datos a actualizar: {"name":"Daniel Humberto Soto Villegas","custom_fields":{"Site":"VENUS","Estado":"\ud83d\udfe2 Activo ","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/2","Nombre":"\ud83d\udc64 Daniel Humberto Soto Villegas","Cliente":2,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 26\/03\/2026 13:37","Saldo Actual":"\ud83d\udcb2910 a favor","Monto Ultimo Pago":"\ud83d\udcb2 280","Clabe Interbancaria":"0021804341999569810","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3","Antena\/Sectorial":"Sectorial de pruebas 172.16.5.134","Domicilio":"\ud83d\udccd Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","Resumen":"{\"Cliente\": \"2\",\"Nombre\": \"Daniel Humberto Soto Villegas\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/2\",\"Saldo Actual\": \"\ud83d\udcb2910 a favor\",\"Monto Ultimo Pago\": \"$ 280\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"26\/03\/2026 13:37\",\"Clabe Interbancaria\": \"0021804341999569810\",\"Site\": \"VENUS\",\"Antena\/Sectorial\": \"Sectorial de pruebas 172.16.5.134\",\"Password Antena\": {\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}}","password-antena":"{\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲300 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲910 a favor' + +DEBUG COMPARACIÓN - CallBell Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - UCRM Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - Diferencia en name. CallBell: 'Payaso Loco', UCRM: 'Daniel Humberto Soto Villegas' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"error":{"custom_fields":["Resumen: is too long (maximum is 500 characters)"]}} + +[2026-03-27 16:00:06.301808] [notice] Logging level set to:debug +[2026-03-27 16:00:06.301888] [debug] Payload recibido: {"uuid":"a3319f86-e96d-4855-88be-b1625602a37f","changeType":"draft_approved","entity":"invoice","entityId":"3261","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3261,"clientId":1,"number":"003207","createdDate":"2026-03-27T10:00:02-0600","dueDate":"2026-04-10T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-27T00:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3279,"type":"service","label":"plan300 27\/03\/2026 \u2013 26\/04\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":133,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Don Miguel \u00c1ngel","clientLastName":"Guerrero Gonz\u00e1lez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"Calle Morelos 34","clientStreet2":null,"clientCity":"Dolores Hidalgo","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-27 16:00:06.582684] [debug] Evento recibido: invoice.draft_approved +[2026-03-27 16:00:06.582804] [debug] Aprobación de Factura + +[2026-03-27 16:00:06.582943] [debug] onlyUpdate: Iniciando actualización para teléfono: 5214181148554 +[2026-03-27 16:00:06.583082] [debug] onlyUpdate: Teléfono validado: 5214181148554 +[2026-03-27 16:00:07.406995] [debug] onlyUpdate: Contacto obtenido de CallBell: {"contact":{"uuid":"0e53e926ce424db5b9284a75915d24fe","name":"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","phoneNumber":"5214181148554","avatarUrl":null,"createdAt":"2024-01-26T17:29:28Z","closedAt":"2025-10-09T16:32:07Z","source":"whatsapp","funnelId":null,"href":"https:\/\/dash.callbell.eu\/contacts\/0e53e926ce424db5b9284a75915d24fe","conversationHref":"https:\/\/dash.callbell.eu\/chat\/f017e454a6b94ab297509274216c6795","tags":["SIIP","Sus","Contra."],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Clientes Relacionados":"oxxo","Antena\/Sectorial":"1","Nombre":"\ud83d\udc64 Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","Clabe Interbancaria":"002180697144444854","Acciones":"1","Domicilio":"\ud83d\udccd Calle Morelos 34, Dolores Hidalgo, 37800","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/1","Cliente":"1","user name":"Angel","Saldo Actual":"\ud83d\udcb28200 pendientes","Monto Ultimo Pago":"\ud83d\udcb2 70","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5","Estado":"\ud83d\udfe0 Suspendido","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}","Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 25\/03\/2026 10:00","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/1\",\"Saldo Actual\": \"\ud83d\udcb28200 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"25\/03\/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-27 16:00:07.407066] [info] onlyUpdate: Ejecutando patchWhatsapp para teléfono: 5214181148554 +Notificacion data: {"uuid":"a3319f86-e96d-4855-88be-b1625602a37f","changeType":"draft_approved","entity":"invoice","entityId":3261,"message":null,"clientId":1,"eventName":"invoice.draft_approved","clientData":{"id":1,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Calle Morelos 34","street2":null,"city":"Dolores Hidalgo","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Calle Morelos 34, Dolores Hidalgo, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"El jefe","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-15T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Don Miguel \u00c1ngel","lastName":"Guerrero Gonz\u00e1lez","username":"dguerrero01","contacts":[{"id":1,"clientId":1,"email":"mangelgg@gmail.com","phone":"5214181148554","name":null,"isBilling":true,"isContact":true,"types":[{"id":1,"name":"Billing"},{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":110,"clientId":1,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PdQvAvQ2wipl5k","clientZoneVisible":true},{"id":111,"clientId":1,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180697144444854","clientZoneVisible":true},{"id":203,"clientId":1,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"gYAIEK:Be}SK*01z5+\/V","clientZoneVisible":false}],"accountBalance":-8500,"accountCredit":0,"accountOutstanding":8500,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3f51b5","addressGpsLat":21.1572096,"addressGpsLon":-100.9377327,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":true,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":{"id":3261,"clientId":1,"number":"003207","createdDate":"2026-03-27T10:00:02-0600","dueDate":"2026-04-10T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-27T00:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3279,"type":"service","label":"plan300 27\/03\/2026 \u2013 26\/04\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":133,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":-0,"discountQuantity":0,"discountTotal":-0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":-0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Don Miguel \u00c1ngel","clientLastName":"Guerrero Gonz\u00e1lez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"Calle Morelos 34","clientStreet2":null,"clientCity":"Dolores Hidalgo","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"paymentData":null} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":696,"clientId":1,"methodId":"6efe0fa8-36b2-4dd1-b049-427bffc7d369","checkNumber":null,"createdDate":"2025-11-28T12:22:40-0600","amount":70,"currencyCode":"MXN","note":null,"receiptSentDate":"2025-11-28T12:22:43-0600","providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[{"id":832,"invoiceId":2712,"paymentId":696,"creditNoteId":null,"refundId":null,"amount":70}],"creditAmount":0,"userId":1015,"attributes":[]}] + +Nombre del cliente que se va a actualizar: Don Miguel Ángel Guerrero González + +UUID: 0e53e926ce424db5b9284a75915d24fe + +JSON con los datos a actualizar: {"name":"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","custom_fields":{"Site":"","Estado":"\ud83d\udfe0 Suspendido","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/1","Nombre":"\ud83d\udc64 Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez","Cliente":1,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 27\/03\/2026 10:00","Saldo Actual":"\ud83d\udcb28500 pendientes","Monto Ultimo Pago":"\ud83d\udcb2 70","Clabe Interbancaria":"002180697144444854","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5","Antena\/Sectorial":"","Domicilio":"\ud83d\udccd Calle Morelos 34, Dolores Hidalgo, 37800","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel \u00c1ngel Guerrero Gonz\u00e1lez\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/1\",\"Saldo Actual\": \"\ud83d\udcb28500 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:22 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"27\/03\/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲8200 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲8500 pendientes' + +DEBUG COMPARACIÓN - CallBell Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - UCRM Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - Diferencia encontrada en Saldo Actual. CallBell: '💲8200 pendientes', UCRM: '💲8500 pendientes' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"0e53e926ce424db5b9284a75915d24fe","name":"Don Miguel Ángel Guerrero González","phoneNumber":"5214181148554","avatarUrl":null,"createdAt":"2024-01-26T17:29:28Z","closedAt":"2025-10-09T16:32:07Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/0e53e926ce424db5b9284a75915d24fe","conversationHref":"https://dash.callbell.eu/chat/f017e454a6b94ab297509274216c6795","tags":["SIIP","Sus","Contra."],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Clientes Relacionados":"oxxo","Antena/Sectorial":"1","Nombre":"👤 Don Miguel Ángel Guerrero González","Clabe Interbancaria":"002180697144444854","Acciones":"1","Domicilio":"📍 Calle Morelos 34, Dolores Hidalgo, 37800","URL":"🌐 https://sistema.siip.mx/crm/client/1","Cliente":"1","user name":"Angel","Saldo Actual":"💲8500 pendientes","Monto Ultimo Pago":"💲 70","Fecha Ultimo Pago":"📆💸 28/11/2025 12:22 con Efectivo 💵","Estado":"🟠 Suspendido","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}","Resumen":"{\"Cliente\": \"1\",\"Nombre\": \"Don Miguel Ángel Guerrero González\",\"URL\": \"https://sistema.siip.mx/crm/client/1\",\"Saldo Actual\": \"💲8500 pendientes\",\"Monto Ultimo Pago\": \"$ 70\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28/11/2025 12:22 con Efectivo 💵\",\"Fecha Ultima Actualizacion\": \"27/03/2026 10:00\",\"Clabe Interbancaria\": \"002180697144444854\",\"Site\": \"\",\"Antena/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\/V\"}}","Fecha Ultima Actualizacion":"📆🔄️ 27/03/2026 10:00"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} + +[2026-03-27 16:00:10.003917] [notice] Logging level set to:debug +[2026-03-27 16:00:10.004065] [debug] Payload recibido: {"uuid":"c8b118ff-8bdf-447d-9b25-5940c82b59c5","changeType":"draft_approved","entity":"invoice","entityId":"3262","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3262,"clientId":3,"number":"003208","createdDate":"2026-03-27T10:00:02-0600","dueDate":"2026-04-10T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-27T00:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3280,"type":"service","label":"plan300 27\/03\/2026 \u2013 26\/04\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":3,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Lupita","clientLastName":"Morales","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"56 Oaxaca","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-27 16:00:10.281590] [debug] Evento recibido: invoice.draft_approved +[2026-03-27 16:00:10.281697] [debug] Aprobación de Factura + +[2026-03-27 16:00:14.098923] [notice] Logging level set to:debug +[2026-03-27 16:00:14.098992] [debug] Payload recibido: {"uuid":"e38a4df3-81a4-4cb7-b0b1-ba0f318be65b","changeType":"draft_approved","entity":"invoice","entityId":"3263","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3263,"clientId":4,"number":"003209","createdDate":"2026-03-27T10:00:02-0600","dueDate":"2026-04-10T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-26T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":3281,"type":"service","label":"plan300 27\/02\/2026 \u2013 26\/03\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":4,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Griselda","clientLastName":"Avalos","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"23 Yucat\u00e1n","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-03-27 16:00:14.405543] [debug] Evento recibido: invoice.draft_approved +[2026-03-27 16:00:14.405680] [debug] Aprobación de Factura + +[2026-03-27 16:00:14.405843] [debug] onlyUpdate: Iniciando actualización para teléfono: 4181156999 +[2026-03-27 16:00:14.406002] [debug] onlyUpdate: Teléfono validado: 524181156999 +[2026-03-27 16:00:15.163201] [debug] onlyUpdate: Contacto obtenido de CallBell: {"contact":{"uuid":"6620b434a8594fc489e18e90363d59bd","name":"Griselda Avalos","phoneNumber":"5214181156999","avatarUrl":null,"createdAt":"2025-01-28T20:37:36Z","closedAt":"2025-01-28T22:38:41Z","source":"whatsapp","funnelId":null,"href":"https:\/\/dash.callbell.eu\/contacts\/6620b434a8594fc489e18e90363d59bd","conversationHref":"https:\/\/dash.callbell.eu\/chat\/1a14b3d2ad4141fa8447878f95cce1d6","tags":[],"assignedUser":null,"customFields":{"Antena\/Sectorial":"4","Domicilio":"\ud83d\udccd Yucat\u00e1n 23, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Nombre":"\ud83d\udc64 Griselda Avalos","Cliente":"4","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/4","Monto Ultimo Pago":"\ud83d\udcb2 6900","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:23 con Efectivo \ud83d\udcb5","Estado":"\ud83d\udfe0 Suspendido","password-antena":"{\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}","Resumen":"{\"Cliente\": \"4\",\"Nombre\": \"Griselda Avalos\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/4\",\"Saldo Actual\": \"\ud83d\udcb2900 pendientes\",\"Monto Ultimo Pago\": \"$ 6900\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:23 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"27\/02\/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}}","Saldo Actual":"\ud83d\udcb2900 pendientes","Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 27\/02\/2026 10:00"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-27 16:00:15.163317] [info] onlyUpdate: Ejecutando patchWhatsapp para teléfono: 524181156999 +Notificacion data: {"uuid":"e38a4df3-81a4-4cb7-b0b1-ba0f318be65b","changeType":"draft_approved","entity":"invoice","entityId":3263,"message":null,"clientId":4,"eventName":"invoice.draft_approved","clientData":{"id":4,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"23 Yucat\u00e1n","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Yucat\u00e1n 23, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":null,"sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-27T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Griselda","lastName":"Avalos","username":"gavalos04","contacts":[{"id":4,"clientId":4,"email":"chicarosa@gmail.com","phone":"4181156999","name":null,"isBilling":true,"isContact":true,"types":[{"id":1,"name":"Billing"},{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":316,"clientId":4,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Ydny7w8DP-V3ANg3RvPR","clientZoneVisible":false}],"accountBalance":-1200,"accountCredit":0,"accountOutstanding":1200,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#ff8f00","addressGpsLat":21.1542759,"addressGpsLon":-100.9379462,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":true,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":{"id":3263,"clientId":4,"number":"003209","createdDate":"2026-03-27T10:00:02-0600","dueDate":"2026-04-10T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-03-25T18:00:00-0600","notes":null,"adminNotes":null,"items":[{"id":3281,"type":"service","label":"plan300 27\/02\/2026 \u2013 26\/03\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":4,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":-0,"discountQuantity":0,"discountTotal":-0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":0,"totalUntaxed":300,"totalDiscount":-0,"totalTaxAmount":0,"amountToPay":300,"currencyCode":"MXN","status":1,"paymentCovers":[],"invoiceTemplateId":2,"proformaInvoiceTemplateId":2,"organizationName":"SIIP Pruebas","organizationRegistrationNumber":null,"organizationTaxId":null,"organizationStreet1":"Morel 34","organizationStreet2":null,"organizationCity":"Dolores Hidalgo","organizationStateId":null,"organizationCountryId":173,"organizationZipCode":"37800","organizationBankAccountName":null,"organizationBankAccountField1":null,"organizationBankAccountField2":null,"clientFirstName":"Griselda","clientLastName":"Avalos","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"23 Yucat\u00e1n","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37800","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"paymentData":null} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":698,"clientId":4,"methodId":"6efe0fa8-36b2-4dd1-b049-427bffc7d369","checkNumber":null,"createdDate":"2025-11-28T12:23:49-0600","amount":6900,"currencyCode":"MXN","note":null,"receiptSentDate":"2025-11-28T12:23:53-0600","providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[{"id":845,"invoiceId":2,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":846,"invoiceId":118,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":847,"invoiceId":235,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":848,"invoiceId":330,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":849,"invoiceId":497,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":850,"invoiceId":633,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":851,"invoiceId":753,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":852,"invoiceId":861,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":853,"invoiceId":970,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":854,"invoiceId":1086,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":855,"invoiceId":1194,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":856,"invoiceId":1338,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":857,"invoiceId":1452,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":858,"invoiceId":1591,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":859,"invoiceId":1716,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":860,"invoiceId":1838,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":861,"invoiceId":1960,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":862,"invoiceId":2086,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":863,"invoiceId":2211,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":864,"invoiceId":2333,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":865,"invoiceId":2456,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":866,"invoiceId":2578,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300},{"id":867,"invoiceId":2708,"paymentId":698,"creditNoteId":null,"refundId":null,"amount":300}],"creditAmount":0,"userId":1015,"attributes":[]}] + +Nombre del cliente que se va a actualizar: Griselda Avalos + +UUID: 6620b434a8594fc489e18e90363d59bd + +JSON con los datos a actualizar: {"name":"Griselda Avalos","custom_fields":{"Site":"","Estado":"\ud83d\udfe0 Suspendido","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/4","Nombre":"\ud83d\udc64 Griselda Avalos","Cliente":4,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 27\/03\/2026 10:00","Saldo Actual":"\ud83d\udcb21200 pendientes","Monto Ultimo Pago":"\ud83d\udcb2 6900","Clabe Interbancaria":"","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 28\/11\/2025 12:23 con Efectivo \ud83d\udcb5","Antena\/Sectorial":"","Domicilio":"\ud83d\udccd Yucat\u00e1n 23, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Resumen":"{\"Cliente\": \"4\",\"Nombre\": \"Griselda Avalos\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/4\",\"Saldo Actual\": \"\ud83d\udcb21200 pendientes\",\"Monto Ultimo Pago\": \"$ 6900\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28\/11\/2025 12:23 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"27\/03\/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}}","password-antena":"{\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲900 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲1200 pendientes' + +DEBUG COMPARACIÓN - CallBell Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - UCRM Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - Diferencia encontrada en Saldo Actual. CallBell: '💲900 pendientes', UCRM: '💲1200 pendientes' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"6620b434a8594fc489e18e90363d59bd","name":"Griselda Avalos","phoneNumber":"5214181156999","avatarUrl":null,"createdAt":"2025-01-28T20:37:36Z","closedAt":"2025-01-28T22:38:41Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/6620b434a8594fc489e18e90363d59bd","conversationHref":"https://dash.callbell.eu/chat/1a14b3d2ad4141fa8447878f95cce1d6","tags":[],"assignedUser":null,"customFields":{"Antena/Sectorial":"4","Domicilio":"📍 Yucatán 23, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México","Nombre":"👤 Griselda Avalos","Cliente":"4","URL":"🌐 https://sistema.siip.mx/crm/client/4","Monto Ultimo Pago":"💲 6900","Fecha Ultimo Pago":"📆💸 28/11/2025 12:23 con Efectivo 💵","Estado":"🟠 Suspendido","password-antena":"{\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}","Saldo Actual":"💲1200 pendientes","Resumen":"{\"Cliente\": \"4\",\"Nombre\": \"Griselda Avalos\",\"URL\": \"https://sistema.siip.mx/crm/client/4\",\"Saldo Actual\": \"💲1200 pendientes\",\"Monto Ultimo Pago\": \"$ 6900\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 28/11/2025 12:23 con Efectivo 💵\",\"Fecha Ultima Actualizacion\": \"27/03/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"Ydny7w8DP-V3ANg3RvPR\"}}","Fecha Ultima Actualizacion":"📆🔄️ 27/03/2026 10:00"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} + +[2026-03-30 18:30:19.130732] [notice] Logging level set to:debug +[2026-03-30 18:30:19.130836] [debug] Payload recibido: {"uuid":"c1231774-c725-4785-99db-a21511a43e3a","changeType":"edit","entity":"client","entityId":"2","eventName":"client.edit","extraData":{"entity":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"entityBeforeEdit":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola dfg","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}}} + +[2026-03-30 18:30:19.293914] [debug] Evento recibido: client.edit +[2026-03-30 18:30:19.294085] [info] Procesando evento client.edit para entityId: 2 +[2026-03-30 18:30:19.294158] [debug] Payload completo client.edit: {"uuid":"c1231774-c725-4785-99db-a21511a43e3a","changeType":"edit","entity":"client","entityId":"2","eventName":"client.edit","extraData":{"entity":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"entityBeforeEdit":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola dfg","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}}} +[2026-03-30 18:30:19.294186] [info] Llamando a updatePasswordAntenaIfNeeded para cliente: 2 +[2026-03-30 18:30:19.294198] [info] Iniciando verificación/sincronización de contraseña para el cliente ID: 2 +[2026-03-30 18:30:19.434308] [debug] onlyUpdate: Iniciando actualización para teléfono: 5214181878106 +[2026-03-30 18:30:19.435940] [debug] onlyUpdate: Teléfono validado: 5214181878106 +[2026-03-30 18:30:20.290561] [debug] onlyUpdate: Contacto obtenido de CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Payaso Loco","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-03-26T08:58:25Z","source":"whatsapp","funnelId":null,"href":"https:\/\/dash.callbell.eu\/contacts\/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https:\/\/dash.callbell.eu\/chat\/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Resumen":"{\"Cliente\": \"131\",\"Nombre\": \"Payaso Loco\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/131\",\"Saldo Actual\": \"\ud83d\udcb2300 pendientes\",\"Monto Ultimo Pago\": \"$ 300\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 12\/03\/2026 14:26 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"22\/03\/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}","Domicilio":"\ud83d\udccd Campeche 15, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Saldo Actual":"\ud83d\udcb2300 pendientes","Clabe Interbancaria":"124180599808752427","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/131","Site":"0LOCS","Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 22\/03\/2026 10:00","Cliente":"131","Monto Ultimo Pago":"\ud83d\udcb2 300","Antena\/Sectorial":"Sectorial-4b 172.16.13.16\/24","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}","Estado":"\ud83d\udfe2 Activo ","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 12\/03\/2026 14:26 con Efectivo \ud83d\udcb5","Nombre":"\ud83d\udc64 Payaso Loco","user name":"Daniel Humberto"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-30 18:30:20.290661] [info] onlyUpdate: Ejecutando patchWhatsapp para teléfono: 5214181878106 +Notificacion data: {"uuid":"c1231774-c725-4785-99db-a21511a43e3a","changeType":"edit","entity":"client","entityId":2,"message":null,"clientId":2,"eventName":"client.edit","clientData":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":null} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":990,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}] + +Nombre del cliente que se va a actualizar: Daniel Humberto Soto Villegas + +UUID: 74cc2bb45eb8409f92cd5dba99200d26 + +JSON con los datos a actualizar: {"name":"Daniel Humberto Soto Villegas","custom_fields":{"Site":"VENUS","Estado":"\ud83d\udfe2 Activo ","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/2","Nombre":"\ud83d\udc64 Daniel Humberto Soto Villegas","Cliente":2,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 30\/03\/2026 12:30","Saldo Actual":"\ud83d\udcb2910 a favor","Monto Ultimo Pago":"\ud83d\udcb2 280","Clabe Interbancaria":"0021804341999569810","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3","Antena\/Sectorial":"Sectorial de pruebas 172.16.5.134","Domicilio":"\ud83d\udccd Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","Resumen":"{\"Cliente\": \"2\",\"Nombre\": \"Daniel Humberto Soto Villegas\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/2\",\"Saldo Actual\": \"\ud83d\udcb2910 a favor\",\"Monto Ultimo Pago\": \"$ 280\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"30\/03\/2026 12:30\",\"Clabe Interbancaria\": \"0021804341999569810\",\"Site\": \"VENUS\",\"Antena\/Sectorial\": \"Sectorial de pruebas 172.16.5.134\",\"Password Antena\": {\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}}","password-antena":"{\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲300 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲910 a favor' + +DEBUG COMPARACIÓN - CallBell Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - UCRM Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - Diferencia en name. CallBell: 'Payaso Loco', UCRM: 'Daniel Humberto Soto Villegas' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"error":{"custom_fields":["Resumen: is too long (maximum is 500 characters)"]}} + +[2026-03-30 19:14:21.327754] [notice] Logging level set to:debug +[2026-03-30 19:14:21.327931] [debug] Payload recibido: {"uuid":"4b4f9f4a-3e6e-4fc8-8840-72eade5fd193","changeType":"edit","entity":"client","entityId":"2","eventName":"client.edit","extraData":{"entity":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"entityBeforeEdit":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}}} + +[2026-03-30 19:14:21.484857] [debug] Evento recibido: client.edit +[2026-03-30 19:14:21.485121] [info] Procesando evento client.edit para entityId: 2 +[2026-03-30 19:14:21.485200] [debug] Payload completo client.edit: {"uuid":"4b4f9f4a-3e6e-4fc8-8840-72eade5fd193","changeType":"edit","entity":"client","entityId":"2","eventName":"client.edit","extraData":{"entity":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"entityBeforeEdit":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD hola","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}}} +[2026-03-30 19:14:21.485228] [info] Llamando a updatePasswordAntenaIfNeeded para cliente: 2 +[2026-03-30 19:14:21.485238] [info] Iniciando verificación/sincronización de contraseña para el cliente ID: 2 +[2026-03-30 19:14:21.597737] [debug] onlyUpdate: Iniciando actualización para teléfono: 5214181878106 +[2026-03-30 19:14:21.607124] [debug] onlyUpdate: Teléfono validado: 5214181878106 +[2026-03-30 19:14:22.428281] [debug] onlyUpdate: Contacto obtenido de CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Payaso Loco","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-03-26T08:58:25Z","source":"whatsapp","funnelId":null,"href":"https:\/\/dash.callbell.eu\/contacts\/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https:\/\/dash.callbell.eu\/chat\/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Resumen":"{\"Cliente\": \"131\",\"Nombre\": \"Payaso Loco\",\"URL\": \"https:\/\/sistema.siip.mx\/crm\/client\/131\",\"Saldo Actual\": \"\ud83d\udcb2300 pendientes\",\"Monto Ultimo Pago\": \"$ 300\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 12\/03\/2026 14:26 con Efectivo \ud83d\udcb5\",\"Fecha Ultima Actualizacion\": \"22\/03\/2026 10:00\",\"Clabe Interbancaria\": \"\",\"Site\": \"\",\"Antena\/Sectorial\": \"\",\"Password Antena\": {\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}}","Domicilio":"\ud83d\udccd Campeche 15, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Saldo Actual":"\ud83d\udcb2300 pendientes","Clabe Interbancaria":"124180599808752427","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/131","Site":"0LOCS","Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 22\/03\/2026 10:00","Cliente":"131","Monto Ultimo Pago":"\ud83d\udcb2 300","Antena\/Sectorial":"Sectorial-4b 172.16.13.16\/24","password-antena":"{\"Servicio 1\":\"gYAIEK:Be}SK*01z5+\\\/V\"}","Estado":"\ud83d\udfe2 Activo ","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 12\/03\/2026 14:26 con Efectivo \ud83d\udcb5","Nombre":"\ud83d\udc64 Payaso Loco","user name":"Daniel Humberto"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-03-30 19:14:22.428359] [info] onlyUpdate: Ejecutando patchWhatsapp para teléfono: 5214181878106 +Notificacion data: {"uuid":"4b4f9f4a-3e6e-4fc8-8840-72eade5fd193","changeType":"edit","entity":"client","entityId":2,"message":null,"clientId":2,"eventName":"client.edit","clientData":{"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"Chiapas 31","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","invoiceStreet1":null,"invoiceStreet2":null,"invoiceCity":null,"invoiceStateId":null,"invoiceCountryId":null,"invoiceZipCode":null,"invoiceAddressSameAsContact":true,"note":"Cliente especial, el m\u00e1s chido del siip internet 2026 yeah xD","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-01-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"ciber.dhsv@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":true,"types":[{"id":2,"name":"General"},{"id":1000,"name":"WhatsApp"}]},{"id":170,"clientId":2,"email":null,"phone":"5214181148783","name":null,"isBilling":false,"isContact":false,"types":[]}],"attributes":[{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true},{"id":200,"clientId":2,"customAttributeId":14,"name":"Chat de CallBell","key":"chatDeCallbell","value":"https","clientZoneVisible":false},{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":178,"clientId":2,"customAttributeId":15,"name":"Site","key":"site","value":"VENUS","clientZoneVisible":false},{"id":179,"clientId":2,"customAttributeId":16,"name":"Antena\/Sectorial","key":"antenaSectorial","value":"Sectorial de pruebas 172.16.5.134","clientZoneVisible":false},{"id":309,"clientId":2,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true},{"id":428,"clientId":2,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"Servicio 1: n#Cx89qC#r64LPR# Servicio 2: b@2zMYxSQR2BdkG9","clientZoneVisible":false}],"accountBalance":910,"accountCredit":910,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564414,"addressGpsLon":-100.9383654,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":null} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":990,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-03-10T00:31:50-0600","amount":280,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":280,"userId":1180,"attributes":[{"id":"56a35c9a-5073-4ec2-9372-b2dbe504f7c2","paymentId":990,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"OXXO Pay","clientZoneVisible":true}]}] + +Nombre del cliente que se va a actualizar: Daniel Humberto Soto Villegas + +UUID: 74cc2bb45eb8409f92cd5dba99200d26 + +JSON con los datos a actualizar: {"name":"Daniel Humberto Soto Villegas","custom_fields":{"Site":"VENUS","Estado":"\ud83d\udfe2 Activo ","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/2","Nombre":"\ud83d\udc64 Daniel Humberto Soto Villegas","Cliente":2,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 30\/03\/2026 13:14","Saldo Actual":"\ud83d\udcb2910 a favor","Monto Ultimo Pago":"\ud83d\udcb2 280","Clabe Interbancaria":"0021804341999569810","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3","Antena\/Sectorial":"Sectorial de pruebas 172.16.5.134","Domicilio":"\ud83d\udccd Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","Resumen":"{\"Cliente\": \"2\",\"Nombre\": \"Daniel Humberto Soto Villegas\",\"Saldo Actual\": \"\ud83d\udcb2910 a favor\",\"Monto Ultimo Pago\": \"$ 280\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 10\/03\/2026 00:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"30\/03\/2026 13:14\",\"Clabe Interbancaria\": \"0021804341999569810\",\"Password Antena\": {\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}}","password-antena":"{\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲300 pendientes' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲910 a favor' + +DEBUG COMPARACIÓN - CallBell Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - UCRM Estado: '🟢 Activo ' + +DEBUG COMPARACIÓN - Diferencia en name. CallBell: 'Payaso Loco', UCRM: 'Daniel Humberto Soto Villegas' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Daniel Humberto Soto Villegas","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-03-26T08:58:25Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https://dash.callbell.eu/chat/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Site":"VENUS","Cliente":"2","Monto Ultimo Pago":"💲 280","Estado":"🟢 Activo ","Nombre":"👤 Daniel Humberto Soto Villegas","user name":"Daniel Humberto","Resumen":"{\"Cliente\": \"2\",\"Nombre\": \"Daniel Humberto Soto Villegas\",\"Saldo Actual\": \"💲910 a favor\",\"Monto Ultimo Pago\": \"$ 280\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 10/03/2026 00:31 con Tarjeta de crédito Stripe 💳\",\"Fecha Ultima Actualizacion\": \"30/03/2026 13:14\",\"Clabe Interbancaria\": \"0021804341999569810\",\"Password Antena\": {\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}}","Domicilio":"📍 Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","URL":"🌐 https://sistema.siip.mx/crm/client/2","Saldo Actual":"💲910 a favor","Clabe Interbancaria":"0021804341999569810","Fecha Ultimo Pago":"📆💸 10/03/2026 00:31 con Tarjeta de crédito Stripe 💳","Antena/Sectorial":"Sectorial de pruebas 172.16.5.134","Fecha Ultima Actualizacion":"📆🔄️ 30/03/2026 13:14","password-antena":"{\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} + diff --git a/public.php b/public.php old mode 100644 new mode 100755 index 3b512286..6e231050 --- a/public.php +++ b/public.php @@ -1954,244 +1954,8 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador - -
-
-
-

- Pagos SPEI -

-

🏦 Genera referencias de transferencia bancaria para que tus clientes paguen vía SPEI

-
- - -
-
- -
- - - - - -
-
-
-
- - -
- 🏦 -

Selecciona un cliente para generar una referencia de pago SPEI

-
-
- - - - - -
- - -
-
-
-

- Pagos OXXO -

-

🏪 Genera fichas de pago OXXO para que tus clientes paguen en tiendas de conveniencia

-
- - -
-
- -
- - - - - -
-
-
-
- - -
- 🏪 -

Selecciona un cliente para generar una ficha OXXO Pay

-
-
- - - - - -
@@ -2537,210 +2301,9 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador showToast(d.message, !d.success); } - // 2. STRIPE SEARCH - let selectedStripeClient = null; - setupSearch('stripeSearch', 'stripeResults', 'search_stripe', async (partialClient) => { - const res = await fetch(`?action=get_stripe_details&id=${partialClient.id}`); - const data = await res.json(); - selectedStripeClient = data; + - document.getElementById('stripeClientName').textContent = data.fullName; - document.getElementById('stripeClientIdDisplay').textContent = `ID: #${data.id}`; - document.getElementById('stripeBalanceBadge').textContent = `Saldo: $${parseFloat(data.accountOutstanding||0).toFixed(2)}`; - document.getElementById('stripeCustomerIdDisplay').textContent = data.stripeCustomerId || 'No disponible'; - document.getElementById('stripeClabeDisplay').textContent = data.clabeInterbancaria || 'No disponible'; - document.getElementById('stripeAmount').value = data.accountOutstanding > 0 ? data.accountOutstanding : ''; - document.getElementById('btnVerEnCrm').href = `${store.publicUrl}/client/${data.id}`; - document.getElementById('stripeDetailContainer').style.display = 'block'; - document.getElementById('stripePlaceholder').style.display = 'none'; // Hide placeholder - if (data.stripeCustomerId) loadStripeHistory(data.stripeCustomerId); - else document.getElementById('stripeHistoryContainer').style.display = 'none'; - }); - - document.getElementById('btnCreateIntent').onclick = async () => { - if (!selectedStripeClient?.stripeCustomerId) return showToast('Error: Cliente sin Stripe ID', true); - const amt = parseFloat(document.getElementById('stripeAmount').value); - if (!amt || amt < 10) return showToast('Mínimo 10 MXN', true); - - const btn = document.getElementById('btnCreateIntent'); - btn.disabled = true; - btn.textContent = 'Procesando...'; - - const fd = new FormData(); - fd.append('action', 'create_intent'); - fd.append('clientId', selectedStripeClient.id); - fd.append('amount', amt); - fd.append('stripeCustomerId', selectedStripeClient.stripeCustomerId); - fd.append('adminId', document.getElementById('stripeAdminSelect').value || store.defaultStripeAdminId); - - try { - const res = await fetch('?', { - method: 'POST', - body: fd - }); - const d = await res.json(); - if (d.success) showStripeResult(d); - else showToast(d.error, true); - } catch (e) { - showToast('Error de conexión', true); - } - btn.disabled = false; - btn.textContent = 'Generar Referencia SPEI'; - }; - - function showStripeResult(data) { - const c = document.getElementById('stripeResultContent'); - c.innerHTML = `

¡Referencia Creada!

Monto: $${data.amount}

`; - if (data.next_action?.display_bank_transfer_instructions) { - const i = data.next_action.display_bank_transfer_instructions.financial_addresses[0].spei; - c.innerHTML += `

Banco: ${i.bank_name}

CLABE: ${i.clabe}

`; - } - document.getElementById('stripeResultModal').style.display = 'flex'; - } - - async function loadOxxoHistory(stripeCustomerId) { - const tbody = document.querySelector('#oxxoHistoryTable tbody'); - tbody.innerHTML = 'Cargando historial...'; - try { - const res = await fetch(`?action=get_oxxo_history&stripeCustomerId=${stripeCustomerId}`); - const data = await res.json(); - - if (data.error) { - tbody.innerHTML = `Error: ${data.error}`; - return; - } - - if (!data.history || data.history.length === 0) { - tbody.innerHTML = 'No hay fichas recientes'; - return; - } - - tbody.innerHTML = data.history.map(p => { - let statusBadge = ''; - switch (p.status) { - case 'succeeded': - statusBadge = 'Pagado'; - break; - case 'requires_action': - statusBadge = 'Pendiente'; - break; - case 'canceled': - statusBadge = 'Cancelado'; - break; - default: - statusBadge = `${p.status}`; - } - - const date = new Date(p.created * 1000).toLocaleString(); - const voucherBtn = p.voucherUrl ? - `Ver Ficha` : - '-'; - - return ` - ${p.id.slice(-8)} - ${date} - $${p.amount.toFixed(2)} ${p.currency} - ${p.oxxoNumber} - ${statusBadge} - ${voucherBtn} - `; - }).join(''); - - } catch (e) { - console.error(e); - tbody.innerHTML = 'Error de conexión'; - } - } - - // 3. OXXO SEARCH - let selectedOxxoClient = null; - setupSearch('oxxoSearch', 'oxxoResults', 'search_stripe', async (partialClient) => { - const res = await fetch(`?action=get_stripe_details&id=${partialClient.id}`); - const data = await res.json(); - selectedOxxoClient = data; - - document.getElementById('oxxoClientName').textContent = data.fullName; - document.getElementById('oxxoClientIdDisplay').textContent = `ID: #${data.id}`; - document.getElementById('oxxoBalanceBadge').textContent = `Saldo: $${parseFloat(data.accountOutstanding||0).toFixed(2)}`; - document.getElementById('oxxoAmount').value = data.accountOutstanding > 0 ? data.accountOutstanding : ''; - document.getElementById('btnOxxoCrm').href = `${store.publicUrl}/client/${data.id}`; - - // Reset View - document.getElementById('oxxoPlaceholder').style.display = 'block'; // This is the PREVIEW placeholder (keep as is) - document.getElementById('oxxoModulePlaceholder').style.display = 'none'; // Hide MODULE placeholder - document.getElementById('oxxoResult').style.display = 'none'; - document.getElementById('oxxoResult').innerHTML = ''; - - document.getElementById('oxxoDetailContainer').style.display = 'block'; - - // Load History - if (data.stripeCustomerId) { - document.getElementById('oxxoHistoryContainer').style.display = 'block'; - loadOxxoHistory(data.stripeCustomerId); - } else { - document.getElementById('oxxoHistoryContainer').style.display = 'none'; - } - }); - - document.getElementById('btnCreateOxxoIntent').onclick = async () => { - if (!selectedOxxoClient) return; - const amt = parseFloat(document.getElementById('oxxoAmount').value); - if (!amt || amt < 10) return showToast('Mínimo 10 MXN', true); - - const btn = document.getElementById('btnCreateOxxoIntent'); - const original = btn.innerHTML; - btn.disabled = true; - btn.innerHTML = ' Procesando...'; - - const fd = new FormData(); - fd.append('action', 'create_oxxo_intent'); - fd.append('clientId', selectedOxxoClient.id); - fd.append('amount', amt); - - try { - const res = await fetch('?', { - method: 'POST', - body: fd - }); - const d = await res.json(); - if (d.success) { - const url = d.data.voucher_image_url || `?action=image&file=${d.data.voucher_filename}`; - - // Hide Placeholder - document.getElementById('oxxoPlaceholder').style.display = 'none'; - - // Show Result - const resDiv = document.getElementById('oxxoResult'); - resDiv.style.display = 'flex'; - resDiv.innerHTML = ` -
-
- -
-

¡Ficha Generada!

-

Referencia OXXO Pay

- -
-

${d.data.oxxo_reference}

-
- - - -
- - - Descargar Ficha - -
-
`; - } else showToast(d.error, true); - } catch (e) { - console.error(e); - showToast('Error de conexión', true); - } - btn.disabled = false; - btn.innerHTML = original; - }; + // --- INPUT VALIDATION & UX --- function setupNumericInput(inputId) { diff --git a/scripts-uisp/audit_client_passwords.php b/scripts-uisp/audit_client_passwords.php old mode 100644 new mode 100755 diff --git a/scripts-uisp/debug_clients.php b/scripts-uisp/debug_clients.php old mode 100644 new mode 100755 diff --git a/scripts-uisp/ejemplo_script_actualizador.php b/scripts-uisp/ejemplo_script_actualizador.php old mode 100644 new mode 100755 diff --git a/scripts-uisp/generate_invalid_password_list.php b/scripts-uisp/generate_invalid_password_list.php old mode 100644 new mode 100755 diff --git a/src/.DS_Store b/src/.DS_Store old mode 100644 new mode 100755 diff --git a/src/Data/NotificationData.php b/src/Data/NotificationData.php old mode 100644 new mode 100755 diff --git a/src/Data/PluginData.php b/src/Data/PluginData.php old mode 100644 new mode 100755 diff --git a/src/Data/UcrmData.php b/src/Data/UcrmData.php old mode 100644 new mode 100755 diff --git a/src/Exception/CurlException.php b/src/Exception/CurlException.php old mode 100644 new mode 100755 diff --git a/src/Facade/AbstractMessageNotifierFacade.php b/src/Facade/AbstractMessageNotifierFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/AbstractOxxoOperationsFacade.php b/src/Facade/AbstractOxxoOperationsFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/AbstractStripeOperationsFacade.php b/src/Facade/AbstractStripeOperationsFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/AbstractUpdateClientFacade.php b/src/Facade/AbstractUpdateClientFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/ClientCallBellAPI.php b/src/Facade/ClientCallBellAPI.php old mode 100644 new mode 100755 index 140751ac..78965e4d --- a/src/Facade/ClientCallBellAPI.php +++ b/src/Facade/ClientCallBellAPI.php @@ -1148,7 +1148,6 @@ class ClientCallBellAPI $resumenClienteJSON = '{' . '"Cliente": "' . $notificationData->clientData['id'] . '",' . '"Nombre": "' . sprintf("%s %s", $notificationData->clientData['firstName'], $notificationData->clientData['lastName']) . '",' . - '"URL": "https://sistema.siip.mx/crm/client/' . $notificationData->clientId . '",' . '"Saldo Actual": "' . $saldoTexto . '",' . '"Monto Ultimo Pago": "$ ' . $payments[0]['amount'] . '",' . '"Estado": "' . @@ -1156,8 +1155,6 @@ class ClientCallBellAPI '"Fecha Ultimo Pago": " ' . $fecha_ultimoPago_ajustada . ' con ' . $payment_method . '",' . '"Fecha Ultima Actualizacion": "' . $fecha_actual_ajustada . '",' . '"Clabe Interbancaria": "' . $clabeInterbancaria . '",' . - '"Site": "' . $site . '",' . - '"Antena/Sectorial": "' . $antenaSectorial . '",' . '"Password Antena": ' . (empty($passAntenaFinal) ? '""' : $passAntenaFinal) . '}'; diff --git a/src/Facade/PluginNotifierFacade.php b/src/Facade/PluginNotifierFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/PluginOxxoNotifierFacade.php b/src/Facade/PluginOxxoNotifierFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/TwilioNotifierFacade.php b/src/Facade/TwilioNotifierFacade.php old mode 100644 new mode 100755 diff --git a/src/Facade/pruebas_ucrm_api.php b/src/Facade/pruebas_ucrm_api.php old mode 100644 new mode 100755 diff --git a/src/Factory/MessageTextFactory.php b/src/Factory/MessageTextFactory.php old mode 100644 new mode 100755 diff --git a/src/Factory/NotificationDataFactory.php b/src/Factory/NotificationDataFactory.php old mode 100644 new mode 100755 diff --git a/src/Plugin.php b/src/Plugin.php old mode 100644 new mode 100755 diff --git a/src/Service/CurlExecutor.php b/src/Service/CurlExecutor.php old mode 100644 new mode 100755 diff --git a/src/Service/LogCleaner.php b/src/Service/LogCleaner.php old mode 100644 new mode 100755 diff --git a/src/Service/Logger.php b/src/Service/Logger.php old mode 100644 new mode 100755 diff --git a/src/Service/MinioStorageService.php b/src/Service/MinioStorageService.php old mode 100644 new mode 100755 diff --git a/src/Service/OptionsManager.php b/src/Service/OptionsManager.php old mode 100644 new mode 100755 diff --git a/src/Service/PaymentIntentService.php b/src/Service/PaymentIntentService.php old mode 100644 new mode 100755 diff --git a/src/Service/PluginDataValidator.php b/src/Service/PluginDataValidator.php old mode 100644 new mode 100755 diff --git a/src/Service/SmsNumberProvider.php b/src/Service/SmsNumberProvider.php old mode 100644 new mode 100755 diff --git a/src/Service/UcrmApi.php b/src/Service/UcrmApi.php old mode 100644 new mode 100755 diff --git a/test_facade_crash.php b/test_facade_crash.php old mode 100644 new mode 100755 diff --git a/views/oxxo.php b/views/oxxo.php new file mode 100755 index 00000000..9996e6e8 --- /dev/null +++ b/views/oxxo.php @@ -0,0 +1,208 @@ + + + +
+
+
+

+ Pagos OXXO +

+

🏪 Genera fichas de pago OXXO para que tus clientes paguen en tiendas de conveniencia

+
+ + +
+
+ +
+ + + + + +
+
+
+
+ + +
+ 🏪 +

Selecciona un cliente para generar una ficha OXXO Pay

+
+
+ + + + + + + + document.addEventListener('DOMContentLoaded', () => { + // 3. OXXO SEARCH + let selectedOxxoClient = null; + setupSearch('oxxoSearch', 'oxxoResults', 'search_stripe', async (partialClient) => { + const res = await fetch(`${window.SIIP_OXXO_PATH || ''}?action=get_stripe_details&id=${partialClient.id}`); + const data = await res.json(); + selectedOxxoClient = data; + + document.getElementById('oxxoClientName').textContent = data.fullName; + document.getElementById('oxxoClientIdDisplay').textContent = `ID: #${data.id}`; + document.getElementById('oxxoBalanceBadge').textContent = `Saldo: $${parseFloat(data.accountOutstanding||0).toFixed(2)}`; + document.getElementById('oxxoAmount').value = data.accountOutstanding > 0 ? data.accountOutstanding : ''; + document.getElementById('btnOxxoCrm').href = `${store.publicUrl}/client/${data.id}`; + + // Reset View + document.getElementById('oxxoPlaceholder').style.display = 'block'; // This is the PREVIEW placeholder (keep as is) + document.getElementById('oxxoModulePlaceholder').style.display = 'none'; // Hide MODULE placeholder + document.getElementById('oxxoResult').style.display = 'none'; + document.getElementById('oxxoResult').innerHTML = ''; + + document.getElementById('oxxoDetailContainer').style.display = 'block'; + + // Load History + if (data.stripeCustomerId) { + document.getElementById('oxxoHistoryContainer').style.display = 'block'; + loadOxxoHistory(data.stripeCustomerId); + } else { + document.getElementById('oxxoHistoryContainer').style.display = 'none'; + } + }); + + document.getElementById('btnCreateOxxoIntent').onclick = async () => { + if (!selectedOxxoClient) return; + const amt = parseFloat(document.getElementById('oxxoAmount').value); + if (!amt || amt < 10) return showToast('Mínimo 10 MXN', true); + + const btn = document.getElementById('btnCreateOxxoIntent'); + const original = btn.innerHTML; + btn.disabled = true; + btn.innerHTML = ' Procesando...'; + + const fd = new FormData(); + fd.append('action', 'create_oxxo_intent'); + fd.append('clientId', selectedOxxoClient.id); + fd.append('amount', amt); + + try { + const res = await fetch(`${window.SIIP_OXXO_PATH || ''}?`, { + method: 'POST', + body: fd + }); + const d = await res.json(); + if (d.success) { + const url = d.data.voucher_image_url || `?action=image&file=${d.data.voucher_filename}`; + + // Hide Placeholder + document.getElementById('oxxoPlaceholder').style.display = 'none'; + + // Show Result + const resDiv = document.getElementById('oxxoResult'); + resDiv.style.display = 'flex'; + resDiv.innerHTML = ` +
+
+ +
+

¡Ficha Generada!

+

Referencia OXXO Pay

+ +
+

${d.data.oxxo_reference}

+
+ + + +
+ + + Descargar Ficha + +
+
`; + } else showToast(d.error, true); + } catch (e) { + console.error(e); + showToast('Error de conexión', true); + } + btn.disabled = false; + btn.innerHTML = original; + }; + }); + diff --git a/views/stripe.php b/views/stripe.php new file mode 100755 index 00000000..f65ee7b3 --- /dev/null +++ b/views/stripe.php @@ -0,0 +1,243 @@ + + +
+
+
+

+ Pagos SPEI +

+

🏦 Genera referencias de transferencia bancaria para que tus clientes paguen vía SPEI

+
+ + +
+
+ +
+ + + + + +
+
+
+
+ + +
+ 🏦 +

Selecciona un cliente para generar una referencia de pago SPEI

+
+
+ + + + +
+ + document.addEventListener('DOMContentLoaded', () => { + // 2. STRIPE SEARCH + let selectedStripeClient = null; + setupSearch('stripeSearch', 'stripeResults', 'search_stripe', async (partialClient) => { + const res = await fetch(`${window.SIIP_STRIPE_PATH || ''}?action=get_stripe_details&id=${partialClient.id}`); + const data = await res.json(); + selectedStripeClient = data; + + document.getElementById('stripeClientName').textContent = data.fullName; + document.getElementById('stripeClientIdDisplay').textContent = `ID: #${data.id}`; + document.getElementById('stripeBalanceBadge').textContent = `Saldo: $${parseFloat(data.accountOutstanding||0).toFixed(2)}`; + document.getElementById('stripeCustomerIdDisplay').textContent = data.stripeCustomerId || 'No disponible'; + document.getElementById('stripeClabeDisplay').textContent = data.clabeInterbancaria || 'No disponible'; + document.getElementById('stripeAmount').value = data.accountOutstanding > 0 ? data.accountOutstanding : ''; + document.getElementById('btnVerEnCrm').href = `${store.publicUrl}/client/${data.id}`; + document.getElementById('stripeDetailContainer').style.display = 'block'; + document.getElementById('stripePlaceholder').style.display = 'none'; // Hide placeholder + if (data.stripeCustomerId) loadStripeHistory(data.stripeCustomerId); + else document.getElementById('stripeHistoryContainer').style.display = 'none'; + }); + + document.getElementById('btnCreateIntent').onclick = async () => { + if (!selectedStripeClient?.stripeCustomerId) return showToast('Error: Cliente sin Stripe ID', true); + const amt = parseFloat(document.getElementById('stripeAmount').value); + if (!amt || amt < 10) return showToast('Mínimo 10 MXN', true); + + const btn = document.getElementById('btnCreateIntent'); + btn.disabled = true; + btn.textContent = 'Procesando...'; + + const fd = new FormData(); + fd.append('action', 'create_intent'); + fd.append('clientId', selectedStripeClient.id); + fd.append('amount', amt); + fd.append('stripeCustomerId', selectedStripeClient.stripeCustomerId); + fd.append('adminId', document.getElementById('stripeAdminSelect').value || store.defaultStripeAdminId); + + try { + const res = await fetch(`${window.SIIP_STRIPE_PATH || ''}?`, { + method: 'POST', + body: fd + }); + const d = await res.json(); + if (d.success) showStripeResult(d); + else showToast(d.error, true); + } catch (e) { + showToast('Error de conexión', true); + } + btn.disabled = false; + btn.textContent = 'Generar Referencia SPEI'; + }; + + function showStripeResult(data) { + const c = document.getElementById('stripeResultContent'); + c.innerHTML = `

¡Referencia Creada!

Monto: $${data.amount}

`; + if (data.next_action?.display_bank_transfer_instructions) { + const i = data.next_action.display_bank_transfer_instructions.financial_addresses[0].spei; + c.innerHTML += `

Banco: ${i.bank_name}

CLABE: ${i.clabe}

`; + } + document.getElementById('stripeResultModal').style.display = 'flex'; + } + + async function loadOxxoHistory(stripeCustomerId) { + const tbody = document.querySelector('#oxxoHistoryTable tbody'); + tbody.innerHTML = 'Cargando historial...'; + try { + const res = await fetch(`${window.SIIP_STRIPE_PATH || ''}?action=get_oxxo_history&stripeCustomerId=${stripeCustomerId}`); + const data = await res.json(); + + if (data.error) { + tbody.innerHTML = `Error: ${data.error}`; + return; + } + + if (!data.history || data.history.length === 0) { + tbody.innerHTML = 'No hay fichas recientes'; + return; + } + + tbody.innerHTML = data.history.map(p => { + let statusBadge = ''; + switch (p.status) { + case 'succeeded': + statusBadge = 'Pagado'; + break; + case 'requires_action': + statusBadge = 'Pendiente'; + break; + case 'canceled': + statusBadge = 'Cancelado'; + break; + default: + statusBadge = `${p.status}`; + } + + const date = new Date(p.created * 1000).toLocaleString(); + const voucherBtn = p.voucherUrl ? + `Ver Ficha` : + '-'; + + return ` + ${p.id.slice(-8)} + ${date} + $${p.amount.toFixed(2)} ${p.currency} + ${p.oxxoNumber} + ${statusBadge} + ${voucherBtn} + `; + }).join(''); + + } catch (e) { + console.error(e); + tbody.innerHTML = 'Error de conexión'; + } + } + }); +