Procesador de pagos, sincronizador de contactos CRM con CallBell y notificaciones por WhatsApp
Go to file
2025-03-25 07:46:08 -06:00
.vscode Versión 2.6.1 ajuste de la hora, negritas en el folio y el envio correcto de desasignacion de servicio 2025-01-25 16:36:47 +00:00
comprobantes Version 2.7.0 con la opción de generar clabes interbancarias por medio de una etiqueta con nombre 'CREARCLABESTRIPE' y además permite crear las clabes de manera automática cuando el cliente pasa de potencial a cliente regular 2025-03-24 22:47:43 -06:00
data Version 2.7.1 con la opción de generar clabes interbancarias por medio de una etiqueta con nombre 'CREARCLABESTRIPE' y además permite crear las clabes de manera automática cuando el cliente pasa de potencial a cliente regular, se corrige un error que permitía generar de manera indefinida clabes para un cliente, además también se agregó la eliminación de la etiqueta 'CREARCLABESTRIPE' de manera automática cuando termina de generar una clabe interbancaria y cliente de Sripe y también valida si ya tiene uno creado con anterioridad para descartar solicitudes hechas a clientes que ya posean dichos datos 2025-03-25 07:46:08 -06:00
src Version 2.7.1 con la opción de generar clabes interbancarias por medio de una etiqueta con nombre 'CREARCLABESTRIPE' y además permite crear las clabes de manera automática cuando el cliente pasa de potencial a cliente regular, se corrige un error que permitía generar de manera indefinida clabes para un cliente, además también se agregó la eliminación de la etiqueta 'CREARCLABESTRIPE' de manera automática cuando termina de generar una clabe interbancaria y cliente de Sripe y también valida si ya tiene uno creado con anterioridad para descartar solicitudes hechas a clientes que ya posean dichos datos 2025-03-25 07:46:08 -06:00
vendor Version 2.7.1 con la opción de generar clabes interbancarias por medio de una etiqueta con nombre 'CREARCLABESTRIPE' y además permite crear las clabes de manera automática cuando el cliente pasa de potencial a cliente regular, se corrige un error que permitía generar de manera indefinida clabes para un cliente, además también se agregó la eliminación de la etiqueta 'CREARCLABESTRIPE' de manera automática cuando termina de generar una clabe interbancaria y cliente de Sripe y también valida si ya tiene uno creado con anterioridad para descartar solicitudes hechas a clientes que ya posean dichos datos 2025-03-25 07:46:08 -06:00
.gitignore HotFix para manejo de excepciones de timeout para referencias de oxxo y otros errores 2025-03-04 09:32:03 +00:00
composer-setup.php Initial commit 2024-12-31 09:48:29 +00:00
composer.json Initial commit 2024-12-31 09:48:29 +00:00
composer.lock Rework para clientes pontenciales nuevos, eliminacion del tiempo de espera para intentos de creacion de referencias de oxxo 2025-01-14 09:10:39 +00:00
composer.phar Initial commit 2024-12-31 09:48:29 +00:00
credentials.json Initial commit 2024-12-31 09:48:29 +00:00
hook_install.php Initial commit 2024-12-31 09:48:29 +00:00
html_public.php Initial commit 2024-12-31 09:48:29 +00:00
main.php Rework para clientes pontenciales nuevos, eliminacion del tiempo de espera para intentos de creacion de referencias de oxxo 2025-01-14 09:10:39 +00:00
manifest.json Version 2.7.1 con la opción de generar clabes interbancarias por medio de una etiqueta con nombre 'CREARCLABESTRIPE' y además permite crear las clabes de manera automática cuando el cliente pasa de potencial a cliente regular, se corrige un error que permitía generar de manera indefinida clabes para un cliente, además también se agregó la eliminación de la etiqueta 'CREARCLABESTRIPE' de manera automática cuando termina de generar una clabe interbancaria y cliente de Sripe y también valida si ya tiene uno creado con anterioridad para descartar solicitudes hechas a clientes que ya posean dichos datos 2025-03-25 07:46:08 -06:00
PHP_PermisosArchivos.php Initial commit 2024-12-31 09:48:29 +00:00
public.php Initial commit 2024-12-31 09:48:29 +00:00
README.md HotFix para manejo de excepciones de timeout para referencias de oxxo y otros errores 2025-03-04 09:32:03 +00:00
StripeWebhook.php Initial commit 2024-12-31 09:48:29 +00:00
ucrm.json Initial commit 2024-12-31 09:48:29 +00:00

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

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

Configuration

  • Install the plugin into UCRM and enable it. I.e. download the plugin zip file and upload it to UCRM in System > Plugins.
  • Keep execution period at "don't execute automatically" - the plugin will react to webhook events.
  • Set up with data which you obtain from Twilio Console:
    • Account SID
    • Auth Token
    • SMS number to send from

Note: there are two sets of credentials available, the default ("LIVE credentials") for actual use and test credentials for development.

  • Customize the texts you wish to send to a client when an event happens
    • Each event has its own row
    • Empty row means "do not send SMS for this"
    • It is possible to replace predefined variables: %%some.variable%%, see full list below
    • If a variable is not set for a client, it is replaced with an empty string
  • Save the configuration
  • Enable the plugin
  • Add webhook (button next to Public URL)
  • Select events about which to notify clients and save the webhook endpoint

Usage

  • In UCRM admin, go to System / Webhooks / Endpoints
  • Click Test Endpoint
  • Go to System / Plugins / 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
  • In the log output, you'll see Webhook test successful.

Variables replaced

These are loaded from UCRM API, and reflect the structure returned. Client variables are replaced always; payment invoice and service only with the applicable events.

Client variables

  • %%client.id%% => 20
  • %%client.userIdent%% => '18'
  • %%client.previousIsp%% => ''
  • %%client.isLead%% => false
  • %%client.clientType%% => 1
  • %%client.companyName%% => ''
  • %%client.companyRegistrationNumber%% => ''
  • %%client.companyTaxId%% => ''
  • %%client.companyWebsite%% => ''
  • %%client.street1%% => '2544 Hillview Drive'
  • %%client.street2%% => ''
  • %%client.city%% => 'San Jose'
  • %%client.countryId%% => 249
  • %%client.stateId%% => 5
  • %%client.zipCode%% => '95113'
  • %%client.invoiceStreet1%% => ''
  • %%client.invoiceStreet2%% => ''
  • %%client.invoiceCity%% => ''
  • %%client.invoiceStateId%% => ''
  • %%client.invoiceCountryId%% => ''
  • %%client.invoiceZipCode%% => ''
  • %%client.invoiceAddressSameAsContact%% => true
  • %%client.note%% => ''
  • %%client.sendInvoiceByPost%% => false
  • %%client.invoiceMaturityDays%% => 14
  • %%client.stopServiceDue%% => true
  • %%client.stopServiceDueDays%% => 7
  • %%client.organizationId%% => 1
  • %%client.tax1Id%% => 1
  • %%client.tax2Id%% => ''
  • %%client.tax3Id%% => ''
  • %%client.registrationDate%% => '2016-04-26 00:00'
  • %%client.companyContactFirstName%% => ''
  • %%client.companyContactLastName%% => ''
  • %%client.isActive%% => false
  • %%client.firstName%% => 'Tyson'
  • %%client.lastName%% => 'Doe'
  • %%client.username%% => 'tyson.doe@example.com'
  • %%client.accountBalance%% => 0
  • %%client.accountCredit%% => 0
  • %%client.accountOutstanding%% => 0
  • %%client.currencyCode%% => 'USD'
  • %%client.organizationName%% => 'UBNT ISP'
  • %%client.invitationEmailSentDate%% => ''
  • %%client.avatarColor%% => '#e53935'
  • %%client.addressGpsLat%% => 37.401482000001
  • %%client.addressGpsLon%% => -121.966545
  • %%client.message%% => 'This is an example message sent from the Messaging feature.'

Invoice variables

  • %%invoice.id%% => 4
  • %%invoice.clientId%% => 20
  • %%invoice.number%% => '2016050002'
  • %%invoice.createdDate%% => '2016-05-03 00:00'
  • %%invoice.dueDate%% => '2016-05-17 00:00'
  • %%invoice.emailSentDate%% => '2018-08-24 00:00'
  • %%invoice.maturityDays%% => 14
  • %%invoice.notes%% => ''
  • %%invoice.adminNotes%% => ''
  • %%invoice.subtotal%% => 7.88
  • %%invoice.discount%% => ''
  • %%invoice.discountLabel%% => ''
  • %%invoice.total%% => 7.88
  • %%invoice.amountPaid%% => 7.88
  • %%invoice.currencyCode%% => 'USD'
  • %%invoice.status%% => 3
  • %%invoice.invoiceTemplateId%% => 1
  • %%invoice.organizationName%% => 'UBNT ISP'
  • %%invoice.organizationRegistrationNumber%% => ''
  • %%invoice.organizationTaxId%% => ''
  • %%invoice.organizationStreet1%% => '2580 Orchard Parkway'
  • %%invoice.organizationStreet2%% => ''
  • %%invoice.organizationCity%% => 'New York'
  • %%invoice.organizationStateId%% => 1
  • %%invoice.organizationCountryId%% => 249
  • %%invoice.organizationZipCode%% => '10017'
  • %%invoice.organizationBankAccountName%% => ''
  • %%invoice.organizationBankAccountField1%% => ''
  • %%invoice.organizationBankAccountField2%% => ''
  • %%invoice.clientFirstName%% => 'Tyson'
  • %%invoice.clientLastName%% => 'Doe'
  • %%invoice.clientCompanyName%% => ''
  • %%invoice.clientCompanyRegistrationNumber%% => ''
  • %%invoice.clientCompanyTaxId%% => ''
  • %%invoice.clientStreet1%% => '685 Third Avenue'
  • %%invoice.clientStreet2%% => ''
  • %%invoice.clientCity%% => 'New York'
  • %%invoice.clientCountryId%% => 249
  • %%invoice.clientStateId%% => 5
  • %%invoice.clientZipCode%% => '10017'
  • %%invoice.uncollectible%% => false

Payment variables

  • %%payment.id%% => 28
  • %%payment.clientId%% => 20
  • %%payment.invoiceId%% => ''
  • %%payment.method%% => 2
  • %%payment.checkNumber%% => ''
  • %%payment.createdDate%% => '2018-08-24 11:36'
  • %%payment.amount%% => 1
  • %%payment.currencyCode%% => 'USD'
  • %%payment.note%% => ''
  • %%payment.receiptSentDate%% => ''
  • %%payment.providerName%% => ''
  • %%payment.providerPaymentId%% => ''
  • %%payment.providerPaymentTime%% => ''
  • %%payment.creditAmount%% => 0
  • %%payment.applyToInvoicesAutomatically%% => false

Service variables

  • %%service.id%% => 23
  • %%service.clientId%% => 20
  • %%service.status%% => 1
  • %%service.name%% => 'Mini'
  • %%service.street1%% => '622 Hide A Way Road'
  • %%service.street2%% => ''
  • %%service.city%% => 'San Jose'
  • %%service.countryId%% => 249
  • %%service.stateId%% => 5
  • %%service.zipCode%% => '95135'
  • %%service.note%% => ''
  • %%service.addressGpsLat%% => 37.232849
  • %%service.addressGpsLon%% => -121.752502
  • %%service.servicePlanId%% => 1
  • %%service.servicePlanPeriodId%% => 2
  • %%service.price%% => 25
  • %%service.hasIndividualPrice%% => false
  • %%service.totalPrice%% => 25
  • %%service.currencyCode%% => 'USD'
  • %%service.invoiceLabel%% => ''
  • %%service.contractId%% => ''
  • %%service.contractLengthType%% => 1
  • %%service.minimumContractLengthMonths%% => ''
  • %%service.activeFrom%% => '2016-05-03T00:00:00+0000'
  • %%service.activeTo%% => ''
  • %%service.contractEndDate%% => ''
  • %%service.discountType%% => 0
  • %%service.discountValue%% => ''
  • %%service.discountInvoiceLabel%% => ''
  • %%service.discountFrom%% => ''
  • %%service.discountTo%% => ''
  • %%service.tax1Id%% => ''
  • %%service.tax2Id%% => ''
  • %%service.tax3Id%% => ''
  • %%service.invoicingStart%% => '2016-05-03T00:00:00+0000'
  • %%service.invoicingPeriodType%% => 1
  • %%service.invoicingPeriodStartDay%% => 1
  • %%service.nextInvoicingDayAdjustment%% => 0
  • %%service.invoicingProratedSeparately%% => true
  • %%service.invoicingSeparately%% => false
  • %%service.sendEmailsAutomatically%% => false
  • %%service.useCreditAutomatically%% => true
  • %%service.servicePlanName%% => 'Mini'
  • %%service.servicePlanPrice%% => 25
  • %%service.servicePlanPeriod%% => 3
  • %%service.downloadSpeed%% => 10
  • %%service.uploadSpeed%% => 10
  • %%service.hasOutage%% => true
  • %%service.stopReason%% => 'Payments overdue'

Developers

  • This plugin is MIT-licensed and can be used by developers as a template for integrating with a different messaging solution:
    • Create a new plugin based on this one
    • Replace the TwilioNotifierFacade and any references to it with a different class which extends AbstractMessageNotifierFacade
    • Update libraries in composer.json as needed
    • Communicate with the remote system in the sendMessage() function

Read more about creating your own plugin in the Developer documentation.