Skip to content

Commit 69ed1c2

Browse files
committed
[skeleton] add gateway factory factory as callable.
1 parent 558c01c commit 69ed1c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ $ composer create-project payum/skeleton
1616
<?php
1717

1818
use Payum\Core\PayumBuilder;
19+
use Payum\Core\GatewayFactoryInterface;
1920

2021
$defaultConfig = [];
2122

2223
$payum = (new PayumBuilder)
23-
->addGatewayFactory('paypal', new \Acme\Paypal\PaypalGatewayFactory($defaultConfig))
24+
->addGatewayFactory('paypal', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
25+
return new \Acme\Paypal\PaypalGatewayFactory($config, $coreGatewayFactory)
26+
})
2427

2528
->addGateway('paypal', [
2629
'factory' => 'paypal',

0 commit comments

Comments
 (0)