diff --git a/data/plugin.log b/data/plugin.log index d1a6622b..b54cb5d0 100755 --- a/data/plugin.log +++ b/data/plugin.log @@ -3500,3 +3500,932 @@ Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26"," } [2026-04-06 19:56:20.410233] [info] No UUID found in the webhook data +[2026-04-06 19:59:21.849991] [notice] Logging level set to:debug +[2026-04-06 19:59:21.850085] [debug] Payload recibido: { + "id": "evt_3TJJFuEFY1WEUtgR1KJyvmz8", + "object": "event", + "api_version": "2023-10-16", + "created": 1775505561, + "data": { + "object": { + "id": "pi_3TJJFuEFY1WEUtgR1ShTSGOv", + "object": "payment_intent", + "amount": 20000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 20000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3TJJFuEFY1WEUtgR1ShTSGOv_secret_B99vnBmhJZECATh1zkTE4l03q", + "confirmation_method": "automatic", + "created": 1775505378, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "py_3TJJFuEFY1WEUtgR140xKT0K", + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1TJJFvEFY1WEUtgRJ7EsQrQ5", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + }, + "customer_balance": { + "funding_type": null + }, + "oxxo": { + "expires_after_days": 3 + } + }, + "payment_method_types": [ + "customer_balance", + "card", + "oxxo" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "payment_intent.succeeded" +} + +[2026-04-06 19:59:21.850122] [info] No UUID found in the webhook data +[2026-04-06 19:59:21.850132] [info] Evento de pago exitoso (Stripe PI) recibido. +[2026-04-06 19:59:22.057142] [notice] Logging level set to:debug +[2026-04-06 19:59:22.057257] [debug] Payload recibido: { + "id": "evt_3TJJFuEFY1WEUtgR1AG72RIt", + "object": "event", + "api_version": "2023-10-16", + "created": 1775505561, + "data": { + "object": { + "id": "py_3TJJFuEFY1WEUtgR140xKT0K", + "object": "charge", + "amount": 20000, + "amount_captured": 20000, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3TJJFuEFY1WEUtgR1OtJgGbC", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": "mariscoselsietemares@gmail.com", + "name": "Delfino De los Mares venus", + "phone": null, + "tax_id": null + }, + "calculated_statement_descriptor": null, + "captured": true, + "created": 1775505560, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "on_behalf_of": null, + "order": null, + "outcome": { + "advice_code": null, + "network_advice_code": null, + "network_decline_code": null, + "network_status": "approved_by_network", + "reason": null, + "risk_level": "not_assessed", + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3TJJFuEFY1WEUtgR1ShTSGOv", + "payment_method": "pm_1TJJFvEFY1WEUtgRJ7EsQrQ5", + "payment_method_details": { + "oxxo": { + "number": "12345678901234657890123456789012" + }, + "type": "oxxo" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2tHMFJFRlkxV0VVdGdSKJmh0M4GMgZtWE_xCrM6LBZjQ8uRhrSEazMhSr4vgI0yMjKMI51ILaAFSq3YJOqa9EtRv54eaLMbGAOp", + "refunded": false, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "charge.succeeded" +} + +[2026-04-06 19:59:22.057307] [info] No UUID found in the webhook data +[2026-04-06 19:59:23.465049] [notice] Logging level set to:debug +[2026-04-06 19:59:23.465111] [debug] Payload recibido: {"uuid":"9160c40e-64fe-4f08-9687-c0bc1fb61a39","changeType":"insert","entity":"payment","entityId":"1008","eventName":"payment.add","extraData":{"entity":{"id":1008,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[]},"entityBeforeEdit":null}} + +[2026-04-06 19:59:23.712899] [debug] Evento recibido: payment.add +[2026-04-06 19:59:23.714121] [debug] Notification encodificado en JSON:{"uuid":"9160c40e-64fe-4f08-9687-c0bc1fb61a39","changeType":"insert","entity":"payment","entityId":1008,"message":null,"clientId":146,"eventName":"payment.add","clientData":{"id":146,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"36 Yucat\u00e1n","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Yucat\u00e1n 36, 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":"En los mares soy feliz :) pura playa y solyeahhjgjhb","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-07-29T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Delfino","lastName":"De los Mares venus","username":null,"contacts":[{"id":150,"clientId":146,"email":"mariscoselsietemares@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":false,"types":[{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":145,"clientId":146,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_QZ7T1h3th3Dr7w","clientZoneVisible":true},{"id":146,"clientId":146,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180695453333629","clientZoneVisible":true},{"id":264,"clientId":146,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"ETfEB8at@GAqUt#2","clientZoneVisible":false},{"id":278,"clientId":146,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true}],"accountBalance":2020,"accountCredit":2020,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3949ab","addressGpsLat":21.1561796,"addressGpsLon":-100.9371826,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":1008,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[]}} + +[2026-04-06 19:59:23.714169] [info] Verificando existencia de atributo 'tipoPagoStripe' para Payment ID: 1008 +[2026-04-06 19:59:23.714858] [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/1008 +[2026-04-06 19:59:23.817435] [info] Payment 1008 has no User ID. Assigning Stripe User ID: 1180 +[2026-04-06 19:59:23.818010] [error] Failed to patch User 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/1008/user +[2026-04-06 19:59:23.999042] [info] Payment 1008 has wrong Method ID (1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae). Patching to 93814765-66a1-4c7d-a777-05c18fd6aab3 via Microservice. +[2026-04-06 19:59:23.999665] [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/1008/method +[2026-04-06 19:59:24.185066] [debug] Fallback Method Guessing 'Tarjeta de crédito Stripe' -> 'Tarjeta de Crédito' +[2026-04-06 19:59:24.185127] [info] PATCHING Payment 1008: Setting tipoPagoStripe = 'Tarjeta de Crédito' +Eviando comprobante de pago al cliente: 146 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_Delfino_De_los_Mares_venus.pdf + +El archivo PDF es válido y tiene contenido: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Delfino_De_los_Mares_venus.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_Delfino_De_los_Mares_venus.jpg + +[2026-04-06 19:59:24.820291] [info] Archivo subido exitosamente a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775505564.jpg +Imagen subida a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775505564.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_Delfino_De_los_Mares_venus_1775505564.jpg" + }, + "template_values": ["Delfino De los Mares venus", "$200", "$2020 a favor"], + "template_uuid": "57ead79cebd14902921477922403093b", + "optin_contact": true + } +Response del CallBell: {"message":{"uuid":"efca28b5f8954b8c91fd1439bf06110f","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":"9160c40e-64fe-4f08-9687-c0bc1fb61a39","changeType":"insert","entity":"payment","entityId":1008,"message":null,"clientId":146,"eventName":"payment.add","clientData":{"id":146,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"36 Yucat\u00e1n","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Yucat\u00e1n 36, 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":"En los mares soy feliz :) pura playa y solyeahhjgjhb","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-07-29T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Delfino","lastName":"De los Mares venus","username":null,"contacts":[{"id":150,"clientId":146,"email":"mariscoselsietemares@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":false,"types":[{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":145,"clientId":146,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_QZ7T1h3th3Dr7w","clientZoneVisible":true},{"id":146,"clientId":146,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180695453333629","clientZoneVisible":true},{"id":264,"clientId":146,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"ETfEB8at@GAqUt#2","clientZoneVisible":false},{"id":278,"clientId":146,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true}],"accountBalance":2020,"accountCredit":2020,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3949ab","addressGpsLat":21.1561796,"addressGpsLon":-100.9371826,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":1008,"clientId":146,"methodId":"93814765-66a1-4c7d-a777-05c18fd6aab3","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[]}} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":1008,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[{"id":"788bc36e-601f-49f6-bf69-5d7f8e60f1bf","paymentId":1008,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"Tarjeta de Cr\u00e9dito","clientZoneVisible":true}]}] + +Nombre del cliente que se va a actualizar: Delfino De los Mares venus + +UUID: 74cc2bb45eb8409f92cd5dba99200d26 + +JSON con los datos a actualizar: {"name":"Delfino De los Mares venus","custom_fields":{"Site":"","Estado":"\ud83d\udfe0 Suspendido","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/146","Nombre":"\ud83d\udc64 Delfino De los Mares venus","Cliente":146,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 06\/04\/2026 13:59","Saldo Actual":"\ud83d\udcb22020 a favor","Monto Ultimo Pago":"\ud83d\udcb2 200","Clabe Interbancaria":"002180695453333629","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 06\/04\/2026 13:59 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3","Antena\/Sectorial":"","Domicilio":"\ud83d\udccd Yucat\u00e1n 36, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Resumen":"{\"Cliente\": \"146\",\"Nombre\": \"Delfino De los Mares venus\",\"Saldo Actual\": \"\ud83d\udcb22020 a favor\",\"Monto Ultimo Pago\": \"$ 200\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06\/04\/2026 13:59 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"06\/04\/2026 13:59\",\"Clabe Interbancaria\": \"002180695453333629\",\"Password Antena\": {\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}}","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲1820 a favor' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲2020 a favor' + +DEBUG COMPARACIÓN - CallBell Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - UCRM Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - Diferencia encontrada en Site. CallBell: '0LOCS', UCRM: '' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Delfino De los Mares venus","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-04-06T17:40:03Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https://dash.callbell.eu/chat/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA","Sus"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Cliente":"146","Monto Ultimo Pago":"💲 200","Nombre":"👤 Delfino De los Mares venus","Domicilio":"📍 Yucatán 36, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México","URL":"🌐 https://sistema.siip.mx/crm/client/146","Clabe Interbancaria":"002180695453333629","Fecha Ultimo Pago":"📆💸 06/04/2026 13:59 con Tarjeta de crédito Stripe 💳","Antena/Sectorial":"Sectorial-4b 172.16.13.16/24","Fecha Ultima Actualizacion":"📆🔄️ 06/04/2026 13:59","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}","user name":"Daniel Humberto","Site":"0LOCS","Saldo Actual":"💲2020 a favor","Resumen":"{\"Cliente\": \"146\",\"Nombre\": \"Delfino De los Mares venus\",\"Saldo Actual\": \"💲2020 a favor\",\"Monto Ultimo Pago\": \"$ 200\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06/04/2026 13:59 con Tarjeta de crédito Stripe 💳\",\"Fecha Ultima Actualizacion\": \"06/04/2026 13:59\",\"Clabe Interbancaria\": \"002180695453333629\",\"Password Antena\": {\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}}","Estado":"🟠 Suspendido"},"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-04-06 19:59:27.486351] [notice] Logging level set to:debug +[2026-04-06 19:59:27.486423] [debug] Payload recibido: {"uuid":"947ab736-0787-4174-8aa9-a59e73b4add5","changeType":"edit","entity":"payment","entityId":"1008","eventName":"payment.edit","extraData":{"entity":{"id":1008,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[]},"entityBeforeEdit":{"id":1008,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:59:23-0600","amount":200,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":200,"userId":null,"attributes":[]}}} + +[2026-04-06 19:59:27.688785] [debug] Evento recibido: payment.edit +[2026-04-06 23:52:19.187648] [notice] Logging level set to:debug +[2026-04-06 23:52:19.187829] [debug] Payload recibido: { + "id": "evt_3TJMwIEFY1WEUtgR1Cek08rT", + "object": "event", + "api_version": "2023-10-16", + "created": 1775519538, + "data": { + "object": { + "id": "pi_3TJMwIEFY1WEUtgR1vSBVeZm", + "object": "payment_intent", + "amount": 10000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3TJMwIEFY1WEUtgR1vSBVeZm_secret_5WBnUBJTAwrka86Zz3sA4djNX", + "confirmation_method": "automatic", + "created": 1775519538, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "next_action": null, + "on_behalf_of": null, + "payment_method": null, + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + }, + "customer_balance": { + "funding_type": null + }, + "oxxo": { + "expires_after_days": 3 + } + }, + "payment_method_types": [ + "customer_balance", + "card", + "oxxo" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_payment_method", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_BoJgUcOJzUi8yd", + "idempotency_key": "bf07836b-2103-44e1-b347-d94ffb68a2cf" + }, + "type": "payment_intent.created" +} + +[2026-04-06 23:52:19.187925] [info] No UUID found in the webhook data +[2026-04-06 23:52:20.394860] [error] Error creando orden OXXO: 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/orders +[2026-04-06 23:52:20.771198] [notice] Logging level set to:debug +[2026-04-06 23:52:20.771368] [debug] Payload recibido: { + "id": "evt_3TJMwIEFY1WEUtgR1oJnAV91", + "object": "event", + "api_version": "2023-10-16", + "created": 1775519540, + "data": { + "object": { + "id": "pi_3TJMwIEFY1WEUtgR1vSBVeZm", + "object": "payment_intent", + "amount": 10000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3TJMwIEFY1WEUtgR1vSBVeZm_secret_5WBnUBJTAwrka86Zz3sA4djNX", + "confirmation_method": "automatic", + "created": 1775519538, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "next_action": { + "oxxo_display_details": { + "expires_after": 1775800799, + "hosted_voucher_url": "https://payments.stripe.com/oxxo/voucher/test_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9VSHdxMlhhYXNxWk9NcjBCaXdST3dsV3dVWnBYN28w0100HURRzpgN", + "number": "12345678901234657890123456789012" + }, + "type": "oxxo_display_details" + }, + "on_behalf_of": null, + "payment_method": "pm_1TJMwJEFY1WEUtgRq8CXOVhr", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + }, + "customer_balance": { + "funding_type": null + }, + "oxxo": { + "expires_after_days": 3 + } + }, + "payment_method_types": [ + "customer_balance", + "card", + "oxxo" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_action", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_JQ7bM897Sj3CMf", + "idempotency_key": "d2b941c2-21c3-4f95-aa7a-41318ae60e91" + }, + "type": "payment_intent.requires_action" +} + +[2026-04-06 23:52:20.771461] [info] No UUID found in the webhook data +[2026-04-06 23:55:23.559351] [notice] Logging level set to:debug +[2026-04-06 23:55:23.559457] [debug] Payload recibido: { + "id": "evt_3TJMwIEFY1WEUtgR1ZpUjEmw", + "object": "event", + "api_version": "2023-10-16", + "created": 1775519723, + "data": { + "object": { + "id": "pi_3TJMwIEFY1WEUtgR1vSBVeZm", + "object": "payment_intent", + "amount": 10000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 10000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3TJMwIEFY1WEUtgR1vSBVeZm_secret_5WBnUBJTAwrka86Zz3sA4djNX", + "confirmation_method": "automatic", + "created": 1775519538, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "py_3TJMwIEFY1WEUtgR1qqdl2D0", + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1TJMwJEFY1WEUtgRq8CXOVhr", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + }, + "customer_balance": { + "funding_type": null + }, + "oxxo": { + "expires_after_days": 3 + } + }, + "payment_method_types": [ + "customer_balance", + "card", + "oxxo" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "payment_intent.succeeded" +} + +[2026-04-06 23:55:23.559505] [info] No UUID found in the webhook data +[2026-04-06 23:55:23.559516] [info] Evento de pago exitoso (Stripe PI) recibido. +[2026-04-06 23:55:23.675930] [notice] Logging level set to:debug +[2026-04-06 23:55:23.680068] [debug] Payload recibido: { + "id": "evt_3TJMwIEFY1WEUtgR1Njqsclj", + "object": "event", + "api_version": "2023-10-16", + "created": 1775519723, + "data": { + "object": { + "id": "py_3TJMwIEFY1WEUtgR1qqdl2D0", + "object": "charge", + "amount": 10000, + "amount_captured": 10000, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3TJMwIEFY1WEUtgR1BwdXoGl", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": "mariscoselsietemares@gmail.com", + "name": "Delfino De los Mares venus", + "phone": null, + "tax_id": null + }, + "calculated_statement_descriptor": null, + "captured": true, + "created": 1775519722, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "ucrm_client_id": "146", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "OXXO" + }, + "on_behalf_of": null, + "order": null, + "outcome": { + "advice_code": null, + "network_advice_code": null, + "network_decline_code": null, + "network_status": "approved_by_network", + "reason": null, + "risk_level": "not_assessed", + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3TJMwIEFY1WEUtgR1vSBVeZm", + "payment_method": "pm_1TJMwJEFY1WEUtgRq8CXOVhr", + "payment_method_details": { + "oxxo": { + "number": "12345678901234657890123456789012" + }, + "type": "oxxo" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2tHMFJFRlkxV0VVdGdSKOuP0c4GMgbKi1wuNJs6LBbGIZYVpQl8HRwBtawAlOkL8rrx799Ycm-Ycb2MEX-_dbDnbzF9V-yUpg7Q", + "refunded": false, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "charge.succeeded" +} + +[2026-04-06 23:55:23.680119] [info] No UUID found in the webhook data +[2026-04-06 23:55:25.316421] [notice] Logging level set to:debug +[2026-04-06 23:55:25.316495] [debug] Payload recibido: {"uuid":"16839ef3-1f5c-47b1-8c28-bdbff14cb0f8","changeType":"insert","entity":"payment","entityId":"1009","eventName":"payment.add","extraData":{"entity":{"id":1009,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[]},"entityBeforeEdit":null}} + +[2026-04-06 23:55:25.671297] [debug] Evento recibido: payment.add +[2026-04-06 23:55:25.672069] [debug] Notification encodificado en JSON:{"uuid":"16839ef3-1f5c-47b1-8c28-bdbff14cb0f8","changeType":"insert","entity":"payment","entityId":1009,"message":null,"clientId":146,"eventName":"payment.add","clientData":{"id":146,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"36 Yucat\u00e1n","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Yucat\u00e1n 36, 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":"En los mares soy feliz :) pura playa y solyeahhjgjhb","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-07-29T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Delfino","lastName":"De los Mares venus","username":null,"contacts":[{"id":150,"clientId":146,"email":"mariscoselsietemares@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":false,"types":[{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":145,"clientId":146,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_QZ7T1h3th3Dr7w","clientZoneVisible":true},{"id":146,"clientId":146,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180695453333629","clientZoneVisible":true},{"id":264,"clientId":146,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"ETfEB8at@GAqUt#2","clientZoneVisible":false},{"id":278,"clientId":146,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true}],"accountBalance":2120,"accountCredit":2120,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3949ab","addressGpsLat":21.1561796,"addressGpsLon":-100.9371826,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":1009,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[]}} + +[2026-04-06 23:55:25.672111] [info] Verificando existencia de atributo 'tipoPagoStripe' para Payment ID: 1009 +[2026-04-06 23:55:25.673707] [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/1009 +[2026-04-06 23:55:25.762511] [info] Payment 1009 has no User ID. Assigning Stripe User ID: 1180 +[2026-04-06 23:55:25.764367] [error] Failed to patch User 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/1009/user +[2026-04-06 23:55:25.855335] [info] Payment 1009 has wrong Method ID (1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae). Patching to 93814765-66a1-4c7d-a777-05c18fd6aab3 via Microservice. +[2026-04-06 23:55:25.855777] [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/1009/method +[2026-04-06 23:55:26.056791] [debug] Fallback Method Guessing 'Tarjeta de crédito Stripe' -> 'Tarjeta de Crédito' +[2026-04-06 23:55:26.056838] [info] PATCHING Payment 1009: Setting tipoPagoStripe = 'Tarjeta de Crédito' +Eviando comprobante de pago al cliente: 146 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_Delfino_De_los_Mares_venus.pdf + +El archivo PDF es válido y tiene contenido: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Delfino_De_los_Mares_venus.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_Delfino_De_los_Mares_venus.jpg + +[2026-04-06 23:55:29.730715] [info] Archivo subido exitosamente a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775519729.jpg +Imagen subida a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775519729.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_Delfino_De_los_Mares_venus_1775519729.jpg" + }, + "template_values": ["Delfino De los Mares venus", "$100", "$2120 a favor"], + "template_uuid": "57ead79cebd14902921477922403093b", + "optin_contact": true + } +Response del CallBell: {"message":{"uuid":"f8b5658d6b6240509794f810992775ea","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":"16839ef3-1f5c-47b1-8c28-bdbff14cb0f8","changeType":"insert","entity":"payment","entityId":1009,"message":null,"clientId":146,"eventName":"payment.add","clientData":{"id":146,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"36 Yucat\u00e1n","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Yucat\u00e1n 36, 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":"En los mares soy feliz :) pura playa y solyeahhjgjhb","sendInvoiceByPost":null,"invoiceMaturityDays":null,"stopServiceDue":null,"stopServiceDueDays":null,"organizationId":1,"tax1Id":null,"tax2Id":null,"tax3Id":null,"registrationDate":"2024-07-29T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":false,"firstName":"Delfino","lastName":"De los Mares venus","username":null,"contacts":[{"id":150,"clientId":146,"email":"mariscoselsietemares@gmail.com","phone":"5214181878106","name":null,"isBilling":false,"isContact":false,"types":[{"id":1000,"name":"WhatsApp"}]}],"attributes":[{"id":145,"clientId":146,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_QZ7T1h3th3Dr7w","clientZoneVisible":true},{"id":146,"clientId":146,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"002180695453333629","clientZoneVisible":true},{"id":264,"clientId":146,"customAttributeId":17,"name":"Password Antena Cliente","key":"passwordAntenaCliente","value":"ETfEB8at@GAqUt#2","clientZoneVisible":false},{"id":278,"clientId":146,"customAttributeId":21,"name":"RUTA DE COBRANZA","key":"rutaDeCobranza","value":"GUSANO","clientZoneVisible":true}],"accountBalance":2120,"accountCredit":2120,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#3949ab","addressGpsLat":21.1561796,"addressGpsLon":-100.9371826,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":false,"hasSuspendedService":true,"hasServiceWithoutDevices":true,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":1009,"clientId":146,"methodId":"93814765-66a1-4c7d-a777-05c18fd6aab3","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[]}} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":1009,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[{"id":"7e20113f-2836-424e-ae31-864a72a7a901","paymentId":1009,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"Tarjeta de Cr\u00e9dito","clientZoneVisible":true}]}] + +Nombre del cliente que se va a actualizar: Delfino De los Mares venus + +UUID: 74cc2bb45eb8409f92cd5dba99200d26 + +JSON con los datos a actualizar: {"name":"Delfino De los Mares venus","custom_fields":{"Site":"","Estado":"\ud83d\udfe0 Suspendido","URL":"\ud83c\udf10 https:\/\/sistema.siip.mx\/crm\/client\/146","Nombre":"\ud83d\udc64 Delfino De los Mares venus","Cliente":146,"Fecha Ultima Actualizacion":"\ud83d\udcc6\ud83d\udd04\ufe0f 06\/04\/2026 17:55","Saldo Actual":"\ud83d\udcb22120 a favor","Monto Ultimo Pago":"\ud83d\udcb2 100","Clabe Interbancaria":"002180695453333629","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 06\/04\/2026 17:55 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3","Antena\/Sectorial":"","Domicilio":"\ud83d\udccd Yucat\u00e1n 36, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","Resumen":"{\"Cliente\": \"146\",\"Nombre\": \"Delfino De los Mares venus\",\"Saldo Actual\": \"\ud83d\udcb22120 a favor\",\"Monto Ultimo Pago\": \"$ 100\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06\/04\/2026 17:55 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"06\/04\/2026 17:55\",\"Clabe Interbancaria\": \"002180695453333629\",\"Password Antena\": {\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}}","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲2020 a favor' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲2120 a favor' + +DEBUG COMPARACIÓN - CallBell Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - UCRM Estado: '🟠 Suspendido' + +DEBUG COMPARACIÓN - Diferencia encontrada en Site. CallBell: '0LOCS', UCRM: '' + +EJECUTANDO PATCH - Se detectaron cambios + +Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Delfino De los Mares venus","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-04-06T17:40:03Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https://dash.callbell.eu/chat/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA","Sus"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Cliente":"146","Monto Ultimo Pago":"💲 100","Nombre":"👤 Delfino De los Mares venus","Domicilio":"📍 Yucatán 36, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México","URL":"🌐 https://sistema.siip.mx/crm/client/146","Clabe Interbancaria":"002180695453333629","Fecha Ultimo Pago":"📆💸 06/04/2026 17:55 con Tarjeta de crédito Stripe 💳","Antena/Sectorial":"Sectorial-4b 172.16.13.16/24","Fecha Ultima Actualizacion":"📆🔄️ 06/04/2026 17:55","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}","user name":"Daniel Humberto","Site":"0LOCS","Saldo Actual":"💲2120 a favor","Resumen":"{\"Cliente\": \"146\",\"Nombre\": \"Delfino De los Mares venus\",\"Saldo Actual\": \"💲2120 a favor\",\"Monto Ultimo Pago\": \"$ 100\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06/04/2026 17:55 con Tarjeta de crédito Stripe 💳\",\"Fecha Ultima Actualizacion\": \"06/04/2026 17:55\",\"Clabe Interbancaria\": \"002180695453333629\",\"Password Antena\": {\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}}","Estado":"🟠 Suspendido"},"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-04-06 23:55:33.558805] [notice] Logging level set to:debug +[2026-04-06 23:55:33.558880] [debug] Payload recibido: {"uuid":"7cfc661f-729f-4876-b613-0eaf32730bdc","changeType":"edit","entity":"payment","entityId":"1009","eventName":"payment.edit","extraData":{"entity":{"id":1009,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[{"id":"7e20113f-2836-424e-ae31-864a72a7a901","paymentId":1009,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"Tarjeta de Cr\u00e9dito","clientZoneVisible":true}]},"entityBeforeEdit":{"id":1009,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T17:55:24-0600","amount":100,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":100,"userId":null,"attributes":[{"id":"7e20113f-2836-424e-ae31-864a72a7a901","paymentId":1009,"customAttributeId":20,"name":"Tipo Pago Stripe","key":"tipoPagoStripe","value":"Tarjeta de Cr\u00e9dito","clientZoneVisible":true}]}}} + +[2026-04-06 23:55:33.939404] [debug] Evento recibido: payment.edit +[2026-04-07 16:00:05.934784] [notice] Logging level set to:debug +[2026-04-07 16:00:05.934895] [debug] Payload recibido: {"uuid":"ae143472-44af-4674-8f60-bf7ae0157234","changeType":"draft_approved","entity":"invoice","entityId":"3357","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3357,"clientId":116,"number":"003303","createdDate":"2026-04-07T10:00:02-0600","dueDate":"2026-04-21T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-04-06T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":3375,"type":"service","label":"PREMIUM 07\/03\/2026 \u2013 06\/04\/2026","price":700,"quantity":1,"total":700,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":110,"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":"Jos\u00e9 Humberto","clientLastName":"Rodr\u00edguez","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"28 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-04-07 16:00:06.262165] [debug] Evento recibido: invoice.draft_approved +[2026-04-07 16:00:06.262317] [debug] Aprobación de Factura + +[2026-04-07 16:00:07.320565] [notice] Logging level set to:debug +[2026-04-07 16:00:07.320619] [debug] Payload recibido: {"uuid":"88d918ea-683a-449c-8521-e9f16dc11dfc","changeType":"draft_approved","entity":"invoice","entityId":"3358","eventName":"invoice.draft_approved","extraData":{"entity":{"id":3358,"clientId":110,"number":"003304","createdDate":"2026-04-07T10:00:02-0600","dueDate":"2026-04-21T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2026-04-06T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":3376,"type":"service","label":"plan300 07\/03\/2026 \u2013 06\/04\/2026","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":109,"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":"Maria la del Barrio","clientLastName":"Soy","clientCompanyName":null,"clientCompanyRegistrationNumber":null,"clientCompanyTaxId":null,"clientStreet1":"67 Morelos","clientStreet2":null,"clientCity":"Dolores Hidalgo Cuna de la Independencia Nacional","clientCountryId":173,"clientStateId":null,"clientZipCode":"37805","attributes":[],"uncollectible":false,"proforma":false,"generatedInvoiceId":null,"proformaInvoiceId":null,"isAppliedVatReverseCharge":false,"payAutomatically":false,"printed":false},"entityBeforeEdit":null}} + +[2026-04-07 16:00:07.585211] [debug] Evento recibido: invoice.draft_approved +[2026-04-07 16:00:07.585334] [debug] Aprobación de Factura + +[2026-04-07 19:31:36.162585] [notice] Logging level set to:debug +[2026-04-07 19:31:36.162770] [notice] Logging level set to:debug +[2026-04-07 19:31:36.162873] [debug] Payload recibido: { + "id": "evt_3TJfLXEFY1WEUtgR0TNak8tr", + "object": "event", + "api_version": "2023-10-16", + "created": 1775590295, + "data": { + "object": { + "id": "pi_3TJfLXEFY1WEUtgR005wGWek", + "object": "payment_intent", + "amount": 5000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic_async", + "client_secret": "pi_3TJfLXEFY1WEUtgR005wGWek_secret_XWMo8rZuJdx19TF2zCoRUplAU", + "confirmation_method": "automatic", + "created": 1775590295, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "Transferencia Bancaria" + }, + "next_action": { + "display_bank_transfer_instructions": { + "amount_remaining": 5000, + "currency": "mxn", + "financial_addresses": [ + { + "spei": { + "account_holder_address": { + "city": "Ciudad de México", + "country": "MX", + "line1": "Av Paseo de la Reforma 180 piso 29 col Juarez", + "line2": null, + "postal_code": "06600", + "state": "Ciudad de México" + }, + "account_holder_name": "SIIP INTERNET", + "bank_address": { + "city": "Naucalpan", + "country": "MX", + "line1": "Blvd. Manuel Avila Camacho 1902", + "line2": "Planta Baja, Cd. Satelite", + "postal_code": "C.P. 53100", + "state": "Estado de Mexico" + }, + "bank_code": "124", + "bank_name": "CITI MEXICO", + "clabe": "124180127512533812" + }, + "supported_networks": [ + "spei" + ], + "type": "spei" + } + ], + "hosted_instructions_url": "https://payments.stripe.com/bank_transfers/instructions/test_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9VSUZyV0lia3UxOUVPbmhpbktUTGsxSmZ5amRaelJO0100kL1O9mAq", + "reference": "067784", + "type": "mx_bank_transfer" + }, + "type": "display_bank_transfer_instructions" + }, + "on_behalf_of": null, + "payment_method": "pm_1TJfLXEFY1WEUtgR6sMEth8F", + "payment_method_configuration_details": null, + "payment_method_options": { + "customer_balance": { + "bank_transfer": { + "type": "mx_bank_transfer" + }, + "funding_type": "bank_transfer" + } + }, + "payment_method_types": [ + "customer_balance" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_action", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_ed93avDHaMPx0M", + "idempotency_key": "abffb195-1971-45cc-8be5-97d40de61585" + }, + "type": "payment_intent.requires_action" +} + +[2026-04-07 19:31:36.162986] [debug] Payload recibido: { + "id": "evt_3TJfLXEFY1WEUtgR01n6LzUU", + "object": "event", + "api_version": "2023-10-16", + "created": 1775590295, + "data": { + "object": { + "id": "pi_3TJfLXEFY1WEUtgR005wGWek", + "object": "payment_intent", + "amount": 5000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic_async", + "client_secret": "pi_3TJfLXEFY1WEUtgR005wGWek_secret_XWMo8rZuJdx19TF2zCoRUplAU", + "confirmation_method": "automatic", + "created": 1775590295, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": { + "signedInAdminId": "1180", + "createdBy": "UCRM", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "Transferencia Bancaria" + }, + "next_action": null, + "on_behalf_of": null, + "payment_method": null, + "payment_method_configuration_details": null, + "payment_method_options": { + "customer_balance": { + "bank_transfer": { + "type": "mx_bank_transfer" + }, + "funding_type": "bank_transfer" + } + }, + "payment_method_types": [ + "customer_balance" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_payment_method", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_ed93avDHaMPx0M", + "idempotency_key": "abffb195-1971-45cc-8be5-97d40de61585" + }, + "type": "payment_intent.created" +} + +[2026-04-07 19:31:36.163057] [info] No UUID found in the webhook data +[2026-04-07 19:31:36.163124] [info] No UUID found in the webhook data diff --git a/public.php b/public.php index cb4d77c0..dfdb7e0c 100755 --- a/public.php +++ b/public.php @@ -1976,7 +1976,7 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador - + @@ -2321,9 +2321,66 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador showToast(d.message, !d.success); } - + async function loadOxxoHistory(stripeCustomerId) { + const tbody = document.querySelector('#oxxoHistoryTable tbody'); + if (!tbody) return; + 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); + if (tbody) tbody.innerHTML = 'Error de conexión'; + } + } + + + + // --- INPUT VALIDATION & UX --- function setupNumericInput(inputId) { diff --git a/src/Service/PaymentIntentService.php b/src/Service/PaymentIntentService.php index c5845cb9..7bd0c279 100755 --- a/src/Service/PaymentIntentService.php +++ b/src/Service/PaymentIntentService.php @@ -174,7 +174,8 @@ class PaymentIntentService // Fetch a bit more to allow for filtering $collection = $this->stripeClient->paymentIntents->all([ 'customer' => $stripeCustomerId, - 'limit' => 20, + 'limit' => 100, + 'expand' => ['data.charges'], ]); $result = []; diff --git a/views/stripe.php b/views/stripe.php index 22f8cdc2..80457ea5 100755 --- a/views/stripe.php +++ b/views/stripe.php @@ -176,6 +176,51 @@ btn.textContent = 'Generar Referencia SPEI'; }; + async function loadStripeHistory(stripeCustomerId) { + const container = document.getElementById('stripeHistoryContainer'); + const tbody = document.querySelector('#stripeHistoryTable tbody'); + const cashBadge = document.getElementById('stripeCashBalanceBadge'); + const cashText = document.getElementById('stripeCashBalanceText'); + + try { + container.style.display = 'block'; + tbody.innerHTML = 'Cargando historial...'; + + const res = await fetch(`${window.SIIP_STRIPE_PATH || ''}?action=get_stripe_history&customerId=${stripeCustomerId}`); + const d = await res.json(); + + if (d.cashBalance !== undefined) { + cashBadge.style.display = 'flex'; + cashText.textContent = `Saldo Stripe: $${(d.cashBalance/100).toFixed(2)} MXN`; + } + + if (!d.payments || d.payments.length === 0) { + tbody.innerHTML = 'No hay pagos recientes'; + return; + } + + tbody.innerHTML = d.payments.map(p => { + let statusColor = 'var(--text-muted)'; + let statusLabel = p.status.toUpperCase(); + if (p.status === 'succeeded') { statusColor = 'var(--success)'; statusLabel = 'PAGADO'; } + if (p.status === 'processing') { statusColor = 'var(--warning)'; statusLabel = 'PENDIENTE'; } + + return ` + + ${statusLabel} + $${p.amount.toFixed(2)} + ${p.description} + ${p.date} + ${p.id} + `; + }).join(''); + + } catch (e) { + console.error(e); + tbody.innerHTML = 'Error de conexión'; + } + } + function showStripeResult(data) { const c = document.getElementById('stripeResultContent'); let html = `
@@ -212,59 +257,5 @@ c.innerHTML = html; 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'; - } - } });