定制 jerfeson/correios 二次开发

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

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

jerfeson/correios

Composer 安装命令:

composer require jerfeson/correios

包简介

A library that facilitates integration with Brazilian postal services

README 文档

README

build Latest Version on Packagist Software License Minimum PHP Version GitHub all releases

This library facilitates the integration with the Correios delivery services of Brazil on php

Functionalities

Installation

  • Using composer
    $ composer require jerfeson/correios

How to use

Consult address by zip code

use Jerfeson\Correios;

require 'vendor/autoload.php';

$correios = new Correios();
$repsonse = $correios->address()->find("73100‑020");

/** result 
[
    'zipcode' => '01001-000',
    'street' => 'Praça da Sé',
    'complement' => [
        'lado ímpar',
    ],
    'district' => 'Sé',
    'city' => 'São Paulo',
    'uf' => 'SP',
]

**/

Calculate Prices and Deadlines

Calculate prices and terms of delivery services (Sedex, PAC and etc), with support for multiple objects in the same query.

use Jerfeson\Correios;

require 'vendor/autoload.php';

$correios = new Correios();

$response = $correios->freight()
    ->origin('01001-000')
    ->destination('73100‑020')
    ->services(FreightType::SEDEX, FreightType::PAC)
    ->item(16, 16, 16, .3, 1)->calculate();
    
    
/** result
[
    0 =>
        [
            'name' => 'Sedex',
            'code' => '4014',
            'price' => 35.1,
            'deadline' => 4,
            'error' => [],
        ],
    1 =>
        [
            'name' => 'PAC',
            'code' => '4510',
            'price' => 24.8,
            'deadline' => 8,
            'error' =>[],
        ],
]
*/

How to test

    $ composer test

Roadmap

  • CodeCoverage

License

jerfeson/correios is release under the MIT license.

Thanks

This project is based on the project in flyingluscas/correios-php feel free to contribute to this and the other project.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固