Download the PHP package brilliant_mind/emola-sdk without Composer

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

EMOLA SDK

PHP SDK for consuming the Movitel e-Mola USSD Push WebService (SOAP).

Supports: C2B (pushUssdMessage), B2C (pushUssdDisbursementB2C), transaction status, beneficiary name and account balance queries.

Requirements

Installation

Configuration

This SDK does not read environment variables by itself — you pass the credentials to Emola::config(). The recommended approach is to keep them in a .env file in your project and feed them into the config call.

.env variables

Variable Required Description Example
EMOLA_WSDL yes SOAP gateway WSDL endpoint. Provided by e-Mola after the contract is signed https://1.2.3.4:8080/BCCSGateway/BCCSGateway?wsdl
EMOLA_USERNAME yes Encrypted username assigned by e-Mola d609baa5ba374a7e89f74f99c33ad761
EMOLA_PASSWORD yes Encrypted password assigned by e-Mola 09671efad19a4d85f2960fde2812339e
EMOLA_KEY yes Private key provided by e-Mola your-private-key
EMOLA_PARTNER_CODE yes Partner code provided by e-Mola (keep as string — may have leading zeros) 00204
EMOLA_LANGUAGE no Message language: pt (default) or en pt

⚠️ EMOLA_WSDL and all credentials are delivered by e-Mola only after a contract is signed. Never commit your .env — add it to .gitignore.

Example .env

Loading the .env

Plain PHP (using vlucas/phpdotenv):

Laravel (.env is already loaded; use config()/env()):

Usage

After calling Emola::config(...) once, use the static methods.

C2B (charge a customer — pushUssdMessage)

B2C (disburse to a customer — pushUssdDisbursementB2C)

Other queries

Fake transactions (no network call)

For local development / tests you can stub the gateway. fake('0') returns a success response; any other code returns a failure (6003).

Response

c2b() and b2c() return a Transaction. Call ->toArray():

On a gateway-level error, original is empty and error holds the code. See the e-Mola API specification for the full list of business error codes (e.g. 11 = customer did not enter PIN, 12 = no e-Mola account).


All versions of emola-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-soap Version *
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 brilliant_mind/emola-sdk contains the following files

Loading the files please wait ...