Download the PHP package zgabievi/e-money without Composer
On this page you can find all versions of the php package zgabievi/e-money. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zgabievi/e-money
More information about zgabievi/e-money
Files in zgabievi/e-money
Package e-money
Short Description eMoney Payment System
License MIT
Homepage https://github.com/zgabievi/eMoney
Informations about the package e-money
laravel-emoney
Some great updates are comming soon...
eMoney | |
---|---|
eMoney payment system integration for Laravel 5.* :sunglasses: Trying to make it perfect, easy to use and awesome package :tada: Pull requests are welcome. |
Table of Contents
- Installation
- Composer
- Laravel
- Usage
- Example
- Codes
- Config
- License
Installation
Composer
Run composer command in your terminal.
composer require zgabievi/e-money
Laravel
Open config/app.php
and find the providers
key. Add eMoneyServiceProvider
to the array.
Find the aliases
key and add Facade
to the array.
Usage
There is main method with will call method by first parameter. And it will return the result of the request:
eMoney::GetResult($method, ...$args);
Example:
Outputs:
Behind the scene it does something like this:
This is the list of all methods:
GetServiceGroups();
GetServices($group_id);
GetServiceProperties($service_id);
GetServiceParameterReferences($service_parameter_id);
GetInfo($service_id, $parameters);
Pay($service_id, $amount, $currency, $txn_id, $parameters);
GetTransactionDetails($txn_id);
GetTransactionInfo($txn_id);
GetStatement($start_date, $end_date);
GetBalance();
ConfirmPayment($txn_id, $amount, $currency, $parameters);
Example
Outputs:
Codes
Key | Value | Description |
---|---|---|
1 | Success | OK |
11 | Unknown | Unknown error |
12 | InvalidHash | Invalid hash |
13 | InvalidParameters | Some of the input parameters are invalid |
14 | InvalidDistributor | Invalid distributor name |
16 | ServicesProviderNotFound | Service provider not found |
17 | AbonentNotFound | Abonent not found |
19 | ParameterNotFound | Parameter not found |
20 | ParameterValueNotFound | Parameter value not found |
30 | Error | General error |
31 | ServiceNotFound | Service not found |
34 | ServiceInternalError | Service internal error |
40 | WrongAmount | Wrong amount |
41 | ServiceTimeout | Operation timeout |
42 | PaymentWontBeAccepted | Payment wont be accepted. Your company has not enough balance in eMoney |
43 | AccountOperationDenied | Account operation denied |
44 | AmountLessThanMin | Amount is less than acceptable minumum |
45 | AmountMoreThanMax | Amount is more than acceptable maximum |
46 | TransactionLimitExceeded | Transaction limit exceeded |
Config
Publish eMoney config file using command:
Created file config\eMoney.php
. Inside you can change configuration as you wish.
License
laravel-emoney is licensed under a MIT License.
TODO
- [ ] Create tests to check funtionality
- [ ] Create separated file for response codes
- [ ] Make artisan command that will write this response codes in php file
- [ ] Make eMoney object more Model like