Versión 2.6.2 correción de la rutina de envio de pdf
This commit is contained in:
parent
9fc3bcb8d9
commit
12d19c46de
BIN
comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.pdf
Executable file
BIN
comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.pdf
Executable file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 79 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 433 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 429 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 419 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 426 KiB |
581
data/plugin.log
581
data/plugin.log
@ -1,578 +1,75 @@
|
||||
[2025-01-25 5:17:07.670775] [notice] Logging level set to:debug
|
||||
[2025-01-25 5:17:07.692974] [debug] valor el evento recibido por webhook: job.edit
|
||||
[2025-01-27 9:09:48.661710] [notice] Logging level set to:debug
|
||||
[2025-01-27 9:09:48.918606] [debug] valor el evento recibido por webhook: payment.add
|
||||
|
||||
[2025-01-25 5:17:07.694156] [debug] Valor de JSON: {"uuid":"579302a7-863f-4b4a-b6ed-f462919d12e7","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T10:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-27 9:09:48.918746] [debug] Valor de JSON: {"uuid":"3ddd7acb-35c9-44d0-809c-60ed02a7a904","changeType":"insert","entity":"payment","entityId":"541","eventName":"payment.add","extraData":{"entity":{"id":541,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:09:41-0600","amount":270,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":270,"userId":1015,"attributes":[]},"entityBeforeEdit":null}}
|
||||
|
||||
[2025-01-25 5:17:07.694406] [debug] Se actualiza un trabajo
|
||||
[2025-01-27 9:09:48.919002] [debug] datos del notification para el invoice add:{"uuid":"3ddd7acb-35c9-44d0-809c-60ed02a7a904","changeType":"insert","entity":"payment","entityId":541,"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":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-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":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":3655,"accountCredit":3655,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":541,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:09:41-0600","amount":270,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":270,"userId":1015,"attributes":[]}}
|
||||
|
||||
[2025-01-25 5:17:07.694432] [debug] Valor de json_data: {"uuid":"579302a7-863f-4b4a-b6ed-f462919d12e7","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T10:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-25 5:17:07.694442] [debug] Validando claves dentro de entityBeforeEdit y entity
|
||||
[2025-01-25 5:17:07.694451] [debug] Los datos entityBeforeEdit y entity contienen el campo assignedUserId
|
||||
[2025-01-25 5:17:07.694458] [debug] El instalador cambió y la fecha cambió
|
||||
[2025-01-25 5:17:07.694479] [debug] Valor de $jsonNotificationData en verifyJobActionToDo: {"uuid":"579302a7-863f-4b4a-b6ed-f462919d12e7","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T10:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-27 9:09:48.919055] [debug] valor del payment data: {"id":541,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:09:41-0600","amount":270,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":270,"userId":1015,"attributes":[]}
|
||||
|
||||
[2025-01-25 5:17:07.694492] [debug] Valor de $clientId en verifyJobActionToDo: 2
|
||||
Eviando comprobante de pago al cliente: 2 con número: 5214181148783
|
||||
|
||||
[2025-01-25 5:17:07.694499] [debug] Valor de $installerId en verifyJobActionToDo: 1172
|
||||
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
|
||||
|
||||
[2025-01-25 5:17:07.694505] [debug] Valor de $jobId en verifyJobActionToDo: 23
|
||||
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
|
||||
|
||||
[2025-01-25 5:17:07.694571] [debug] Valor de $installersData en verifyJobActionToDo: {
|
||||
"instaladores": [
|
||||
{
|
||||
"id": 1019,
|
||||
"nombre": "Mucio Robledo",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1173,
|
||||
"nombre": "Angel Arvizu",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1172,
|
||||
"nombre": "Juan Rostro",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1015,
|
||||
"nombre": "Daniel Humberto",
|
||||
"whatsapp": "4181878106"
|
||||
}
|
||||
]
|
||||
}
|
||||
[2025-01-27 9:09:49.708559] [notice] Logging level set to:debug
|
||||
[2025-01-27 9:09:49.825673] [debug] valor el evento recibido por webhook: payment.edit
|
||||
|
||||
[2025-01-25 5:17:07.728100] [debug] Valor de $usersInstallers en verifyJobActionToDo: {"id":1172,"unmsId":"2ac31363-6037-40f3-8196-5cc7c71866b0","email":"amazonrostro@gmail.com","firstName":"Juan","lastName":"Rostro","username":"rostro","avatarColor":"#00695c","isActive":true}
|
||||
[2025-01-27 9:09:49.825728] [debug] Valor de JSON: {"uuid":"b1d04539-db1e-4c69-a8ad-bdda45b795fb","changeType":"edit","entity":"payment","entityId":"541","eventName":"payment.edit","extraData":{"entity":{"id":541,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:09:41-0600","amount":270,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":270,"userId":1015,"attributes":[]},"entityBeforeEdit":{"id":541,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:09:41-0600","amount":270,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":270,"userId":1015,"attributes":[]}}}
|
||||
|
||||
[2025-01-25 5:17:07.728157] [debug] tipo de dato de installerWhatsApp: string
|
||||
[2025-01-27 9:13:14.162317] [notice] Logging level set to:debug
|
||||
[2025-01-27 9:13:14.347201] [debug] valor el evento recibido por webhook: payment.add
|
||||
|
||||
[2025-01-25 5:17:07.728169] [debug] Número de WhatsApp del Instalador: 4181878106
|
||||
[2025-01-27 9:13:14.347254] [debug] Valor de JSON: {"uuid":"a6b033b9-593b-4274-b8f5-70754ce7d158","changeType":"insert","entity":"payment","entityId":"542","eventName":"payment.add","extraData":{"entity":{"id":542,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:13:08-0600","amount":290,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":290,"userId":1015,"attributes":[]},"entityBeforeEdit":null}}
|
||||
|
||||
[2025-01-25 5:17:07.771620] [debug] Valor de $usersInstallers {"id":1172,"unmsId":"2ac31363-6037-40f3-8196-5cc7c71866b0","email":"amazonrostro@gmail.com","firstName":"Juan","lastName":"Rostro","username":"rostro","avatarColor":"#00695c","isActive":true}
|
||||
[2025-01-27 9:13:14.348087] [debug] datos del notification para el invoice add:{"uuid":"a6b033b9-593b-4274-b8f5-70754ce7d158","changeType":"insert","entity":"payment","entityId":542,"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":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-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":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":3945,"accountCredit":3945,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false},"serviceData":null,"invoiceData":null,"paymentData":{"id":542,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:13:08-0600","amount":290,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":290,"userId":1015,"attributes":[]}}
|
||||
|
||||
[2025-01-25 5:17:07.771743] [debug] Valor de $installerFullName: Juan Rostro
|
||||
[2025-01-27 9:13:14.348133] [debug] valor del payment data: {"id":542,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:13:08-0600","amount":290,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":290,"userId":1015,"attributes":[]}
|
||||
|
||||
[2025-01-25 5:17:07.837168] [debug] Valor de $arrayClientCRM en verifyJobActionToDo: {"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas Test","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":9545,"accountCredit":9545,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}
|
||||
Eviando comprobante de pago al cliente: 2 con número: 5214181148783
|
||||
|
||||
[2025-01-25 5:17:07.837291] [debug] Dirección completa: Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México
|
||||
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
|
||||
|
||||
[2025-01-25 5:17:07.837336] [debug] URL de Google Maps: https://www.google.com/maps?q=21.1564209,-100.9384185
|
||||
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
|
||||
|
||||
[2025-01-25 5:17:07.837444] [debug] Valor de $arrayPhones en verifyJobActionToDo: {"WhatsNotifica":"4181148783"}
|
||||
El archivo PNG se ha generado correctamente en: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.png
|
||||
|
||||
[2025-01-25 5:17:07.837486] [debug] Valor de $clientAllPhonesString en verifyJobActionToDo: 5214181878106,4181148783
|
||||
Subiendo comprobante a worpdpress
|
||||
|
||||
[2025-01-25 5:17:07.837522] [debug] Valor de $arrayNumeros en verifyJobActionToDo: ["5214181878106","4181148783"]
|
||||
file_to_upload: /data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/../../comprobantes/Comprobante_Daniel_Humberto_Soto_Villegas.png
|
||||
|
||||
[2025-01-25 5:17:07.837682] [debug] Valor de $resultados en verifyJobActionToDo: ["5214181878106","5214181148783"]
|
||||
Conexión FTP exitosa
|
||||
|
||||
[2025-01-25 5:17:07.837730] [debug] Valor de $resultadoFinalNumerosCliente en verifyJobActionToDo: 5214181878106, 5214181148783
|
||||
El archivo ha sido cargado exitosamente.
|
||||
|
||||
[2025-01-25 5:17:07.841176] [debug] Se encontró un tipo de contacto WhatsNotifica
|
||||
La URL es: https://siip.mx/wp/wp-content/uploads/img/Comprobante_Daniel_Humberto_Soto_Villegas.png
|
||||
|
||||
Enviando mensaje de trabajo para el cliente
|
||||
Archivos eliminados
|
||||
|
||||
Datos de la notificación de trabajo: {"clientFullName":"Daniel Humberto Soto Villegas Test","jobId":"23","date":"07\/02\/2025 12:00 PM","installerName":"Juan Rostro"}
|
||||
|
||||
Debugging: reprogramming = true, changeInstaller = true
|
||||
|
||||
Enviando notificación de cambio de instalador al cliente, valor de reprogramming 1 y valor de changeInstaller 1
|
||||
Se terminó de subir comprobante a wordpress
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181148783",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"type": "document",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
"text": "S/M",
|
||||
"url": "https://siip.mx/wp/wp-content/uploads/img/Comprobante_Daniel_Humberto_Soto_Villegas.png"
|
||||
},
|
||||
"template_values": ["*Daniel Humberto Soto Villegas Test*", "*#23*", "*07/02/2025 12:00 PM*", "*Juan Rostro*"],
|
||||
"template_uuid": "0d57fd210595422caf2f5999642882a3",
|
||||
"template_values": ["Daniel Humberto Soto Villegas", "$290", "$3945 a favor"],
|
||||
"template_uuid": "57ead79cebd14902921477922403093b",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"1632bb436b8741868c7e8ac43fa8808e","status":"enqueued"}}
|
||||
Response del CallBell: {"message":{"uuid":"70be9a34b95e4bd9a7dd43e0ffcf5565","status":"enqueued"}}
|
||||
Hay menos de 100 archivos en el directorio. No se eliminarán archivos.
|
||||
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 5:17:08.779963] [info] Notificación enviada correctamente al contacto 4181148783 después de 1 intento(s).
|
||||
[2025-01-27 9:13:23.048587] [info] Notificación enviada correctamente al cliente con número 5214181148783 después de 1 intento(s).
|
||||
|
||||
[2025-01-25 5:17:08.780071] [debug] Valor de $installerWhatsApp en verifyJobActionToDo: 4181878106
|
||||
[2025-01-27 9:13:23.190856] [notice] Logging level set to:debug
|
||||
[2025-01-27 9:13:23.335273] [debug] valor el evento recibido por webhook: payment.edit
|
||||
|
||||
[2025-01-25 5:17:08.780102] [debug] Se cambió el instalador, por lo tanto se procede a enviarle mensaje al que se le desasignó
|
||||
|
||||
[2025-01-25 5:17:08.816251] [debug] Se encontró el Whatsapp del instalador anterior en el JSON y es: 4181878106
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Mucio Robledo Villegas","subjectOfChange":"se te ha desasignado la tarea con el folio ","jobId":"23","clientFullName":"[2] Daniel Humberto Soto Villegas Test","additionalChangeData":"En tu lugar asistir\u00e1 el t\u00e9cnico *Juan Rostro*"}
|
||||
|
||||
Enviando notificación de cambio de instalador al instalador, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Mucio Robledo Villegas", "se te ha desasignado la tarea con el folio ", "*#23*", "[2] Daniel Humberto Soto Villegas Test", "En tu lugar asistirá el técnico *Juan Rostro*"],
|
||||
"template_uuid": "e1aa2b0fd3884595918f4ac2676acd29",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"70c2dfb8350c457a87b7213d58798744","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Juan Rostro","clientFullName":"[2] Daniel Humberto Soto Villegas Test","jobId":"23","clientAddress":"Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","clientWhatsApp":"5214181878106, 5214181148783","date":"07\/02\/2025 12:00 PM","jobDescription":"Alinear con la sectorial mas cercana","gmapsLocation":"https:\/\/www.google.com\/maps?q=21.1564209,-100.9384185"}
|
||||
|
||||
Enviando notificación de reprogramación al instalador, valor de reprogramming 1 y valor de changeInstaller
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Juan Rostro", "#23", "[2] Daniel Humberto Soto Villegas Test", "Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México", "5214181878106, 5214181148783", "07/02/2025 12:00 PM", "Alinear con la sectorial mas cercana", "https://www.google.com/maps?q=21.1564209,-100.9384185"],
|
||||
"template_uuid": "42152c07c67b468ba68e581c0283e22e",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"a30a103783024a9194f7b1e42fbddcf1","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:00:06.564412] [notice] Logging level set to:debug
|
||||
[2025-01-25 16:00:06.952960] [debug] valor el evento recibido por webhook: invoice.add_draft
|
||||
|
||||
[2025-01-25 16:00:06.953145] [debug] Valor de JSON: {"uuid":"8c61b78d-9050-4d41-b986-39fa3f2bbf44","changeType":"insert","entity":"invoice","entityId":"1448","eventName":"invoice.add_draft","extraData":{"entity":{"id":1448,"clientId":1,"number":"001412","createdDate":"2025-01-25T10:00:02-0600","dueDate":"2025-02-08T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2025-01-24T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":1451,"type":"service","label":"plan300 25\/12\/2024 \u2013 24\/01\/2025","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":103,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":300,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":0,"currencyCode":"MXN","status":3,"paymentCovers":[{"id":544,"invoiceId":1448,"paymentId":477,"creditNoteId":null,"refundId":null,"amount":180},{"id":545,"invoiceId":1448,"paymentId":478,"creditNoteId":null,"refundId":null,"amount":120}],"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},"entityBeforeEdit":null}}
|
||||
|
||||
[2025-01-25 16:00:07.269078] [notice] Logging level set to:debug
|
||||
[2025-01-25 16:00:07.522296] [debug] valor el evento recibido por webhook: invoice.draft_approved
|
||||
|
||||
[2025-01-25 16:00:07.522469] [debug] Valor de JSON: {"uuid":"33ecc427-a9b1-45ce-831b-61e6394dcd77","changeType":"draft_approved","entity":"invoice","entityId":"1448","eventName":"invoice.draft_approved","extraData":{"entity":{"id":1448,"clientId":1,"number":"001412","createdDate":"2025-01-25T10:00:02-0600","dueDate":"2025-02-08T10:00:02-0600","emailSentDate":null,"maturityDays":14,"taxableSupplyDate":"2025-01-24T00:00:00+0000","notes":null,"adminNotes":null,"items":[{"id":1451,"type":"service","label":"plan300 25\/12\/2024 \u2013 24\/01\/2025","price":300,"quantity":1,"total":300,"unit":null,"tax1Id":null,"tax2Id":null,"tax3Id":null,"serviceId":103,"serviceSurchargeId":null,"productId":null,"feeId":null,"discountPrice":0,"discountQuantity":0,"discountTotal":0}],"subtotal":300,"discount":null,"discountLabel":"Descuento","taxes":[],"total":300,"amountPaid":300,"totalUntaxed":300,"totalDiscount":0,"totalTaxAmount":0,"amountToPay":0,"currencyCode":"MXN","status":3,"paymentCovers":[{"id":544,"invoiceId":1448,"paymentId":477,"creditNoteId":null,"refundId":null,"amount":180},{"id":545,"invoiceId":1448,"paymentId":478,"creditNoteId":null,"refundId":null,"amount":120}],"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},"entityBeforeEdit":null}}
|
||||
|
||||
[2025-01-25 16:08:02.198057] [notice] Logging level set to:debug
|
||||
[2025-01-25 16:08:02.221108] [debug] valor el evento recibido por webhook: job.edit
|
||||
|
||||
[2025-01-25 16:08:02.221163] [debug] Valor de JSON: {"uuid":"0121ed66-182a-4217-bed1-d6a9b8ec6b86","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:08:02.222779] [debug] Se actualiza un trabajo
|
||||
|
||||
[2025-01-25 16:08:02.222834] [debug] Valor de json_data: {"uuid":"0121ed66-182a-4217-bed1-d6a9b8ec6b86","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-25 16:08:02.222846] [debug] Validando claves dentro de entityBeforeEdit y entity
|
||||
[2025-01-25 16:08:02.222856] [debug] Los datos entityBeforeEdit y entity contienen el campo assignedUserId
|
||||
[2025-01-25 16:08:02.222865] [debug] El instalador cambió y la fecha no cambió
|
||||
[2025-01-25 16:08:02.222888] [debug] Valor de $jsonNotificationData en verifyJobActionToDo: {"uuid":"0121ed66-182a-4217-bed1-d6a9b8ec6b86","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1172,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:08:02.222903] [debug] Valor de $clientId en verifyJobActionToDo: 2
|
||||
|
||||
[2025-01-25 16:08:02.222912] [debug] Valor de $installerId en verifyJobActionToDo: 1019
|
||||
|
||||
[2025-01-25 16:08:02.222922] [debug] Valor de $jobId en verifyJobActionToDo: 23
|
||||
|
||||
[2025-01-25 16:08:02.222996] [debug] Valor de $installersData en verifyJobActionToDo: {
|
||||
"instaladores": [
|
||||
{
|
||||
"id": 1019,
|
||||
"nombre": "Mucio Robledo",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1173,
|
||||
"nombre": "Angel Arvizu",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1172,
|
||||
"nombre": "Juan Rostro",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1015,
|
||||
"nombre": "Daniel Humberto",
|
||||
"whatsapp": "4181878106"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
[2025-01-25 16:08:02.258013] [debug] Valor de $usersInstallers en verifyJobActionToDo: {"id":1019,"unmsId":"75e00242-86c2-436a-b3ac-bd6c31db681e","email":"lionelmuz@gmail.com","firstName":"Mucio","lastName":"Robledo Villegas","username":"muz","avatarColor":"#8bc34a","isActive":true}
|
||||
|
||||
[2025-01-25 16:08:02.258071] [debug] tipo de dato de installerWhatsApp: string
|
||||
|
||||
[2025-01-25 16:08:02.258084] [debug] Número de WhatsApp del Instalador: 4181878106
|
||||
|
||||
[2025-01-25 16:08:02.295078] [debug] Valor de $usersInstallers {"id":1019,"unmsId":"75e00242-86c2-436a-b3ac-bd6c31db681e","email":"lionelmuz@gmail.com","firstName":"Mucio","lastName":"Robledo Villegas","username":"muz","avatarColor":"#8bc34a","isActive":true}
|
||||
|
||||
[2025-01-25 16:08:02.295131] [debug] Valor de $installerFullName: Mucio Robledo Villegas
|
||||
|
||||
[2025-01-25 16:08:02.365844] [debug] Valor de $arrayClientCRM en verifyJobActionToDo: {"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas Test","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":9545,"accountCredit":9545,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}
|
||||
|
||||
[2025-01-25 16:08:02.365910] [debug] Dirección completa: Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México
|
||||
|
||||
[2025-01-25 16:08:02.365923] [debug] URL de Google Maps: https://www.google.com/maps?q=21.1564209,-100.9384185
|
||||
|
||||
[2025-01-25 16:08:02.366007] [debug] Valor de $arrayPhones en verifyJobActionToDo: {"WhatsNotifica":"4181148783"}
|
||||
|
||||
[2025-01-25 16:08:02.366023] [debug] Valor de $clientAllPhonesString en verifyJobActionToDo: 5214181878106,4181148783
|
||||
|
||||
[2025-01-25 16:08:02.366031] [debug] Valor de $arrayNumeros en verifyJobActionToDo: ["5214181878106","4181148783"]
|
||||
|
||||
[2025-01-25 16:08:02.366174] [debug] Valor de $resultados en verifyJobActionToDo: ["5214181878106","5214181148783"]
|
||||
|
||||
[2025-01-25 16:08:02.366194] [debug] Valor de $resultadoFinalNumerosCliente en verifyJobActionToDo: 5214181878106, 5214181148783
|
||||
|
||||
[2025-01-25 16:08:02.369730] [debug] Se encontró un tipo de contacto WhatsNotifica
|
||||
|
||||
Enviando mensaje de trabajo para el cliente
|
||||
|
||||
Datos de la notificación de trabajo: {"clientFullName":"Daniel Humberto Soto Villegas Test","jobId":"23","date":"07\/02\/2025 12:00 PM","installerName":"Mucio Robledo Villegas"}
|
||||
|
||||
Debugging: reprogramming = false, changeInstaller = true
|
||||
|
||||
Enviando notificación de cambio de instalador al cliente, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181148783",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["*Daniel Humberto Soto Villegas Test*", "*#23*", "*07/02/2025 12:00 PM*", "*Mucio Robledo Villegas*"],
|
||||
"template_uuid": "0d57fd210595422caf2f5999642882a3",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"0ae55fe1ae4b441f9a40c0c38bb1cf35","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:08:03.181369] [info] Notificación enviada correctamente al contacto 4181148783 después de 1 intento(s).
|
||||
|
||||
[2025-01-25 16:08:03.181613] [debug] Valor de $installerWhatsApp en verifyJobActionToDo: 4181878106
|
||||
|
||||
[2025-01-25 16:08:03.181737] [debug] Se cambió el instalador, por lo tanto se procede a enviarle mensaje al que se le desasignó
|
||||
|
||||
[2025-01-25 16:08:03.218097] [debug] Se encontró el Whatsapp del instalador anterior en el JSON y es: 4181878106
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Juan Rostro","subjectOfChange":"se te ha desasignado la tarea con el folio ","jobId":"23","clientFullName":"[2] Daniel Humberto Soto Villegas Test","additionalChangeData":"En tu lugar asistir\u00e1 el t\u00e9cnico *Mucio Robledo Villegas*"}
|
||||
|
||||
Enviando notificación de cambio de instalador al instalador, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Juan Rostro", "se te ha desasignado la tarea con el folio ", "#23", "[2] Daniel Humberto Soto Villegas Test", "En tu lugar asistirá el técnico *Mucio Robledo Villegas*"],
|
||||
"template_uuid": "e1aa2b0fd3884595918f4ac2676acd29",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"8e3a2f1e5bb0486db9806c11d6df15da","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Mucio Robledo Villegas","clientFullName":"[2] Daniel Humberto Soto Villegas Test","jobId":"23","clientAddress":"Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","clientWhatsApp":"5214181878106, 5214181148783","date":"07\/02\/2025 12:00 PM","jobDescription":"Alinear con la sectorial mas cercana","gmapsLocation":"https:\/\/www.google.com\/maps?q=21.1564209,-100.9384185"}
|
||||
|
||||
Enviando notificación normal de asignación de tarea al instalador, valor de reprogramming y valor de changeInstaller
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Mucio Robledo Villegas", "#23", "[2] Daniel Humberto Soto Villegas Test", "Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México", "5214181878106, 5214181148783", "07/02/2025 12:00 PM", "Alinear con la sectorial mas cercana", "https://www.google.com/maps?q=21.1564209,-100.9384185"],
|
||||
"template_uuid": "b6663394265e4bcdb215369aa9ba0f21",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"d8eeda24161c4912b0c9dd87cf000e4a","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:11:42.980844] [notice] Logging level set to:debug
|
||||
[2025-01-25 16:11:43.007235] [debug] valor el evento recibido por webhook: job.edit
|
||||
|
||||
[2025-01-25 16:11:43.007380] [debug] Valor de JSON: {"uuid":"f6c19eca-67f4-49a7-9bb9-4974595ae910","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:11:43.007672] [debug] Se actualiza un trabajo
|
||||
|
||||
[2025-01-25 16:11:43.007742] [debug] Valor de json_data: {"uuid":"f6c19eca-67f4-49a7-9bb9-4974595ae910","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-25 16:11:43.007782] [debug] Validando claves dentro de entityBeforeEdit y entity
|
||||
[2025-01-25 16:11:43.007818] [debug] Los datos entityBeforeEdit y entity contienen el campo assignedUserId
|
||||
[2025-01-25 16:11:43.007855] [debug] El instalador cambió y la fecha no cambió
|
||||
[2025-01-25 16:11:43.007905] [debug] Valor de $jsonNotificationData en verifyJobActionToDo: {"uuid":"f6c19eca-67f4-49a7-9bb9-4974595ae910","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:11:43.007945] [debug] Valor de $clientId en verifyJobActionToDo: 2
|
||||
|
||||
[2025-01-25 16:11:43.007980] [debug] Valor de $installerId en verifyJobActionToDo: 1173
|
||||
|
||||
[2025-01-25 16:11:43.008013] [debug] Valor de $jobId en verifyJobActionToDo: 23
|
||||
|
||||
[2025-01-25 16:11:43.008097] [debug] Valor de $installersData en verifyJobActionToDo: {
|
||||
"instaladores": [
|
||||
{
|
||||
"id": 1019,
|
||||
"nombre": "Mucio Robledo",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1173,
|
||||
"nombre": "Angel Arvizu",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1172,
|
||||
"nombre": "Juan Rostro",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1015,
|
||||
"nombre": "Daniel Humberto",
|
||||
"whatsapp": "4181878106"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
[2025-01-25 16:11:43.046793] [debug] Valor de $usersInstallers en verifyJobActionToDo: {"id":1173,"unmsId":"5cb37ee8-e445-4b2a-87d4-6c83eebb8944","email":"hachi9801@gmail.com","firstName":"\u00c1ngel ","lastName":"Arvizu","username":"mamey","avatarColor":"#4caf50","isActive":true}
|
||||
|
||||
[2025-01-25 16:11:43.046926] [debug] tipo de dato de installerWhatsApp: string
|
||||
|
||||
[2025-01-25 16:11:43.046968] [debug] Número de WhatsApp del Instalador: 4181878106
|
||||
|
||||
[2025-01-25 16:11:43.079803] [debug] Valor de $usersInstallers {"id":1173,"unmsId":"5cb37ee8-e445-4b2a-87d4-6c83eebb8944","email":"hachi9801@gmail.com","firstName":"\u00c1ngel ","lastName":"Arvizu","username":"mamey","avatarColor":"#4caf50","isActive":true}
|
||||
|
||||
[2025-01-25 16:11:43.079854] [debug] Valor de $installerFullName: Ángel Arvizu
|
||||
|
||||
[2025-01-25 16:11:43.153673] [debug] Valor de $arrayClientCRM en verifyJobActionToDo: {"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas Test","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":9545,"accountCredit":9545,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}
|
||||
|
||||
[2025-01-25 16:11:43.153753] [debug] Dirección completa: Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México
|
||||
|
||||
[2025-01-25 16:11:43.153774] [debug] URL de Google Maps: https://www.google.com/maps?q=21.1564209,-100.9384185
|
||||
|
||||
[2025-01-25 16:11:43.153882] [debug] Valor de $arrayPhones en verifyJobActionToDo: {"WhatsNotifica":"4181148783"}
|
||||
|
||||
[2025-01-25 16:11:43.153997] [debug] Valor de $clientAllPhonesString en verifyJobActionToDo: 5214181878106,4181148783
|
||||
|
||||
[2025-01-25 16:11:43.154062] [debug] Valor de $arrayNumeros en verifyJobActionToDo: ["5214181878106","4181148783"]
|
||||
|
||||
[2025-01-25 16:11:43.154372] [debug] Valor de $resultados en verifyJobActionToDo: ["5214181878106","5214181148783"]
|
||||
|
||||
[2025-01-25 16:11:43.154472] [debug] Valor de $resultadoFinalNumerosCliente en verifyJobActionToDo: 5214181878106, 5214181148783
|
||||
|
||||
[2025-01-25 16:11:43.160531] [debug] Se encontró un tipo de contacto WhatsNotifica
|
||||
|
||||
Enviando mensaje de trabajo para el cliente
|
||||
|
||||
Datos de la notificación de trabajo: {"clientFullName":"Daniel Humberto Soto Villegas Test","jobId":"23","date":"07\/02\/2025 12:00 PM","installerName":"\u00c1ngel Arvizu"}
|
||||
|
||||
Debugging: reprogramming = false, changeInstaller = true
|
||||
|
||||
Enviando notificación de cambio de instalador al cliente, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181148783",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["*Daniel Humberto Soto Villegas Test*", "*#23*", "*07/02/2025 12:00 PM*", "*Ángel Arvizu*"],
|
||||
"template_uuid": "0d57fd210595422caf2f5999642882a3",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"41d6cc6557d94b2e861859cbfe1421b8","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:11:44.000124] [info] Notificación enviada correctamente al contacto 4181148783 después de 1 intento(s).
|
||||
|
||||
[2025-01-25 16:11:44.000235] [debug] Valor de $installerWhatsApp en verifyJobActionToDo: 4181878106
|
||||
|
||||
[2025-01-25 16:11:44.000266] [debug] Se cambió el instalador, por lo tanto se procede a enviarle mensaje al que se le desasignó
|
||||
|
||||
[2025-01-25 16:11:44.036245] [debug] Se encontró el Whatsapp del instalador anterior en el JSON y es: 4181878106
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Mucio Robledo Villegas","subjectOfChange":"se te ha desasignado la tarea con el folio ","jobId":"23","clientFullName":"[2] Daniel Humberto Soto Villegas Test","additionalChangeData":"En tu lugar asistir\u00e1 el t\u00e9cnico *\u00c1ngel Arvizu*"}
|
||||
|
||||
Enviando notificación de cambio de instalador al instalador, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Mucio Robledo Villegas", "se te ha desasignado la tarea con el folio ", "#23", "[2] Daniel Humberto Soto Villegas Test", "En tu lugar asistirá el técnico *Ángel Arvizu*"],
|
||||
"template_uuid": "e1aa2b0fd3884595918f4ac2676acd29",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"060ed707f96942fcb9365d10dbe28e10","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"\u00c1ngel Arvizu","clientFullName":"[2] Daniel Humberto Soto Villegas Test","jobId":"23","clientAddress":"Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","clientWhatsApp":"5214181878106, 5214181148783","date":"07\/02\/2025 12:00 PM","jobDescription":"Alinear con la sectorial mas cercana","gmapsLocation":"https:\/\/www.google.com\/maps?q=21.1564209,-100.9384185"}
|
||||
|
||||
Enviando notificación normal de asignación de tarea al instalador, valor de reprogramming y valor de changeInstaller
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Ángel Arvizu", "*#23*", "[2] Daniel Humberto Soto Villegas Test", "Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México", "5214181878106, 5214181148783", "07/02/2025 12:00 PM", "Alinear con la sectorial mas cercana", "https://www.google.com/maps?q=21.1564209,-100.9384185"],
|
||||
"template_uuid": "b6663394265e4bcdb215369aa9ba0f21",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"ae51c48f313949ddb612e16c5376c0c4","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:32:16.606848] [notice] Logging level set to:debug
|
||||
[2025-01-25 16:32:16.641947] [debug] valor el evento recibido por webhook: job.edit
|
||||
|
||||
[2025-01-25 16:32:16.642096] [debug] Valor de JSON: {"uuid":"2228aa84-55bf-4215-9b5b-ec6d48826a7f","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:32:16.642365] [debug] Se actualiza un trabajo
|
||||
|
||||
[2025-01-25 16:32:16.642431] [debug] Valor de json_data: {"uuid":"2228aa84-55bf-4215-9b5b-ec6d48826a7f","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
[2025-01-25 16:32:16.642488] [debug] Validando claves dentro de entityBeforeEdit y entity
|
||||
[2025-01-25 16:32:16.642528] [debug] Los datos entityBeforeEdit y entity contienen el campo assignedUserId
|
||||
[2025-01-25 16:32:16.642564] [debug] El instalador cambió y la fecha no cambió
|
||||
[2025-01-25 16:32:16.642608] [debug] Valor de $jsonNotificationData en verifyJobActionToDo: {"uuid":"2228aa84-55bf-4215-9b5b-ec6d48826a7f","changeType":"edit","entity":"job","entityId":"23","eventName":"job.edit","extraData":{"entity":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1019,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]},"entityBeforeEdit":{"id":23,"title":"Alinear","description":"Alinear con la sectorial mas cercana","assignedUserId":1173,"clientId":2,"date":"2025-02-07T12:00:00-0600","duration":60,"status":0,"address":"31 Chiapas, Dolores Hidalgo Cuna de la Independencia Nacional, 37800, Mexico","gpsLat":null,"gpsLon":null,"attachments":[],"tasks":[]}}}
|
||||
|
||||
[2025-01-25 16:32:16.642644] [debug] Valor de $clientId en verifyJobActionToDo: 2
|
||||
|
||||
[2025-01-25 16:32:16.642678] [debug] Valor de $installerId en verifyJobActionToDo: 1019
|
||||
|
||||
[2025-01-25 16:32:16.642712] [debug] Valor de $jobId en verifyJobActionToDo: 23
|
||||
|
||||
[2025-01-25 16:32:16.642796] [debug] Valor de $installersData en verifyJobActionToDo: {
|
||||
"instaladores": [
|
||||
{
|
||||
"id": 1019,
|
||||
"nombre": "Mucio Robledo",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1173,
|
||||
"nombre": "Angel Arvizu",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1172,
|
||||
"nombre": "Juan Rostro",
|
||||
"whatsapp": "4181878106"
|
||||
},
|
||||
{
|
||||
"id": 1015,
|
||||
"nombre": "Daniel Humberto",
|
||||
"whatsapp": "4181878106"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
[2025-01-25 16:32:16.688707] [debug] Valor de $usersInstallers en verifyJobActionToDo: {"id":1019,"unmsId":"75e00242-86c2-436a-b3ac-bd6c31db681e","email":"lionelmuz@gmail.com","firstName":"Mucio","lastName":"Robledo Villegas","username":"muz","avatarColor":"#8bc34a","isActive":true}
|
||||
|
||||
[2025-01-25 16:32:16.688842] [debug] tipo de dato de installerWhatsApp: string
|
||||
|
||||
[2025-01-25 16:32:16.688885] [debug] Número de WhatsApp del Instalador: 4181878106
|
||||
|
||||
[2025-01-25 16:32:16.730701] [debug] Valor de $usersInstallers {"id":1019,"unmsId":"75e00242-86c2-436a-b3ac-bd6c31db681e","email":"lionelmuz@gmail.com","firstName":"Mucio","lastName":"Robledo Villegas","username":"muz","avatarColor":"#8bc34a","isActive":true}
|
||||
|
||||
[2025-01-25 16:32:16.730830] [debug] Valor de $installerFullName: Mucio Robledo Villegas
|
||||
|
||||
[2025-01-25 16:32:16.842267] [debug] Valor de $arrayClientCRM en verifyJobActionToDo: {"id":2,"userIdent":null,"previousIsp":null,"isLead":false,"clientType":1,"companyName":null,"companyRegistrationNumber":null,"companyTaxId":null,"companyWebsite":null,"street1":"31 Chiapas","street2":null,"city":"Dolores Hidalgo Cuna de la Independencia Nacional","countryId":173,"stateId":null,"zipCode":"37800","fullAddress":"Chiapas 31, 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-25T00:00:00-0600","leadConvertedAt":null,"companyContactFirstName":null,"companyContactLastName":null,"isActive":true,"firstName":"Daniel Humberto","lastName":"Soto Villegas Test","username":"danydhsv","contacts":[{"id":2,"clientId":2,"email":"dhsv.141089@gmail.com","phone":"5214181878106","name":"Personal","isBilling":false,"isContact":false,"types":[]},{"id":170,"clientId":2,"email":"chavoloco@homail.com","phone":"4181148783","name":"Tio","isBilling":false,"isContact":false,"types":[{"id":1003,"name":"WhatsNotifica"}]}],"attributes":[{"id":112,"clientId":2,"customAttributeId":10,"name":"Stripe Customer ID","key":"stripeCustomerId","value":"cus_PetN1dhr4rx0kX","clientZoneVisible":true},{"id":113,"clientId":2,"customAttributeId":11,"name":"Clabe Interbancaria","key":"clabeInterbancaria","value":"0021804341999569810","clientZoneVisible":true}],"accountBalance":9545,"accountCredit":9545,"accountOutstanding":0,"currencyCode":"MXN","organizationName":"SIIP Pruebas","bankAccounts":[],"tags":[],"invitationEmailSentDate":null,"avatarColor":"#f1df43","addressGpsLat":21.1564209,"addressGpsLon":-100.9384185,"isArchived":false,"generateProformaInvoices":null,"usesProforma":false,"hasOverdueInvoice":false,"hasOutage":true,"hasSuspendedService":false,"hasServiceWithoutDevices":false,"referral":null,"hasPaymentSubscription":false,"hasAutopayCreditCard":false}
|
||||
|
||||
[2025-01-25 16:32:16.842426] [debug] Dirección completa: Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México
|
||||
|
||||
[2025-01-25 16:32:16.842494] [debug] URL de Google Maps: https://www.google.com/maps?q=21.1564209,-100.9384185
|
||||
|
||||
[2025-01-25 16:32:16.842602] [debug] Valor de $arrayPhones en verifyJobActionToDo: {"WhatsNotifica":"4181148783"}
|
||||
|
||||
[2025-01-25 16:32:16.842647] [debug] Valor de $clientAllPhonesString en verifyJobActionToDo: 5214181878106,4181148783
|
||||
|
||||
[2025-01-25 16:32:16.842684] [debug] Valor de $arrayNumeros en verifyJobActionToDo: ["5214181878106","4181148783"]
|
||||
|
||||
[2025-01-25 16:32:16.842849] [debug] Valor de $resultados en verifyJobActionToDo: ["5214181878106","5214181148783"]
|
||||
|
||||
[2025-01-25 16:32:16.842905] [debug] Valor de $resultadoFinalNumerosCliente en verifyJobActionToDo: 5214181878106, 5214181148783
|
||||
|
||||
[2025-01-25 16:32:16.842974] [debug] Se encontró un tipo de contacto WhatsNotifica
|
||||
|
||||
Enviando mensaje de trabajo para el cliente
|
||||
|
||||
Datos de la notificación de trabajo: {"clientFullName":"Daniel Humberto Soto Villegas Test","jobId":"23","date":"07\/02\/2025 a las 12:00 PM aproximadamente","installerName":"Mucio Robledo Villegas"}
|
||||
|
||||
Debugging: reprogramming = false, changeInstaller = true
|
||||
|
||||
Enviando notificación de cambio de instalador al cliente, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181148783",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["*Daniel Humberto Soto Villegas Test*", "*#23*", "*07/02/2025 a las 12:00 PM aproximadamente*", "*Mucio Robledo Villegas*"],
|
||||
"template_uuid": "0d57fd210595422caf2f5999642882a3",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"321883ffff084d71b73f3b96014527f5","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
[2025-01-25 16:32:17.728960] [info] Notificación enviada correctamente al contacto 4181148783 después de 1 intento(s).
|
||||
|
||||
[2025-01-25 16:32:17.729016] [debug] Valor de $installerWhatsApp en verifyJobActionToDo: 4181878106
|
||||
|
||||
[2025-01-25 16:32:17.729027] [debug] Se cambió el instalador, por lo tanto se procede a enviarle mensaje al que se le desasignó
|
||||
|
||||
[2025-01-25 16:32:17.757659] [debug] Se encontró el Whatsapp del instalador anterior en el JSON y es: 4181878106
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"\u00c1ngel Arvizu","subjectOfChange":"se te ha desasignado la tarea con el folio ","jobId":"23","clientFullName":"[2] Daniel Humberto Soto Villegas Test","additionalChangeData":"En tu lugar asistir\u00e1 el t\u00e9cnico *Mucio Robledo Villegas*"}
|
||||
|
||||
Enviando notificación de cambio de instalador al instalador, valor de reprogramming y valor de changeInstaller 1
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Ángel Arvizu", "se te ha desasignado la tarea con el folio ", "#23", "[2] Daniel Humberto Soto Villegas Test", "En tu lugar asistirá el técnico *Mucio Robledo Villegas*"],
|
||||
"template_uuid": "e1aa2b0fd3884595918f4ac2676acd29",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"5786cdf5735449ad84dd54b67a7a291a","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
|
||||
Enviando mensaje de tarea al instalador
|
||||
|
||||
Datos de la notificación de tarea: {"installerName":"Mucio Robledo Villegas","clientFullName":"[2] Daniel Humberto Soto Villegas Test","jobId":"23","clientAddress":"Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., M\u00e9xico","clientWhatsApp":"5214181878106, 5214181148783","date":"07\/02\/2025 a las 12:00 PM aproximadamente","jobDescription":"Alinear con la sectorial mas cercana","gmapsLocation":"https:\/\/www.google.com\/maps?q=21.1564209,-100.9384185"}
|
||||
|
||||
Enviando notificación normal de asignación de tarea al instalador, valor de reprogramming y valor de changeInstaller
|
||||
|
||||
La cadena CURL que se envia es: {
|
||||
"to": "5214181878106",
|
||||
"from": "whatsapp",
|
||||
"type": "text",
|
||||
"content": {
|
||||
"text": "S/M"
|
||||
},
|
||||
"template_values": ["Mucio Robledo Villegas", "*#23*", "[2] Daniel Humberto Soto Villegas Test", "Chiapas 31, Centro, Dolores Hidalgo Cuna de la Independencia Nacional, Gto., México", "5214181878106, 5214181148783", "07/02/2025 a las 12:00 PM aproximadamente", "Alinear con la sectorial mas cercana", "https://www.google.com/maps?q=21.1564209,-100.9384185"],
|
||||
"template_uuid": "b6663394265e4bcdb215369aa9ba0f21",
|
||||
"optin_contact": true
|
||||
}
|
||||
Response del CallBell: {"message":{"uuid":"aed76e85fb92448785062159fa7fdc80","status":"enqueued"}}
|
||||
La notificación fue enviada correctamente con estado: enqueued
|
||||
[2025-01-27 9:13:23.335477] [debug] Valor de JSON: {"uuid":"f1616459-1007-4b68-9163-56fdae298eca","changeType":"edit","entity":"payment","entityId":"542","eventName":"payment.edit","extraData":{"entity":{"id":542,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:13:08-0600","amount":290,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":290,"userId":1015,"attributes":[]},"entityBeforeEdit":{"id":542,"clientId":2,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2025-01-27T03:13:08-0600","amount":290,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":290,"userId":1015,"attributes":[]}}}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"displayName": "SIIP - Procesador de Pagos en línea con Stripe, Oxxo y Transferencia, Sincronizador de CallBell y Envío de Notificaciones y comprobantes vía WhatsApp",
|
||||
"description": "Este plugin sincroniza los clientes del sitema UISP CRM con los contactos de WhatsApp en CallBell, además procesa pagos de Stripe como las trasferencias bancarias y genera referencias de pago vía OXXO, además envía comprobantes de pago en formato imagen PNG o texto vía Whatsapp a los clientes",
|
||||
"url": "https://siip.mx/",
|
||||
"version": "2.6.1",
|
||||
"version": "2.6.2",
|
||||
"unmsVersionCompliancy": {
|
||||
"min": "2.1.0",
|
||||
"max": null
|
||||
|
||||
@ -8,6 +8,7 @@ use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Imagick;
|
||||
use Ubnt\UcrmPluginSdk\Service\PluginLogManager;
|
||||
use ImagickException;
|
||||
use Ubnt\UcrmPluginSdk\Service\UcrmApi;
|
||||
use Ubnt\UcrmPluginSdk\Service\PluginConfigManager;
|
||||
use Ubnt\UcrmPluginSdk\Service\UcrmOptionsManager;
|
||||
@ -141,11 +142,12 @@ class ClientCallBellAPI
|
||||
$campo3 = sprintf('*%s*', $jobNotificationData['date']);
|
||||
$campo4 = sprintf('*%s*', $jobNotificationData['installerName']);
|
||||
|
||||
if ($reprogramming && $changeInstaller === false) {
|
||||
if ($reprogramming && $changeInstaller === false) {
|
||||
//Enviar notificación de reprogramación al cliente
|
||||
$log->appendLog("Enviando notificación de reprogramación al cliente, valor de reprogramming $reprogramming y valor de changeInstaller $changeInstaller " . PHP_EOL);
|
||||
$curl_string = "{\n \"to\": \"$clientWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\", \"$campo3\", \"$campo4\"],\n \"template_uuid\": \"70579353773f4de1836d4f9b6bf6074d\",\n \"optin_contact\": true\n }";
|
||||
}if($changeInstaller){
|
||||
}
|
||||
if ($changeInstaller) {
|
||||
//Enviar notificación de cambio de instalador
|
||||
$log->appendLog("Enviando notificación de cambio de instalador al cliente, valor de reprogramming $reprogramming y valor de changeInstaller $changeInstaller " . PHP_EOL);
|
||||
$curl_string = "{\n \"to\": \"$clientWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\", \"$campo3\", \"$campo4\"],\n \"template_uuid\": \"0d57fd210595422caf2f5999642882a3\",\n \"optin_contact\": true\n }";
|
||||
@ -224,18 +226,18 @@ class ClientCallBellAPI
|
||||
}
|
||||
|
||||
|
||||
if ($reprogramming && $changeInstaller===false) {
|
||||
|
||||
if ($reprogramming && $changeInstaller === false) {
|
||||
|
||||
//Enviar notificación de reprogramación
|
||||
$log->appendLog("Enviando notificación de reprogramación al instalador, valor de reprogramming $reprogramming y valor de changeInstaller $changeInstaller " . PHP_EOL);
|
||||
$curl_string = "{\n \"to\": \"$installerWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\", \"$campo3\", \"$campo4\", \"$campo5\", \"$campo6\", \"$campo7\", \"$campo8\"],\n \"template_uuid\": \"42152c07c67b468ba68e581c0283e22e\",\n \"optin_contact\": true\n }";
|
||||
|
||||
}else if ($changeInstaller){
|
||||
} else if ($changeInstaller) {
|
||||
//Enviar notificación de cambio de instalador
|
||||
$log->appendLog("Enviando notificación de cambio de instalador al instalador, valor de reprogramming $reprogramming y valor de changeInstaller $changeInstaller " . PHP_EOL);
|
||||
$curl_string = "{\n \"to\": \"$installerWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\", \"$campo3\", \"$campo4\", \"$campo5\"],\n \"template_uuid\": \"e1aa2b0fd3884595918f4ac2676acd29\",\n \"optin_contact\": true\n }";
|
||||
|
||||
}else {
|
||||
} else {
|
||||
//Enviar notificación normal de asignación de tarea
|
||||
$log->appendLog("Enviando notificación normal de asignación de tarea al instalador, valor de reprogramming $reprogramming y valor de changeInstaller $changeInstaller " . PHP_EOL);
|
||||
$curl_string = "{\n \"to\": \"$installerWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\", \"$campo3\", \"$campo4\", \"$campo5\", \"$campo6\", \"$campo7\", \"$campo8\"],\n \"template_uuid\": \"b6663394265e4bcdb215369aa9ba0f21\",\n \"optin_contact\": true\n }";
|
||||
@ -302,12 +304,7 @@ class ClientCallBellAPI
|
||||
]
|
||||
);
|
||||
|
||||
//$datos_payment_array = json_decode($payments,true);
|
||||
$datos_payment = json_encode($payments);
|
||||
|
||||
//$log->appendLog("Datos traidos con payment api: " . $datos_payment . PHP_EOL);
|
||||
//$log->appendLog("Esto es lo que trae la fecha mas reciente de los pagos: " . $notificationData->paymentData[0]['createdDate']. PHP_EOL);
|
||||
// $log->appendLog("Esto es lo que trae la fecha mas reciente de los pagos opcion 2: " . $payments[0]['createdDate'] . PHP_EOL);
|
||||
|
||||
$payment_id = $payments[0]['id'];
|
||||
$payment_amount = '$' . $payments[0]['amount'];
|
||||
@ -341,73 +338,43 @@ class ClientCallBellAPI
|
||||
|
||||
|
||||
try {
|
||||
|
||||
// Hacer la solicitud GET
|
||||
// Hacer la solicitud GET para obtener el PDF
|
||||
$response = $clientGuzzleHttp->request('GET', "payments/$payment_id/pdf");
|
||||
|
||||
// Realizar la solicitud a la API y guardar el contenido en un archivo local
|
||||
// Leer el contenido del PDF de la respuesta
|
||||
$contenidoArchivo = $response->getBody()->getContents();
|
||||
|
||||
// Reemplazar nombre del cliente espacios por guiones bajos y concatenar la extensión ".pdf" para construir el nombre del archivo
|
||||
//$fileNameComprobante = 'Comprobante_' . str_replace(' ', '_', $nombre_cliente) . '.pdf';
|
||||
$fileNameComprobante = 'Comprobante_' . str_replace(' ', '_', $nombre_cliente) . '.png';
|
||||
// Construir el nombre del archivo PDF basado en el cliente
|
||||
$fileNameComprobante = 'Comprobante_' . str_replace(' ', '_', $nombre_cliente) . '.pdf';
|
||||
$rutaArchivo = __DIR__ . '/../../comprobantes/' . $fileNameComprobante;
|
||||
|
||||
|
||||
// Guardar el contenido en un archivo local
|
||||
$resultado = file_put_contents(__DIR__ . '/../../comprobantes/' . $fileNameComprobante, $contenidoArchivo);
|
||||
|
||||
if ($resultado !== false) {
|
||||
$log->appendLog("El archivo se ha descargado correctamente y se ha guardado en: " . __DIR__ . '/../../comprobantes/' . $fileNameComprobante . PHP_EOL);
|
||||
// Guardar el contenido del PDF en un archivo local
|
||||
if (file_put_contents($rutaArchivo, $contenidoArchivo) !== false) {
|
||||
$log->appendLog("El archivo PDF se ha descargado y guardado correctamente en: $rutaArchivo" . PHP_EOL);
|
||||
} else {
|
||||
$log->appendLog("Se produjo un error al descargar y guardar el archivo." . PHP_EOL);
|
||||
$log->appendLog("Error al guardar el archivo PDF en la ruta: $rutaArchivo" . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Obtener el cuerpo de la respuesta (contenido binario)
|
||||
$binaryData = $response->getBody()->getContents();
|
||||
|
||||
|
||||
|
||||
// Abrir un recurso de flujo de datos en memoria
|
||||
$fileHandle = fopen('php://temp', 'r+');
|
||||
|
||||
// Escribir los datos binarios en el recurso de flujo de datos en memoria
|
||||
fwrite($fileHandle, $binaryData);
|
||||
|
||||
// Rebobinar el puntero del flujo de datos para leer desde el principio
|
||||
rewind($fileHandle);
|
||||
|
||||
if (!isset($fileHandle)) {
|
||||
$log->appendLog("viene vacia la variable filehandle" . PHP_EOL);
|
||||
if (!file_exists($rutaArchivo)) {
|
||||
$log->appendLog("El archivo PDF no existe: $rutaArchivo" . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filesize($rutaArchivo) === 0) {
|
||||
$log->appendLog("El archivo PDF está vacío: $rutaArchivo" . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
$log->appendLog("El archivo PDF es válido y tiene contenido: $rutaArchivo" . PHP_EOL);
|
||||
$rutaImagen = __DIR__ . '/../../comprobantes/' . str_replace('.pdf', '.png', $fileNameComprobante);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$log->appendLog("Error con un problema al generar y comprobante de pago: " . $e->getMessage() . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
// Obtener el nombre del archivo del encabezado Content-Disposition si está presente
|
||||
$serverFilename = null;
|
||||
$content_disposition = $response->getHeaderLine('Content-Disposition');
|
||||
|
||||
if (!empty($content_disposition)) {
|
||||
preg_match('/filename=([^;]+)/', $content_disposition, $matches);
|
||||
if (isset($matches[1])) {
|
||||
$serverFilename = trim($matches[1], '"');
|
||||
$pdf_payment_path = '/home/unms/data/ucrm/ucrm/data/payment_receipts/' . $serverFilename;
|
||||
}
|
||||
}
|
||||
|
||||
// Si no se encontró un nombre de archivo, usar un nombre predeterminado
|
||||
if (empty((($serverFilename)))) {
|
||||
$pdf_payment_path = '/home/unms/data/ucrm/ucrm/data/payment_receipts/comprobante.pdf';
|
||||
}
|
||||
|
||||
//imprimir el nombre del archivo
|
||||
$log->appendLog("El nombre del archivo PDF es: $pdf_payment_path" . PHP_EOL);
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
$log->appendLog("Error con un problema al generar y comprobante de pago: " . $exception->getMessage() . PHP_EOL);
|
||||
$log->appendLog("Error al manejar el comprobante de pago: " . $e->getMessage() . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -416,71 +383,28 @@ class ClientCallBellAPI
|
||||
|
||||
|
||||
try {
|
||||
|
||||
//******************
|
||||
|
||||
// Ruta del archivo PDF
|
||||
//$pdfFilePath = dirname(dirname(dirname(dirname(__DIR__)))) . '//payment_receipts/' . $serverFilename;
|
||||
// Instanciar Imagick con la ruta del archivo PDF
|
||||
$image = new Imagick();
|
||||
$log->appendLog("se creó la instancia de Imagick" . PHP_EOL);
|
||||
|
||||
|
||||
$image->setResolution(1024, 1024); // Establecer la resolución (opcional)
|
||||
|
||||
// Leer el archivo PDF
|
||||
$image->readImage(__DIR__ . '/../../comprobantes/' . $fileNameComprobante);
|
||||
|
||||
$image->resizeImage(1024, 1024, Imagick::FILTER_LANCZOS, 1, true);
|
||||
// Obtener las dimensiones originales de la imagen
|
||||
$ancho_original = $image->getImageWidth();
|
||||
$altura_original = $image->getImageHeight();
|
||||
$log->appendLog("Ancho original de la imagen:" . $ancho_original . " Altura original de la imagen: " . $altura_original . PHP_EOL);
|
||||
|
||||
// Calcular las coordenadas de inicio del área a recortar
|
||||
// $inicio_x = $ancho_original * 0.14; // 14% del ancho
|
||||
// $inicio_y = $altura_original * 0.05; // 5% de la altura
|
||||
// $log->appendLog("Inicio x:" . $inicio_x . " Inicio y: " . $inicio_y . PHP_EOL);
|
||||
|
||||
// Calcular el ancho y la altura del área a recortar
|
||||
// $nuevo_ancho = $ancho_original * 0.7; // 70% del ancho del comprbante final
|
||||
// $nueva_altura = $altura_original * 0.90; // 55% de la altura del comprobante final
|
||||
// $log->appendLog("Nuevo ancho:".$nuevo_ancho ." Nuevo alto: ".$nueva_altura. PHP_EOL);
|
||||
|
||||
// Recortar la imagen
|
||||
// $image->cropImage($nuevo_ancho, $nueva_altura, $inicio_x, $inicio_y);
|
||||
|
||||
// Convertir la primera página del PDF a imagen
|
||||
$image->setResolution(300, 300);
|
||||
$image->readImage($rutaArchivo); // Aquí podría ocurrir un error
|
||||
$image->setImageFormat('png');
|
||||
$image->writeImage(__DIR__ . '/../../comprobantes/' . $fileNameComprobante);
|
||||
|
||||
// Liberar recursos
|
||||
$rutaImagen = str_replace('.pdf', '.png', $rutaArchivo);
|
||||
$image->writeImage($rutaImagen);
|
||||
$image->destroy();
|
||||
$log->appendLog("Terminó de crear la imagen del comprobante" . PHP_EOL);
|
||||
|
||||
//******************
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
$log->appendLog("Error al crear la imagen: " . $exception . PHP_EOL);
|
||||
|
||||
$log->appendLog("El archivo PNG se ha generado correctamente en: $rutaImagen" . PHP_EOL);
|
||||
} catch (ImagickException $e) {
|
||||
$log->appendLog("Error al convertir el PDF a PNG con Imagick: " . $e->getMessage() . PHP_EOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$url_file = $this->UploadReceiptToWordpressByImageFileName($fileNameComprobante);//Carga del comprobante PDF a Wordpress para su posterior envío
|
||||
//$url_file = $this->UploadReceiptToWordpressByServerFileName($serverFilename, $fileNameComprobante);//Carga del comprobante PDF a Wordpress para su posterior envío
|
||||
//$url_file = $this->UploadReceiptToWordpressByCustomLocalFileName($fileNameComprobante);//Carga del comprobante PDF a Wordpress para su posterior envío
|
||||
$fileNameComprobanteImage = str_replace('.pdf', '.png', $fileNameComprobante);
|
||||
$url_file = $this->UploadReceiptToWordpressByImageFileName($fileNameComprobanteImage);//Carga del comprobante PDF a Wordpress para su posterior envío
|
||||
// $url_file = $this->UploadReceiptToWordpressByImageFileName($fileNameComprobante);//Carga del comprobante PDF a Wordpress para su posterior envío
|
||||
|
||||
$log->appendLog("Se terminó de subir comprobante a wordpress " . PHP_EOL);
|
||||
|
||||
// if (empty($notificationData->clientData['contacts'][0]['email'])) {
|
||||
// $log->appendLog("El cliente no tiene correo" . PHP_EOL);
|
||||
// } else {
|
||||
// // $log->appendLog("El cliente SI tiene correo y es: ".$notificationData->clientData['contacts'][0]['email'] . PHP_EOL);
|
||||
// // Hacer la solicitud PATCH para enviar correo electronico con el comprobante de pago
|
||||
// $response = $clientGuzzleHttp->request('PATCH', "payments/$payment_id/send-receipt");
|
||||
|
||||
// }
|
||||
|
||||
|
||||
//$log->appendLog("Entrando al metodo sendPaymentNotificationWhatsAp" . PHP_EOL);
|
||||
@ -493,23 +417,9 @@ class ClientCallBellAPI
|
||||
'Content-Type: application/json',
|
||||
]);
|
||||
|
||||
// Verificar si la ruta es válida
|
||||
// if ($realPath = realpath('/data/ucrm/data/plugins/siip-whatsapp-notifications/src/Facade/Comprobante.pdf')) {
|
||||
// $log->appendLog("La ruta es válida: $realPath" . PHP_EOL);
|
||||
// $log->appendLog(var_export($realPath,true) . PHP_EOL);
|
||||
|
||||
// } else {
|
||||
// $log->appendLog("La ruta no es válida o no existe" . PHP_EOL);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
$curl_string = "{\n \"to\": \"$clientWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"document\",\n \"content\": {\n \"text\": \"S/M\",\n \"url\": \"$url_file\"\n },\n \"template_values\": [\"$nombre_cliente\", \"$payment_amount\", \"$saldoTexto\"],\n \"template_uuid\": \"57ead79cebd14902921477922403093b\",\n \"optin_contact\": true\n }";
|
||||
|
||||
//$curl_string = "{\n \"to\": \"$clientWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"document\",\n \"content\": {\n \"text\": \"S/M\",\n \"url\": \"$url_file\"\n },\n \"template_values\": [\"$nombre_cliente\", \"$payment_amount\", \"$saldo\"],\n \"template_uuid\": \"6c0df98317b44f7b8666375a6cc8454c\",\n \"optin_contact\": true\n }";
|
||||
|
||||
// $curl_string = "{\n \"to\": \"$clientWhatsAppNumber\",\n \"from\": \"whatsapp\",\n \"type\": \"text\",\n \"content\": {\n \"text\": \"S/M\"\n },\n \"template_values\": [\"$campo1\", \"$campo2\"],\n \"template_uuid\": \"55705f1fe4e24bab80104dc2643fe11c\",\n \"optin_contact\": true\n }";
|
||||
$log->appendLog("La cadena CURL que se envia es: " . $curl_string);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_string);
|
||||
|
||||
@ -1363,6 +1273,7 @@ class ClientCallBellAPI
|
||||
$file_to_upload = __DIR__ . '/../../comprobantes/' . $imageFileName;
|
||||
$url = 'https://siip.mx/wp/wp-content/uploads/img/' . $imageFileName;
|
||||
|
||||
$log->appendLog("file_to_upload: " . $file_to_upload . PHP_EOL);
|
||||
|
||||
|
||||
// Conexión FTP
|
||||
|
||||
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '8e5b14479687f5d1c2603cbbd1ce8b3b3c00a61f',
|
||||
'reference' => '9fc3bcb8d9ddaccbfe7d320660582f1f65c7724d',
|
||||
'name' => 'ucrm-plugins/sms-twilio',
|
||||
'dev' => false,
|
||||
),
|
||||
@ -307,7 +307,7 @@
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '8e5b14479687f5d1c2603cbbd1ce8b3b3c00a61f',
|
||||
'reference' => '9fc3bcb8d9ddaccbfe7d320660582f1f65c7724d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user