Download the PHP package zgabievi/osmp without Composer
On this page you can find all versions of the php package zgabievi/osmp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zgabievi/osmp
More information about zgabievi/osmp
Files in zgabievi/osmp
Package osmp
Short Description OSMP Payment
License MIT
Homepage https://github.com/zgabievi/OSMP
Informations about the package osmp
laravel-osmp
Some great updates are comming soon...
OSMP | |
---|---|
OSMP payment system integration for Laravel 5.*. Trying to make it perfect, easy to use and awesome package :tada: Pull requests are welcome. |
Table of Contents
- Installation
- Composer
- Laravel
- Usage
- Protocol
- Codes
- Config
- License
Installation
Composer
Run composer command in your terminal.
composer require zgabievi/osmp
Laravel
Open config/app.php
and find the providers
key. Add OSMPServiceProvider
to the array.
Find the aliases
key and add Facade
to the array.
Usage
Attention! You need to disable short_open_tag
in your php.ini
file, to use xml response;
Follow this url for more information: ini.short-open-tag
Create route in your routes.php
Middleware is required if you want to make Basic Authentication
In place of // LISTENERS
you can write osmp
listeners:
Flashed session data will be used in XML response as additional information
You can call Response
early to show some kind of error.
For example:
This will output:
Protocol
This is the protocol for provider:
http(s)://yoursite.com/billing/?command=check&account=000000
http(s)://yoursite.com/billing/?command=pay&txn_id=1234567&account=000000&sum=10.45
Command: check/pay are required
Codes
Key | Description |
---|---|
0 | Operation was successful |
1 | Server Timeout |
4 | Wrong format of the user's account |
5 | User does not exist |
7 | Payments are prohibited |
215 | Transaction duplication |
275 | Wrong amount |
300 | Fatal Error |
Config
Publish OSMP config file using command:
Created file config\osmp.php
. Inside you can change configuration as you wish.
License
laravel-osmp is licensed under a MIT License.
TODO
- [ ] Create tests for checking funtionality
- [ ] Create separated file for response codes
- [ ] Make artisan command that will create reponse codes php file
- [ ] Make artisan command that will register routes for user
- [ ] Make OSMP object more Model like