Skip to content

Commit

Permalink
add translator in payment helper
Browse files Browse the repository at this point in the history
  • Loading branch information
paulandrieux committed Oct 6, 2016
1 parent 93f34d4 commit bf95ae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Helper/PaymentHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use MangoPay\Wallet;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Translation\TranslatorInterface;

/**
* ref: troopers_mangopay.payment_helper.
Expand All @@ -29,12 +30,14 @@ class PaymentHelper
protected $mangopayHelper;
protected $router;
protected $dispatcher;
protected $translator;

public function __construct(MangopayHelper $mangopayHelper, Router $router, EventDispatcherInterface $dispatcher)
public function __construct(MangopayHelper $mangopayHelper, Router $router, EventDispatcherInterface $dispatcher, TranslatorInterface $translator)
{
$this->mangopayHelper = $mangopayHelper;
$this->router = $router;
$this->dispatcher = $dispatcher;
$this->translator = $translator;
}

public function prepareCardRegistrationCallback(User $user, Order $order)
Expand Down
1 change: 1 addition & 0 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
- @troopers_mangopay.mango_api
- @router
- "@event_dispatcher"
- "@translator"

troopers_mangopay.payment_direct_helper:
class: %troopers_mangopay.payment_direct_helper.class%
Expand Down

0 comments on commit bf95ae0

Please sign in to comment.