Download the PHP package remp/crm-mobiletech-module without Composer

On this page you can find all versions of the php package remp/crm-mobiletech-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package crm-mobiletech-module

Mobiletech Module

Translation status @ Weblate


WARNING: This is experimental WIP module. We do not recommend using this module in production.


Installation

We recommend using Composer for installation and update management. To add CRM Mobiletech extension to your REMP CRM application use following command:

Enable installed extension in your app/config/config.neon file:

When your installation is ready and configured with Mobiletech (they know your webhook API endpoint), start accepting the messages.

We recommend creating separate asynchronous Hermes handler listening to mobiletech-inbound events and process inbound messages asynchronously.

In the processing class, you should trigger events or do actions based on the inbound message content. When you want to respond to the inbound message, you can trigger MobiletechNotificationEvent that'll handle the sending:

Outbound message expect a mobiletech_template to be provided. Content is processed as a twig template and can be injected with variables provided as parameters within MobiletechNotificationEvent.

Please check MobiletechNotificationEnvelope to understand the provided parameters and context.

MobiletechAuthenticator

Authenticator is automatically registered alongside of other authenticators when extension is enabled.

MobiletechAuthenticator expects phone number in field mobile_phone or username field already used by UsernameAuthenticator. Reason for this is compatibility with already existing login forms. In case user uses phone number instead of email, he will be logged (if we find match). Password is still required for this type of login.

Webhook for accepting messages

Mobiletech requires the application to expose webhook to accept messages and respond in a specific way if they're accepted.

Webhook is available at /api/v1/mobiletech/webhook.

When message is received, webhook stores the message to mobiletech_inbound_messages and emits mobiletech-inbound Hermes event with reference to the stored message in case you want to do some extra processing.

Development, live testing and release

By default, the module uses Crm\MobiletechModule\Model\MockApiClient to fake the communication with SMS gateway. Client stores the information about sent messages even none of the messages are actually sent. It also updates the status of message to be "delivered".

To start using production implementation of the client (you need this to be able to send messages), please alter your config.neon file:

Testing responses to received messages

To test whether the webhook integration works, you should respond to the received message.

We've prepared asynchronous Hermes listener waiting for the incoming message. It responds with the predefined message template and billing key. To enable this, register the handler and configure it:

Once configured, make sure you have a record with your phone number in mobiletech_phone_numbers DB table and send testing SMS to the short number provided by Mobiletech. Webhook will accept it, trigger the testing handler and respond to it with the template you configured.

Migration

If you already used Mobiletech in your previous implementation, please check these steps to see what's required to migrate to CRM.

Importing users

First you need to make sure all the users exist (in some form) in the system.

Linking users with Mobiletech phone numbers

Mobiletech module links the actual phone_number with user_id within mobiletech_phone_numbers table.

You can use Crm\MobiletechModule\Repository\MobiletechPhoneNumbersRepository::add() to create link between phone number and a user.

That means, that at this point users cannot have more than one phone number assigned to their account.

Importing inbound/outbound messages

Mobiletech module keeps logs of all inbound and outbound messages. These messages are used to create/charge recurring payments, so make sure they're imported correctly.

To import the data, you should mainly follow database schema of mobiletech_inbound_messages and mobiletech_outbound_messages, whichs mostly mirror Mobiletech's API. Important notes:

Outbound-specific

Importing payments

Following section expects the most advanced scenario to be used - recurrent sms payments with multiple types of subscriptions.

When payments are linked to the outbound messages, create record in the recurrent_payments table:

Some columns are omitted as they're straigt forward or up to you to fill (e.g. subscription_type_id).

Integrity checks for recurrent payments:


All versions of crm-mobiletech-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remp/crm-mobiletech-module contains the following files

Loading the files please wait ....