定制 morningtrain/laravel-economic 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

morningtrain/laravel-economic

最新稳定版本:v1.0.0

Composer 安装命令:

composer require morningtrain/laravel-economic

包简介

This is my package laravel-economic

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require morningtrain/laravel-economic

Configuring the package

You can publish the config file with:

php artisan vendor:publish --tag="e-conomic-config"

This is the contents of the published config file:

<?php

return [
    'app_secret_token' => env('ECONOMIC_APP_SECRET_TOKEN'),
    'agreement_grant_token' => env('ECONOMIC_AGREEMENT_GRANT_TOKEN'),

    /*
     * This class handles actions on request and response to Economic.
     */
    'request_logger' => \Morningtrain\LaravelEconomic\RequestLogger\VoidRequestLogger::class,
];

Usage

Creating your own request logger

A request logger is any class that implements \Morningtrain\LaravelEconomic\RequestLogger\RequestLogger. Here's what that interface looks like.

use GuzzleHttp\Psr7\Response;
use Illuminate\Http\Client\Request;
use Psr\Http\Message\ResponseInterface;

interface RequestLogger
{
    public function onRequest(Request $request);

    public function onResponse(Response $response): ResponseInterface;
}

After creating your own RequestLogger you must register it in the request_logger in the e-conomic config file.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Developed by

Morningtrain logo

统计信息

  • 总下载量: 1.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-04