sirumobile/infobip-notifier

Symfony Infobip Notifier Bridge

0.2.3 2022-02-14 19:21 UTC

This package is auto-updated.

Last update: 2024-10-15 00:43:30 UTC


README

Provides Infobip integration for Symfony Notifier.

Requirements

  • PHP 7.2
  • Symfony Notifier 5.2+, HttpClient and EventDispatcher components
  • Your API key and base url from Infobip

Installation

$ composer require sirumobile/infobip-notifier

Add correct DSN with your Infobip credentials to ENV. Then configure notifier and add InfobipTransportFactory to your services.

# .env
INFOBIP_DSN=infobip://YOUR_APIKEY@YOUR_API_HOST?from=SENDER_NAME
# ./config/packages/notifier.yaml
framework:
    notifier:
        texter_transports:
            infobip: '%env(INFOBIP_DSN)%'
# ./config/services.yaml
Siru\Notifier\Bridge\Infobip\InfobipTransportFactory:
    tags: [ texter.transport_factory ]

Delivery reports

You can add notifyUrl-option where Infobip will send delivery reports for each message. You will need to implement the callback controller yourself. Check Infobip API documentation for example payload.

# .env
INFOBIP_DSN=infobip://YOUR_APIKEY@YOUR_API_HOST?from=SENDER_NAME&notifyUrl=https://yourapplication/callback/path