This package is a Laravel 5 plugin working with mpay24.com payments.
Install using composer:
composer require mpay24/mpay24-laravel
Then add this to providers
list in config/app.php
:
'Mpay24Laravel\Mpay24LaravelServiceProvider',
Add the settings in the .env
file:
MPAY24_MERCHANT_ID="9000" // Required
MPAY24_SOAP_PASSWORD="*******" // Required
MPAY24_TEST_SYSTEM=true // use true [default] for Test System and false for Live System
MPAY24_DEBUG=true // optional default is true
// If have a Proxy
MPAY24_PROXY_Host="proy.host.com"
MPAY24_PROXY_Port="0104" // must be a 4 digit number
MPAY24_PROXY_User="proxy_user"
MPAY24_PROXY_Pass="*******"
MPAY24_VERIFY_PEER=true
MPAY24_SPID="abcdedfghij" // requiert if you want to use the Flex Link integration
MPAY24_FLEX_LINK_PASSWORD="*******" // requiert if you want to use the Flex Link integration
MPAY24_FLEX_LINK_TEST_SYSTEM=true // use true [default] for Test System and false for Live System
MPAY24_LOG_PATH='/path/to/folder' // optional default is the Laravel service/log folder
MPAY24_LOG_FILE='mpay24.log' // name of the logfile default is mpay24.log
MPAY24_ENABLE_CURL_LOG=false // use true if you want to log the curl excange otherwise false [default]
MPAY24_CURL_LOG_FILE="curl.log" // name of the logfile default is mpay24_curl.log
Now you can call app()->mpay24
which provides you a instance of the \Mpay24\Mpay24
class.
If you need the a instance of the \Mpay24\Mpay24Order
class you can get one with app()->mpay24order
All settings that you provided in the .env
are already set
If you want to change settings during runtime app()->mpay24config
will provide you the configuration instance.
For all available settings see the mPAY24 PHP SDK Wiki.