birkof/netopia-mobilpay-bundle

Seamless integration of Netopia MobilPay Payment Gateway into your Symfony application

Installs: 11 705

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 4

Open Issues: 2

Type:symfony-bundle

v2.0.1 2022-11-23 20:00 UTC

This package is auto-updated.

Last update: 2024-03-22 08:53:43 UTC


README

This bundle provides an easy way to integrate MobilPay.ro Payment Gateway into your Symfony application.

Compatibility

It's compatible with Symfony 3.4 LTS and Symfony 4.0 (and later).

Installation

You just require using composer and you're good to go!

composer require birkof/netopia-mobilpay-bundle

If you don't use Flex, you need to manually enable bundle in your kernel:

<?php
// app/AppKernel.php
public function registerBundles()
{
    $bundles = [
        // ...
        new birkof\NetopiaMobilPay\NetopiaMobilPayBundle(),
    ];
}

Configuration

Configuration typically lives in the config/packages/netopia_mobilpay.yaml file for a Symfony 4 application.

# config/packages/netopia_mobilpay.yaml

netopia_mobilpay:
    payment_url:    '%env(NETOPIA_MOBILPAY_PAYMENT_URL)%'
    public_cert:    '%env(NETOPIA_MOBILPAY_PUBLIC_CERT)%' // Allowed to pass the certificate content directly as well as its file path
    private_key:    '%env(NETOPIA_MOBILPAY_PRIVATE_KEY)%' // Allowed to pass the key content directly as well as its file path
    signature:      '%env(NETOPIA_MOBILPAY_SIGNATURE)%'

You should define NETOPIA_MOBILPAY_PAYMENT_URL, NETOPIA_MOBILPAY_PUBLIC_CERT, NETOPIA_MOBILPAY_PRIVATE_KEY and NETOPIA_MOBILPAY_SIGNATURE in your environment variables.

If you're still using the old, non-environment system:

# app/config/config.yml

netopia_mobilpay:
    payment_url:  '%netopia_mobilpay_payment_url%'
    public_cert:  '%netopia_mobilpay_public_cert%'
    private_key:  '%netopia_mobilpay_private_key%'
    signature:    '%netopia_mobilpay_signature%'

And define netopia_mobilpay_payment_url, netopia_mobilpay_public_cert, netopia_mobilpay_private_key and netopia_mobilpay_signature parameters in app/config/parameters.yml file.

Documentation

The bulk of the documentation is stored in the ./src/Resources/doc/index.md file in this bundle:

Read the Documentation

License

This bundle is under the MIT license. See the complete license in the bundle:

Read the License

Features, Bugs and Collaborating

All of the code is provided as-is. We will not provide on-going support for any bugs that may be found. Please submit bug and features requests - we will review them but we do not guarantee that they will be addressed. Pull requests are welcome and we'll review them as quickly as we can.