PHP code example of creatortsv / omnipay-manager-bundle

1. Go to this page and download the library: Download creatortsv/omnipay-manager-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

creatortsv / omnipay-manager-bundle example snippets


// ...
use Creatortsv\OmnipayManagerBundle\Adapter\OmnipayGatewayAdapter;

class MyAdapter extends OmnipayGatewayAdapter
{
    // ...
}

// ...
class MyAdapter extends OmnipayGatewayAdapter
{
    // ...
    public static function getOmnipayGatewayAlias(): string
    {
        return 'Kuberaco';
    }
    // ...
}

use Creatortsv\OmnipayManagerBundle\GatewayManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class MyController extends AbstractController
{
    // ...
    public function createPayment(GatewayManager $manager)
    {
        $response = $manager
            ->get('Kuberaco')
            ->createPayment(); // Your described method to do payment in the same way for different gateways
        
        // ...
    }
}