Skip to content

Commit

Permalink
[skeleton] add gateway factory factory as callable.
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Dec 23, 2015
1 parent 558c01c commit 69ed1c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ $ composer create-project payum/skeleton
<?php

use Payum\Core\PayumBuilder;
use Payum\Core\GatewayFactoryInterface;

$defaultConfig = [];

$payum = (new PayumBuilder)
->addGatewayFactory('paypal', new \Acme\Paypal\PaypalGatewayFactory($defaultConfig))
->addGatewayFactory('paypal', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new \Acme\Paypal\PaypalGatewayFactory($config, $coreGatewayFactory)
})

->addGateway('paypal', [
'factory' => 'paypal',
Expand Down

0 comments on commit 69ed1c2

Please sign in to comment.