1. Go to this page and download the library: Download xola/omnipay-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/ */
xola / omnipay-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Xola\OmnipayBundle\OmnipayBundle(),
// ...
);
}
// From within a controller. This will return an instance `\Omnipay\Stripe`. `stripe_default` is the key as
// specified in the config.
$gateway = $this->get('omnipay')->get('stripe_default');
// From within a controller. This will return an instance of `\Omnipay\MyGateway` as specified in
// `omnipay.my_custom_name.gateway`
$gateway = $this->get('omnipay')->get('my_custom_name');