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.
Download brilliant_mind/emola-sdk
More information about brilliant_mind/emola-sdk
Files in brilliant_mind/emola-sdk
Package emola-sdk
Short Description online payment manager using emola gateway
License GPL-3.0-or-later
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
- PHP 8.0 or higher
ext-soapenabled
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_WSDLand 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
ext-soap Version *