<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Customize\Controller;
use Eccube\Entity\Product;
use Customize\Form\Type\EstimationType;
use Eccube\Repository\ProductRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Eccube\Repository\CategoryRepository;
use Eccube\Repository\CustomerRepository;
use Eccube\Repository\Master\PrefRepository;
use Customize\Service\MailService;
use Eccube\Event\EccubeEvents;
use Eccube\Event\EventArgs;
use Symfony\Component\Form\Form;
use Customize\Service\FileUploader;
use Plugin\ECCUBE4LineLoginIntegration42\Consts\ApiUrl;
use Plugin\ECCUBE4LineLoginIntegration42\Entity\LineLoginIntegration;
use Plugin\ECCUBE4LineLoginIntegration42\Controller\LineLoginIntegrationController;
use Plugin\ECCUBE4LineLoginIntegration42\Controller\Admin\LineLoginIntegrationAdminController;
use Plugin\ECCUBE4LineLoginIntegration42\Repository\LineLoginIntegrationSettingRepository;
use Plugin\ECCUBE4LineLoginIntegration42\Repository\LineLoginIntegrationRepository;
use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class LineLinkageController extends AbstractController
{
private $lineIntegrationSettingRepository;
private $lineIntegrationRepository;
private $customerRepository;
private $tokenStorage;
protected $apiUrl;
private HttpClientInterface $httpClient;
public function __construct(
LineLoginIntegrationSettingRepository $lineIntegrationSettingRepository,
LineLoginIntegrationRepository $lineIntegrationRepository,
CustomerRepository $customerRepository,
TokenStorageInterface $tokenStorage,
ApiUrl $apiUrl,
HttpClientInterface $httpClient
) {
$this->lineIntegrationSettingRepository = $lineIntegrationSettingRepository;
$this->lineIntegrationRepository = $lineIntegrationRepository;
$this->customerRepository = $customerRepository;
$this->tokenStorage = $tokenStorage;
$this->apiUrl = $apiUrl;
$this->httpClient = $httpClient;
}
/**
* ライン連携するページ.
*
* @Route("/line_linkage", name="line_linkage", methods={"GET"})
* @Template("@user_data/line_linkage.twig")
*/
public function line_linkage(Request $request)
{
//getでtargが入っていたらsessionに投入
$session = $request->getSession();
$session->set('targ_contact', base64_decode($request->query->get('targ')));
$already_flg = '';
return ['already_flg' => $already_flg];
}
}