This is Symfony bundle which works with mpay24.com payments.
Type the following command in the Terminal or add it manually to the composer.json
$ composer require netbull/mpay24-bundleThis command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Netbull\Mpay24Bundle\NetbullMpay24Bundle(),
);
// ...
}
// ...
}-
Option 1
create a configuration file
app/config/netbull_mpay24.ymlfolder and include it inapp/config/config.ymlimports: ... - { resource: netbull_mpay24.yml }
-
Option 2
if you want to have separate configuration for the different environments like Prod and Dev, you need to create config file for each of the
app/config/netbull_mpay24_prod.ymlandapp/config/netbull_mpay24_dev.ymland include them in the corresponding config filesapp/config/config_prod.ymlimports: ... - { resource: netbull_mpay24_prod.yml }
app/config/config_dev.ymlimports: ... - { resource: netbull_mpay24_dev.yml }
the registered service is netbull.provider.mpay24
in controller can be used with $this-get('netbull.provider.mpay24')->getInstance()
$paymentProvider = $this-get('netbull.provider.mpay24');
$tokenData = $paymentProvider->createToken()The payment provider automatically tries to detect the current Locale from the request object if the language is not specified in the options
A short demo implementation guide is available at https://docs.mpay24.com/docs/get-started
Documentation is available at https://docs.mpay24.com/docs.
