定制 dsposito/address-validator 二次开发

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

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

dsposito/address-validator

Composer 安装命令:

composer require dsposito/address-validator

包简介

Address validator that support multiple validation 3rd-parties.

README 文档

README

Build Status Coverage Status Latest Stable Version

Overview

An address validator adapter that supports a variety of third-party validators.

Installation

Run the following composer command to add the package to your project:

composer require dsposito/address-validator

Alternatively, add "dsposito/address-validator": "^0.1" to your composer.json file.

Usage

$provider = Provider::instance(
    'usps',
    [
        'endpoint' => 'http://production.shippingapis.com/ShippingAPI.dll',
        'user_id' => 'SK297O2B7BF221',
    ]
);

$address = $provider->validate(new Address([
    'name' => 'Elon Musk',
    'street1' => '3500 Deer Creek Road',
    'city' => 'Palo Alto',
    'state' => 'CA',
    'zip' => '94304',
    'country' => 'US',
]));

Tests

To run the test suite, run the following commands from the root directory:

composer install
vendor/bin/phpunit -d usps_user_id=YOUR_USPS_ID -d easypost_api_key=YOUR_EASYPOST_KEY

Note: Valid API keys are required when running the integration tests.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固