diff --git a/data/plugin.log b/data/plugin.log index 156eb682..d1a6622b 100755 --- a/data/plugin.log +++ b/data/plugin.log @@ -2492,3 +2492,1011 @@ EJECUTANDO PATCH - Se detectaron cambios Response Patch CallBell: {"contact":{"uuid":"74cc2bb45eb8409f92cd5dba99200d26","name":"Daniel Humberto Soto Villegas","phoneNumber":"5214181878106","avatarUrl":null,"createdAt":"2024-01-08T17:04:13Z","closedAt":"2026-03-26T08:58:25Z","source":"whatsapp","funnelId":null,"href":"https://dash.callbell.eu/contacts/74cc2bb45eb8409f92cd5dba99200d26","conversationHref":"https://dash.callbell.eu/chat/53c8229c428c4081b197ab136feab73b","tags":["PRUEBAS","s0LOCS","ePA"],"assignedUser":null,"customFields":{"user entry point":"inbound_message","Site":"VENUS","Cliente":"2","Monto Ultimo Pago":"💲 280","Estado":"🟢 Activo ","Nombre":"👤 Daniel Humberto Soto Villegas","user name":"Daniel Humberto","Resumen":"{\"Cliente\": \"2\",\"Nombre\": \"Daniel Humberto Soto Villegas\",\"Saldo Actual\": \"💲910 a favor\",\"Monto Ultimo Pago\": \"$ 280\",\"Estado\": \"Activo\",\"Fecha Ultimo Pago\": \" 10/03/2026 00:31 con Tarjeta de crédito Stripe 💳\",\"Fecha Ultima Actualizacion\": \"30/03/2026 13:14\",\"Clabe Interbancaria\": \"0021804341999569810\",\"Password Antena\": {\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}}","Domicilio":"📍 Chiapas 31, Dolores Hidalgo Cuna de la Independencia Nacional, 37800","URL":"🌐 https://sistema.siip.mx/crm/client/2","Saldo Actual":"💲910 a favor","Clabe Interbancaria":"0021804341999569810","Fecha Ultimo Pago":"📆💸 10/03/2026 00:31 con Tarjeta de crédito Stripe 💳","Antena/Sectorial":"Sectorial de pruebas 172.16.5.134","Fecha Ultima Actualizacion":"📆🔄️ 30/03/2026 13:14","password-antena":"{\"Servicio 1\":\"n#Cx89qC#r64LPR#\",\"Servicio 2\":\"b@2zMYxSQR2BdkG9\"}"},"team":{"uuid":"5faeed738d6a44ccacf6509762eb288d","name":"General","default":true,"members":5,"createdAt":"2023-11-07T00:37:10Z"},"channel":{"uuid":"dbaa248932634e7ea4346a320960c24a","title":null,"discardedAt":null,"type":"whatsapp","main":true},"blockedAt":null}} +[2026-04-06 19:04:24.090729] [notice] Logging level set to:debug +[2026-04-06 19:04:24.090830] [debug] Payload recibido: { + "id": "evt_3TJIRfEFY1WEUtgR0N0nrF12", + "object": "event", + "api_version": "2023-10-16", + "created": 1775502263, + "data": { + "object": { + "id": "pi_3TJIRfEFY1WEUtgR0r3YaJFA", + "object": "payment_intent", + "amount": 11000, + "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_3TJIRfEFY1WEUtgR0r3YaJFA_secret_TgZExYh5xCsFabGzckFa2RinL", + "confirmation_method": "automatic", + "created": 1775502263, + "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": 11000, + "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_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9VSHNDRTdSV05DY3dWYWVRb0NaVHVxTnBHWldyUzBo0100pcy1m3YH", + "reference": "494246", + "type": "mx_bank_transfer" + }, + "type": "display_bank_transfer_instructions" + }, + "on_behalf_of": null, + "payment_method": "pm_1TJIRfEFY1WEUtgROyTz8IKu", + "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_fib2ZhBSyqvLUU", + "idempotency_key": "f0b13326-2793-4b62-8068-233ef395f4a7" + }, + "type": "payment_intent.requires_action" +} + +[2026-04-06 19:04:24.090877] [info] No UUID found in the webhook data +[2026-04-06 19:04:24.348412] [notice] Logging level set to:debug +[2026-04-06 19:04:24.348685] [debug] Payload recibido: { + "id": "evt_3TJIRfEFY1WEUtgR0cFssvP6", + "object": "event", + "api_version": "2023-10-16", + "created": 1775502263, + "data": { + "object": { + "id": "pi_3TJIRfEFY1WEUtgR0r3YaJFA", + "object": "payment_intent", + "amount": 11000, + "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_3TJIRfEFY1WEUtgR0r3YaJFA_secret_TgZExYh5xCsFabGzckFa2RinL", + "confirmation_method": "automatic", + "created": 1775502263, + "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_fib2ZhBSyqvLUU", + "idempotency_key": "f0b13326-2793-4b62-8068-233ef395f4a7" + }, + "type": "payment_intent.created" +} + +[2026-04-06 19:04:24.349915] [info] No UUID found in the webhook data +[2026-04-06 19:31:09.684859] [notice] Logging level set to:debug +[2026-04-06 19:31:09.685275] [debug] Payload recibido: { + "id": "evt_1TJIrZEFY1WEUtgRjTzS3l6Q", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503867, + "data": { + "object": { + "id": "ccsbtxn_1TJIrXEFY1WEUtgRqlgzzPs4", + "object": "customer_cash_balance_transaction", + "created": 1775503867, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "ending_balance": 11000, + "funded": { + "bank_transfer": { + "reference": "494246", + "type": "mx_bank_transfer" + } + }, + "livemode": false, + "net_amount": 11000, + "type": "funded" + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_lyFRzcwWD5sO2e", + "idempotency_key": "427b6a94-05b5-4f7b-bc16-ef613effb7da" + }, + "type": "customer_cash_balance_transaction.created" +} + +[2026-04-06 19:31:09.685328] [info] No UUID found in the webhook data +[2026-04-06 19:31:09.685353] [info] Evento de transferencia de un cliente recibido: {"id":"evt_1TJIrZEFY1WEUtgRjTzS3l6Q","object":"event","api_version":"2023-10-16","created":1775503867,"data":{"object":{"id":"ccsbtxn_1TJIrXEFY1WEUtgRqlgzzPs4","object":"customer_cash_balance_transaction","created":1775503867,"currency":"mxn","customer":"cus_QZ7T1h3th3Dr7w","customer_account":null,"ending_balance":11000,"funded":{"bank_transfer":{"reference":"494246","type":"mx_bank_transfer"}},"livemode":false,"net_amount":11000,"type":"funded"}},"livemode":false,"pending_webhooks":2,"request":{"id":"req_lyFRzcwWD5sO2e","idempotency_key":"427b6a94-05b5-4f7b-bc16-ef613effb7da"},"type":"customer_cash_balance_transaction.created"} + +[2026-04-06 19:31:09.749515] [notice] Logging level set to:debug +[2026-04-06 19:31:09.749685] [debug] Payload recibido: { + "id": "evt_1TJIrZEFY1WEUtgRukPCP9ql", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503868, + "data": { + "object": { + "id": "ccsbtxn_1TJIrYEFY1WEUtgRNpdSWdFn", + "object": "customer_cash_balance_transaction", + "applied_to_payment": { + "payment_intent": "pi_3TJIRfEFY1WEUtgR0r3YaJFA" + }, + "created": 1775503868, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "ending_balance": 0, + "livemode": false, + "net_amount": -11000, + "type": "applied_to_payment" + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_lyFRzcwWD5sO2e", + "idempotency_key": "427b6a94-05b5-4f7b-bc16-ef613effb7da" + }, + "type": "customer_cash_balance_transaction.created" +} + +[2026-04-06 19:31:09.749715] [info] No UUID found in the webhook data +[2026-04-06 19:31:09.749732] [info] Se aplicó el saldo en Stripe de un pago: {"id":"evt_1TJIrZEFY1WEUtgRukPCP9ql","object":"event","api_version":"2023-10-16","created":1775503868,"data":{"object":{"id":"ccsbtxn_1TJIrYEFY1WEUtgRNpdSWdFn","object":"customer_cash_balance_transaction","applied_to_payment":{"payment_intent":"pi_3TJIRfEFY1WEUtgR0r3YaJFA"},"created":1775503868,"currency":"mxn","customer":"cus_QZ7T1h3th3Dr7w","customer_account":null,"ending_balance":0,"livemode":false,"net_amount":-11000,"type":"applied_to_payment"}},"livemode":false,"pending_webhooks":2,"request":{"id":"req_lyFRzcwWD5sO2e","idempotency_key":"427b6a94-05b5-4f7b-bc16-ef613effb7da"},"type":"customer_cash_balance_transaction.created"} + +[2026-04-06 19:31:09.854221] [notice] Logging level set to:debug +[2026-04-06 19:31:09.856542] [debug] Payload recibido: { + "id": "evt_3TJIRfEFY1WEUtgR0M5hO2Ks", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503869, + "data": { + "object": { + "id": "pi_3TJIRfEFY1WEUtgR0r3YaJFA", + "object": "payment_intent", + "amount": 11000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 11000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic_async", + "client_secret": "pi_3TJIRfEFY1WEUtgR0r3YaJFA_secret_TgZExYh5xCsFabGzckFa2RinL", + "confirmation_method": "automatic", + "created": 1775502263, + "currency": "mxn", + "customer": "cus_QZ7T1h3th3Dr7w", + "customer_account": null, + "description": null, + "excluded_payment_method_types": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "py_3TJIRfEFY1WEUtgR0BYFzNF4", + "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": "pm_1TJIRfEFY1WEUtgROyTz8IKu", + "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": "succeeded", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_lyFRzcwWD5sO2e", + "idempotency_key": "427b6a94-05b5-4f7b-bc16-ef613effb7da" + }, + "type": "payment_intent.succeeded" +} + +[2026-04-06 19:31:09.856657] [info] No UUID found in the webhook data +[2026-04-06 19:31:09.856712] [info] Evento de pago exitoso (Stripe PI) recibido. +[2026-04-06 19:31:09.969805] [notice] Logging level set to:debug +[2026-04-06 19:31:09.970736] [debug] Payload recibido: { + "id": "evt_3TJIRfEFY1WEUtgR0Y39Yl2y", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503869, + "data": { + "object": { + "id": "py_3TJIRfEFY1WEUtgR0BYFzNF4", + "object": "charge", + "amount": 11000, + "amount_captured": 11000, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": null, + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null, + "tax_id": null + }, + "calculated_statement_descriptor": null, + "captured": true, + "created": 1775503868, + "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", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "Transferencia Bancaria" + }, + "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_3TJIRfEFY1WEUtgR0r3YaJFA", + "payment_method": "pm_1TJIRfEFY1WEUtgROyTz8IKu", + "payment_method_details": { + "customer_balance": {}, + "type": "customer_balance" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2tHMFJFRlkxV0VVdGdSKP2T0M4GMgarLckn60Y6LBYz33pEWvcqPnvtDRdrcIuNAknFNWJBbwwS91WTxEFFNB_HVLV2KbgIIvWU", + "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": "req_lyFRzcwWD5sO2e", + "idempotency_key": "427b6a94-05b5-4f7b-bc16-ef613effb7da" + }, + "type": "charge.succeeded" +} + +[2026-04-06 19:31:09.970803] [info] No UUID found in the webhook data +[2026-04-06 19:31:10.917671] [notice] Logging level set to:debug +[2026-04-06 19:31:10.917743] [debug] Payload recibido: {"uuid":"04d57e24-01da-4dbd-9b39-cb906e8a4293","changeType":"insert","entity":"payment","entityId":"1007","eventName":"payment.add","extraData":{"entity":{"id":1007,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[]},"entityBeforeEdit":null}} + +[2026-04-06 19:31:11.194194] [debug] Evento recibido: payment.add +[2026-04-06 19:31:11.194348] [debug] Notification encodificado en JSON:{"uuid":"04d57e24-01da-4dbd-9b39-cb906e8a4293","changeType":"insert","entity":"payment","entityId":1007,"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":1820,"accountCredit":1820,"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":1007,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[]}} + +[2026-04-06 19:31:11.194381] [info] Verificando existencia de atributo 'tipoPagoStripe' para Payment ID: 1007 +[2026-04-06 19:31:11.195171] [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/1007 +[2026-04-06 19:31:11.285526] [info] Payment 1007 has no User ID. Assigning Stripe User ID: 1180 +[2026-04-06 19:31:11.286392] [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/1007/user +[2026-04-06 19:31:11.374735] [info] Payment 1007 has wrong Method ID (1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae). Patching to 93814765-66a1-4c7d-a777-05c18fd6aab3 via Microservice. +[2026-04-06 19:31:11.376111] [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/1007/method +[2026-04-06 19:31:11.534181] [debug] Fallback Method Guessing 'Tarjeta de crédito Stripe' -> 'Tarjeta de Crédito' +[2026-04-06 19:31:11.534224] [info] PATCHING Payment 1007: Setting tipoPagoStripe = 'Tarjeta de Crédito' +[2026-04-06 19:31:11.608767] [info] PaymentIntent creado: pi_3TJIraEFY1WEUtgR0VzRCJO8 +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 + +[2026-04-06 19:31:11.973318] [notice] Logging level set to:debug +[2026-04-06 19:31:11.973377] [debug] Payload recibido: { + "id": "evt_3TJIraEFY1WEUtgR0GlZz9Wv", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503871, + "data": { + "object": { + "id": "pi_3TJIraEFY1WEUtgR0VzRCJO8", + "object": "payment_intent", + "amount": 11000, + "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_3TJIraEFY1WEUtgR0VzRCJO8_secret_gSWtsXgAB6TKnO8nkjH1R4KOL", + "confirmation_method": "automatic", + "created": 1775503870, + "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", + "tipoPago": "Transferencia Bancaria" + }, + "next_action": { + "display_bank_transfer_instructions": { + "amount_remaining": 11000, + "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_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9VSHNjWDhMb2o2ME9CdjFUaTgybnpMUGs5c3VMckdu0100SLK9hmEz", + "reference": "224095", + "type": "mx_bank_transfer" + }, + "type": "display_bank_transfer_instructions" + }, + "on_behalf_of": null, + "payment_method": "pm_1TJIraEFY1WEUtgRcZnWYyay", + "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_Q9l2oG873c1lFQ", + "idempotency_key": "evt_1TJIrZEFY1WEUtgRjTzS3l6Q" + }, + "type": "payment_intent.requires_action" +} + +[2026-04-06 19:31:11.973434] [info] No UUID found in the webhook data +[2026-04-06 19:31:12.043346] [notice] Logging level set to:debug +[2026-04-06 19:31:12.043417] [debug] Payload recibido: { + "id": "evt_3TJIraEFY1WEUtgR0GOJCKEf", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503871, + "data": { + "object": { + "id": "pi_3TJIraEFY1WEUtgR0VzRCJO8", + "object": "payment_intent", + "amount": 11000, + "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_3TJIraEFY1WEUtgR0VzRCJO8_secret_gSWtsXgAB6TKnO8nkjH1R4KOL", + "confirmation_method": "automatic", + "created": 1775503870, + "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", + "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_Q9l2oG873c1lFQ", + "idempotency_key": "evt_1TJIrZEFY1WEUtgRjTzS3l6Q" + }, + "type": "payment_intent.created" +} + +[2026-04-06 19:31:12.043452] [info] No UUID found in the webhook data +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:31:12.246006] [info] Archivo subido exitosamente a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775503872.jpg +Imagen subida a MinIO: https://aws-venus.siip.mx/vouchers-oxxo/Comprobante_Delfino_De_los_Mares_venus_1775503872.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_1775503872.jpg" + }, + "template_values": ["Delfino De los Mares venus", "$110", "$1820 a favor"], + "template_uuid": "57ead79cebd14902921477922403093b", + "optin_contact": true + } +Response del CallBell: {"message":{"uuid":"40beaad4f9aa4d4ca530ffcc9e6164d0","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":"04d57e24-01da-4dbd-9b39-cb906e8a4293","changeType":"insert","entity":"payment","entityId":1007,"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":1820,"accountCredit":1820,"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":1007,"clientId":146,"methodId":"93814765-66a1-4c7d-a777-05c18fd6aab3","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[]}} + +Dentro del proceso del patch: + +Datos traidos con payment api: [{"id":1007,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[{"id":"da90fa3a-153a-4f69-9752-b6b135fef80d","paymentId":1007,"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:31","Saldo Actual":"\ud83d\udcb21820 a favor","Monto Ultimo Pago":"\ud83d\udcb2 110","Clabe Interbancaria":"002180695453333629","Fecha Ultimo Pago":"\ud83d\udcc6\ud83d\udcb8 06\/04\/2026 13:31 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\udcb21820 a favor\",\"Monto Ultimo Pago\": \"$ 110\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06\/04\/2026 13:31 con Tarjeta de cr\u00e9dito Stripe \ud83d\udcb3\",\"Fecha Ultima Actualizacion\": \"06\/04\/2026 13:31\",\"Clabe Interbancaria\": \"002180695453333629\",\"Password Antena\": {\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}}","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}"}} + +DEBUG COMPARACIÓN - CallBell Saldo Actual: '💲1710 a favor' + +DEBUG COMPARACIÓN - UCRM Saldo Actual: '💲1820 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":"💲 110","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:31 con Tarjeta de crédito Stripe 💳","Antena/Sectorial":"Sectorial-4b 172.16.13.16/24","Fecha Ultima Actualizacion":"📆🔄️ 06/04/2026 13:31","password-antena":"{\"Servicio 1\":\"ETfEB8at@GAqUt#2\"}","user name":"Daniel Humberto","Site":"0LOCS","Saldo Actual":"💲1820 a favor","Resumen":"{\"Cliente\": \"146\",\"Nombre\": \"Delfino De los Mares venus\",\"Saldo Actual\": \"💲1820 a favor\",\"Monto Ultimo Pago\": \"$ 110\",\"Estado\": \"Suspendido\",\"Fecha Ultimo Pago\": \" 06/04/2026 13:31 con Tarjeta de crédito Stripe 💳\",\"Fecha Ultima Actualizacion\": \"06/04/2026 13:31\",\"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:31:15.390527] [notice] Logging level set to:debug +[2026-04-06 19:31:15.390595] [debug] Payload recibido: {"uuid":"d0300ac9-dc58-4c41-8edd-a77cab30e58a","changeType":"edit","entity":"payment","entityId":"1007","eventName":"payment.edit","extraData":{"entity":{"id":1007,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[]},"entityBeforeEdit":{"id":1007,"clientId":146,"methodId":"1dd098fa-5d63-4c8d-88b7-3c27ffbbb6ae","checkNumber":null,"createdDate":"2026-04-06T13:31:10-0600","amount":110,"currencyCode":"MXN","note":null,"receiptSentDate":null,"providerName":null,"providerPaymentId":null,"providerPaymentTime":null,"paymentCovers":[],"creditAmount":110,"userId":null,"attributes":[]}}} + +[2026-04-06 19:31:15.583302] [debug] Evento recibido: payment.edit +[2026-04-06 19:31:17.115605] [notice] Logging level set to:debug +[2026-04-06 19:31:17.115808] [debug] Payload recibido: { + "id": "evt_3TJIRfEFY1WEUtgR0OPMrtYn", + "object": "event", + "api_version": "2023-10-16", + "created": 1775503872, + "data": { + "object": { + "id": "py_3TJIRfEFY1WEUtgR0BYFzNF4", + "object": "charge", + "amount": 11000, + "amount_captured": 11000, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3TJIRfEFY1WEUtgR0uLCIrhw", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null, + "tax_id": null + }, + "calculated_statement_descriptor": null, + "captured": true, + "created": 1775503868, + "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", + "clientId": "146", + "paymentType": "card.one_time", + "tipoPago": "Transferencia Bancaria" + }, + "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_3TJIRfEFY1WEUtgR0r3YaJFA", + "payment_method": "pm_1TJIRfEFY1WEUtgROyTz8IKu", + "payment_method_details": { + "customer_balance": {}, + "type": "customer_balance" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2tHMFJFRlkxV0VVdGdSKICU0M4GMgbAoqYYW6g6LBY8mosX8ICEhvX0H6kCgryOjF9Sou-Yd_UUMUNDfUmNtGUHmVJRWXATjbY4", + "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 + }, + "previous_attributes": { + "balance_transaction": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2tHMFJFRlkxV0VVdGdSKICU0M4GMgYQ7SiYWLg6LBbGXKHmq686t0UpaQwiazkOijBQd8FND5s2o6CTAxfXuyc9o391Rs0e1z-r" + } + }, + "livemode": false, + "pending_webhooks": 1, + "request": { + "id": null, + "idempotency_key": null + }, + "type": "charge.updated" +} + +[2026-04-06 19:31:17.115962] [info] No UUID found in the webhook data +[2026-04-06 19:56:19.560771] [notice] Logging level set to:debug +[2026-04-06 19:56:19.560919] [debug] Payload recibido: { + "id": "evt_3TJJFuEFY1WEUtgR1jSyeAU2", + "object": "event", + "api_version": "2023-10-16", + "created": 1775505378, + "data": { + "object": { + "id": "pi_3TJJFuEFY1WEUtgR1ShTSGOv", + "object": "payment_intent", + "amount": 20000, + "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_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": 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_JR1UC0JthJKTD0", + "idempotency_key": "da434343-5f1f-4727-a566-3122059c1d87" + }, + "type": "payment_intent.created" +} + +[2026-04-06 19:56:19.561014] [info] No UUID found in the webhook data +[2026-04-06 19:56:20.098645] [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 19:56:20.409935] [notice] Logging level set to:debug +[2026-04-06 19:56:20.410104] [debug] Payload recibido: { + "id": "evt_3TJJFuEFY1WEUtgR1GM7gqwF", + "object": "event", + "api_version": "2023-10-16", + "created": 1775505379, + "data": { + "object": { + "id": "pi_3TJJFuEFY1WEUtgR1ShTSGOv", + "object": "payment_intent", + "amount": 20000, + "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_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": 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_YWNjdF8xT2tHMFJFRlkxV0VVdGdSLF9VSHQxTE15d1BSd0F3WEtOdG9FZjZJUXRaTnFuUG940100AIzIY4Ic", + "number": "12345678901234657890123456789012" + }, + "type": "oxxo_display_details" + }, + "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": "requires_action", + "transfer_data": null, + "transfer_group": null + } + }, + "livemode": false, + "pending_webhooks": 2, + "request": { + "id": "req_qr6Xbuq3v7xJZt", + "idempotency_key": "f6aac600-578e-4036-be58-8eab2ffc8c77" + }, + "type": "payment_intent.requires_action" +} + +[2026-04-06 19:56:20.410233] [info] No UUID found in the webhook data diff --git a/public.php b/public.php index 6e231050..cb4d77c0 100755 --- a/public.php +++ b/public.php @@ -425,6 +425,26 @@ if (isset($_GET['action'])) { // POST Actions for Intents if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { header('Content-Type: application/json'); + if ($_POST['action'] === 'create_intent') { + try { + $clientId = $_POST['clientId'] ?? null; + $amount = (float)($_POST['amount'] ?? 0); + $stripeCustomerId = $_POST['stripeCustomerId'] ?? null; + $adminId = $_POST['adminId'] ?? null; + + if (!$clientId || !$amount || !$stripeCustomerId) { + throw new \Exception("Datos incompletos para crear intención de pago."); + } + + if (ob_get_length()) ob_clean(); + $result = $paymentIntentService->createPaymentIntent($clientId, $amount, $stripeCustomerId, $adminId); + echo json_encode($result); + } catch (\Exception $e) { + echo json_encode(['success' => false, 'error' => $e->getMessage()]); + } + exit; + } + if ($_POST['action'] === 'create_oxxo_intent') { try { $builder = new \DI\ContainerBuilder(); diff --git a/views/stripe.php b/views/stripe.php index f65ee7b3..22f8cdc2 100755 --- a/views/stripe.php +++ b/views/stripe.php @@ -178,11 +178,38 @@ function showStripeResult(data) { const c = document.getElementById('stripeResultContent'); - c.innerHTML = `

¡Referencia Creada!

Monto: $${data.amount}

`; + let html = `
+

¡Referencia Creada!

+

Monto: $${data.amount} MXN

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

Banco: ${i.bank_name}

CLABE: ${i.clabe}

`; + const instr = data.next_action.display_bank_transfer_instructions; + const spei = instr.financial_addresses[0]?.spei; + + if (spei) { + html += ` +
+
+ Institución Bancaria + ${spei.bank_name} +
+
+ CLABE Interbancaria + ${spei.clabe} +
+
+

+ Realiza tu transferencia vía SPEI con estos datos. El pago se registrará automáticamente al recibirse. +

`; + } + } else { + html += `
+ No se encontró información de transferencia. Por favor, revisa el historial. +
`; } + + c.innerHTML = html; document.getElementById('stripeResultModal').style.display = 'flex'; }