From bad824d201ebf0d985804b3f2f1140d37c14680f Mon Sep 17 00:00:00 2001 From: Kotlyar Maksim Date: Mon, 23 Feb 2015 20:36:57 +0000 Subject: [PATCH] fixes. --- src/Payum/Silex/PayumProvider.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Payum/Silex/PayumProvider.php b/src/Payum/Silex/PayumProvider.php index 450ef01..f6070a3 100644 --- a/src/Payum/Silex/PayumProvider.php +++ b/src/Payum/Silex/PayumProvider.php @@ -11,6 +11,7 @@ use Payum\Core\Bridge\Twig\TwigFactory; use Payum\Core\Registry\SimpleRegistry; use Payum\Core\Reply\ReplyInterface; +use Payum\Core\Security\GenericTokenFactory; use Payum\Silex\Controller\AuthorizeController; use Payum\Silex\Controller\CaptureController; use Payum\Silex\Controller\NotifyController; @@ -80,14 +81,14 @@ protected function registerService(Application $app) }); $app['payum.security.token_factory'] = $app->share(function($app) { - return new TokenFactory( - $app['url_generator'], - $app['payum.security.token_storage'], - $app['payum'], - 'payum_capture_do', - 'payum_notify_do', - 'payum_authorize_do', - 'payum_refund_do' + return new GenericTokenFactory( + new TokenFactory($app['payum.security.token_storage'], $app['payum'], $app['url_generator']), + array( + 'capture' => 'payum_capture_do', + 'notify' => 'payum_notify_do', + 'authorize' => 'payum_authorize_do', + 'refund' => 'payum_refund_do' + ) ); }); @@ -116,7 +117,7 @@ protected function registerService(Application $app) $payment->addAction($app['payum.action.obtain_credit_card']); } - return new SimpleRegistry($app['payum.payments'], $app['payum.storages'], null, null); + return new SimpleRegistry($app['payum.payments'], $app['payum.storages'], array()); }); }