Download the PHP package neamatrix/connex without Composer

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

neamatrix/connex

Laravel package for Connex DCB login: server-side auth-login + protected-script, browser-only dcbprotect / gateway-load, server-side login-connex + login-confirm-connex, customizable login UI, mobile Sanctum tokens.

Database (users table)

Package migrations add Connex subscriber fields from OTP confirm success:

Column Example Source
msisdn 218920920110 success.msisdn
subscriber exist success.subscriber
status active success.status
operator Libyana success.operator
expiration_date 2032-08-11 15:56:54 success.expiration_date

Migrations live in packages/torgodly/connex/database/migrations/ (auto-loaded by the package).

Ensure your User model includes these in $fillable (and expiration_date cast as datetime).

Tests

From the Laravel app root:

Covers URL building, upstream HTTP (faked), user sync, OTP confirm API, Sanctum token issuance, and the login page.

Requirements

Install

From Packagist (after package is submitted)

Submit https://github.com/NeaMatrix/connex-package on Packagist.org, then:

Before Packagist / dev install

If you see "Could not find a version matching minimum-stability (stable)", use the GitHub repo directly:

Or allow dev stability once:

Local path (development)

Environment

Upstream endpoints

Each call uses CONNEX_BASE_URL + CONNEX_*_ENDPOINT.

Purpose Env Default
Auth token CONNEX_AUTH_LOGIN_ENDPOINT /auth-login
DCB script CONNEX_PROTECTED_SCRIPT_ENDPOINT /protected-script
Send OTP CONNEX_LOGIN_CONNEX_ENDPOINT /login-connex
Confirm OTP CONNEX_LOGIN_CONFIRM_ENDPOINT /login-confirm-connex

Browser vs server (v1.1+)

Step Where it runs
auth-login, protected-script, login-connex Laravel (POST /connex/api/bootstrap, POST /connex/api/request-otp)
dcbprotect script + DCBProtectRun + gateway-load Browser (antifraud; credentials never sent to the client)
login-confirm-connex Laravel (POST /connex/api/confirm-otp)

ConnexLoginConfig exposes only Laravel API URLs + CSRF + selectors — not CONNEX_AUTH_EMAIL, CONNEX_AUTH_PASSWORD, or upstream URLs.

Default login page

Package registers GET {CONNEX_WEB_LOGIN_PATH} (default /connex/login) → connex::login.

Custom login page (design in your Blade view)

All layout and CSS live in your view — not in config/connex.php. The package only requires correct element IDs (from connex.selectors) and the submit button outside the hidden phone/OTP step wrappers.

Publish the example and edit it:

Copy resources/views/vendor/connex/login.blade.php to e.g. resources/views/my-login.blade.php, change classes/markup freely, then:

Minimal custom page:

Without the component — same markup, end with:

Wrap markup in <div data-connex-login-root data-connex-hidden-class="hidden"> so step toggling works.

Required elements (configurable via config/connex.php → selectors):

Purpose Default id / name
MSISDN input #msisdn
Submit button #cta_button — must stay outside hidden phone/otp step wrappers (default layout does this)
Transaction #transaction_identify
Device type name="device_type" value web

OTP + mobile login

  1. Page load → POST /connex/api/bootstrap (fresh transaction_identify + dcbprotect).
  2. User submits phone → POST /connex/api/request-otp (server calls login-connex; OTP sent).
  3. UI automatically switches to the OTP field (#otp in #connex_otp_step; button label becomes “Verify OTP”).
  4. User submits OTP → POST /connex/api/confirm-otp (Laravel):
    • Calls upstream login-confirm-connex with msisdn + otp + device_type
    • Creates/updates local user from Connex success payload
    • Issues Sanctum token for the mobile app
    • Runs your HandlesOtpConfirmation handler for custom JSON

Custom OTP handling

Implement Torgodly\Connex\Contracts\HandlesOtpConfirmation and bind it:

Mobile API response (POST /connex/api/confirm-otp)

Mobile app: store auth.token, send Authorization: Bearer {token} on API calls.

Web hook

Changelog

v1.1.2

v1.1.1

v1.1.0

v1.0.2

v1.0.1

v1.0.0


All versions of connex with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.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 neamatrix/connex contains the following files

Loading the files please wait ...