maillotf/ikentoo-bridge-bundle

针对 Symfony 的 ikentoo 套件

安装: 0

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.0 2020-10-12 14:14 UTC

This package is auto-updated.

Last update: 2024-09-13 00:22:27 UTC


README

Software license Latest stable Packagist PHP Version Support

基于令牌认证的 Ikentoo 的 Symfony 套件

所需配置

修改 framework.yaml

ikentoo:
    authentication:
        protocol: "http"
        host: "127.0.0.1"
        port: "80"
        token: "TOKEN"

修改 services.yaml

services:
    MaillotF\Ikentoo\IkentooBridgeBundle\Service\IkentooService: '@ikentoo.service'

##使用 Composer 安装包

$ composer require maillotf/ikentoo-bridge-bundle

在控制器中使用

<?php
//...
use MaillotF\Ikentoo\IkentooBridgeBundle\Service\IkentooService;

class exampleController extends AbstractController
{
	/**
	 * Example
	 * 
	 * @Route("example", name="example", methods={"GET"})
	 * 
	 */
	public function test(IkentooService $is)
	{
		$from = new \DateTime('2020-01-09');
		$to = new \DateTime('2020-10-09');

		$result = $is->financial->getReceiptTransactionsRange("101163659689986", $from, $to, array('staff'), 1000);
		
		$menu = $is->orderAndPayment->loadMenu("101163222689111", 101112359691234, true)
		
		return ($this->json($menu));
	}

}