承接 dafiti/correios 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dafiti/correios

最新稳定版本:0.1.1

Composer 安装命令:

composer require dafiti/correios

包简介

PHP integration with Correios Webservice

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage HHVM Latest Stable Version Total Downloads License

PHP integration with Correios API

Correios integration, using the following implementation manual.

Methods implemeted until now are:

  • solicitarRange
  • solicitarPostagemReversa

Instalation

The package is available on Packagist. Autoloading is PSR-4 compatible.

{
    "require": {
        "dafiti/correios": "dev-master"
    }
}

Usage

To use any method you need the following information first, which are required for most of the API calls:

  • usuario
  • senha
  • codAdministrativo
  • contrato

To make an API call is quite simple, all you have to do use the client method with the default configuration file and the information needed to consume it:

<?php
namespace Dafiti\Correios\Service;

use Dafiti\Correios\Entity;

class ClientTest extends \PHPUnit_Framework_TestCase
{
    private $client;

    public function setUp()
    {
        $this->client = new Client(
            new Entity\Config([
                'wsdl' => 'http://webservicescolhomologacao.correios.com.br/ScolWeb/WebServiceScol?wsdl',
                'usuario' => '60618043',
                'senha' => '8o8otn',
                'codAdministrativo' => '08082650',
                'contrato' => '9912208555',
            ])
        );
    }
    public function testSolicitarRange()
    {
        $this->client->solicitarRange('AP', '', 1);
    }
}

You can find example for all methods available inside the tests/integration folder.

License

MIT License

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-07