Download the PHP package msp/notify without Composer

On this page you can find all versions of the php package msp/notify. 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 notify

WARNING: This module has been superseeded by MSP_Notifier, it will not be maintained anymore. Unless you are using Magento <= 2.1 consider switch to the new and improved version.

MSP Notify

MSP Notify is a Magento 2 extension that allows to be notified when something happens in your store. (e.g. "if an admin fails to login send me a message on Slack") You can attach to any Magento 2 or custom event and get a notification to a specified channel (e.g. Slack, Telegram, Email..)

It is easily customizable and you can create your custom adapter to add even mode notification channels.

Installation

Suggested installation method is by using composer composer require msp/notify. This module needs that the Magento cron is up and running.

Basic Usage

Configure a notification channel

First of all you need to tell Magento how you want to be notified.

  1. In the admin panel go to system => configure channels
  2. Add a new channel
  3. Configure your channel (see adapter specific instructions below) and save.

Link channel to events

Then you need to subscribe to events

  1. In admin panel go to system => configure events
  2. Add a new event
  3. Specify (one per line) to which events you want to subscribe and save
  4. Select the channel you want to be notified at

When the event is triggered you receive a message on the channel you selected.

The default message contains just the event's name, if you want to have more meaningful messages read the next section.

Advanced Usage

Customize message text

You can customize the message that is sent by creating a new module containing a new notification_templates.xml.

Example content for that file:

Your template must be placed under msp_notify (e.g.: app/code/Vendor/Module/msp_notify/myevent.phtml) and should be something like:

Optionally in the xml file you can specify a custom Block instead of the default one.

Adding a custom channel adapter

This module contains three build in adapters:

if you want to add another adapter you just need to do three things:

  1. Create the adapter class that implements MSP\Notify\Api\AdapterInterface
  2. Register the new adapter in \MSP\Notify\Base\AdapterList using di.xml
  3. Extend the channel form by adding your adapter specific configuration

Adapter specific instructions

Slack

To use slack you need an incoming webhook that can obtained following those instructions

All the other fields are optional.

Telegram

  1. To use telegram you need to get a bot token from the BotFather.
    • Open your telegram app
    • Search for BotFather user
    • Start a new chat
    • Type: /newbot
    • Follow the instructions.
    • At the end you will get an HTTP API token. Copy and paste this token to your token field.
  2. Then you need to know the chat id:
    • Open your telegram app
    • Search for get_id_bot user
    • Start a new chat
    • Type: /my_id
    • Copy the resulting value in your Chat Id field

The same procedure can be applied for a Telegram group by temporary adding the get_id_bot as group member. After you get the Chat ID you should remove it.

Email

This is easy! Just specify email object and recipients (separated by commas)


All versions of notify with dependencies

PHP Build Version
Package Version
Requires php Version ~7.0.0|~7.1.0
magento/magento2-base Version ^2.1|^2.2
maknz/slack Version ^1.7
irazasyed/telegram-bot-sdk Version ^2.0
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 msp/notify contains the following files

Loading the files please wait ....