Method | Description |
---|---|
Application | |
Application::status | Get Cached Application Status | if null request fresh copy of Application Status. |
Application::checkStatus | Fetch Application Status. |
Collect | |
Collect::__construct | |
Collect::pay | Send Collect Request. |
Collect::setCustomer | Details on the customer performing the payment. This will help MeSomb to build for you analytics based on customer (Example: Top N customers) |
Collect::setLocation | Location for where the transaction was done. This will help MeSomb to build for you location based analytics based on customer (Example: transactions per region) |
Collect::setProduct | Give details on the product purchase will help for product-based analytics |
Deposit | |
Deposit::__construct | |
Deposit::pay | Make Deposit Request. |
Signature | |
Signature::signRequest | |
Signature::nonceGenerator | Generate a random string by the length |
Transaction | |
Transaction::generateURL | Generate Checking URL. |
Transaction::checkStatus | Check Transaction status. |
- Full name: \Hachther\MeSomb\Operation\Payment\Application
Get Cached Application Status | if null request fresh copy of Application Status.
Application::status( ): array|\Hachther\MeSomb\Operation\Payment\json
- This method is static.
Return Value:
Fetch Application Status.
Application::checkStatus( ): array
- This method is static.
Return Value:
- Full name: \Hachther\MeSomb\Operation\Payment\Collect
Collect::__construct( string payer, int amount, string service, string country = 'CM', string currency = 'XAF', bool fees = true, bool conversion = true, string|null message = null, string|null redirect = null ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
payer |
string | the account number to collect from |
amount |
int | amount to collect |
service |
string | MTN, ORANGE, AIRTEL |
country |
string | country CM, NE |
currency |
string | code of the currency of the amount |
fees |
bool | if you want MeSomb to deduct he fees in the collected amount |
conversion |
bool | In case of foreign currently defined if you want to rely on MeSomb to convert the amount in the local currency |
message |
string|null | Message to include in the transaction |
redirect |
string|null | Where to redirect after the payment |
Return Value:
Send Collect Request.
Collect::pay( ): \Hachther\MeSomb\Model\Payment|null
Return Value:
Details on the customer performing the payment. This will help MeSomb to build for you analytics based on customer (Example: Top N customers)
Collect::setCustomer( array<string,string> customer ): void
Parameters:
Parameter | Type | Description |
---|---|---|
customer |
array<string,string> | = {'email': string, 'phone': string, 'town': string, 'region': string, 'country': string, 'first_name': string, 'last_name': string, 'address': string |
Return Value:
Location for where the transaction was done. This will help MeSomb to build for you location based analytics based on customer (Example: transactions per region)
Collect::setLocation( array<string,string> location ): void
Parameters:
Parameter | Type | Description |
---|---|---|
location |
array<string,string> | {'town': string, 'region': string, 'country': string} |
Return Value:
Give details on the product purchase will help for product-based analytics
Collect::setProduct( array product ): void
Parameters:
Parameter | Type | Description |
---|---|---|
product |
array | {'id': string, 'name': string, 'category': string } |
Return Value:
- Full name: \Hachther\MeSomb\Operation\Payment\Deposit
Deposit::__construct( string receiver, int amount, string service, string country = 'CM', string currency = 'XAF', bool conversion = true ): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
receiver |
string | receiver account (in the local phone number) |
amount |
int | the amount of the transaction |
service |
string | service code (MTN, ORANGE, AIRTEL, ...) |
country |
string | country code 'CM' by default |
currency |
string | currency of the transaction (XAF, XOF, ...) XAF by default |
conversion |
bool | In case of foreign currently defined if you want to rely on MeSomb to convert the amount in the local currency |
Return Value:
Make Deposit Request.
Deposit::pay( ): \Hachther\MeSomb\Model\Deposit
Return Value:
- Full name: \Hachther\MeSomb\Operation\Signature
Signature::signRequest( string service, string method, string url, \DateTime date, string nonce, array credentials, array headers = [], array|null body = null ): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
service |
string | service to use can be payment, wallet ... (the list is provide by MeSomb) |
method |
string | HTTP method (GET, POST, PUT, PATCH, DELETE...) |
url |
string | the full url of the request with query element https://mesomb.hachther.com/path/to/ressource?highlight=params#url-parsing |
date |
\DateTime | Datetime of the request |
nonce |
string | Unique string generated for each request sent to MeSomb |
credentials |
array | dict containing key => value for the credential provided by MeSOmb. {'access' => access_key, 'secret' => secret_key} |
headers |
array | Extra HTTP header to use in the signature |
body |
array|null | The dict containing the body you send in your request body |
Return Value:
Authorization to put in the header
Generate a random string by the length
Signature::nonceGenerator( int length = 40 ): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
length |
int |
Return Value:
- Full name: \Hachther\MeSomb\Operation\Payment\Transaction
Generate Checking URL.
Transaction::generateURL( string endpoint, array ids ): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
endpoint |
string | |
ids |
array |
Return Value:
Check Transaction status.
Transaction::checkStatus( \Hachther\MeSomb\Model\Deposit|\Hachther\MeSomb\Model\Payment model ): array
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
model |
\Hachther\MeSomb\Model\Deposit|\Hachther\MeSomb\Model\Payment |
Return Value: