yumaeda/shipping-fee
Composer 安装命令:
composer require yumaeda/shipping-fee
包简介
Calculates shipping fee upon delivery in Japan based on various conditions
关键字:
README 文档
README
This is PHP library for calculating shipping fee based on the regions in Japan.
- This API is experimental and may be removed anytime without any notice.
- The author shall not be held responsible or liable, under any circumstances, for any damages resulting from using this component.
Installation
- Add this require line to your
composer.json:
{
"require": {
"yumaeda/shipping-fee": "1.0.*"
}
}
composer installon your terminal.
How to Use
<?php
use Yumaeda\Shipping\YamatoShippingFee;
$prefecture = <Prefecture Key>; // e.g. 'TOKYO'
$btl_qty = <Number of bottles>; // e.g. 12
$is_cool = <Refrigerated delivery flag>; // e.g. true
$price = <Total purchanse (JPN)>; // e.g. 999999
$yamato_fee = new YamatoShippingFee($prefecture, $is_cool, $btl_qty, $price);
$yamato_fee->setRegionalFee('HOKKAIDO', 1310);
$yamato_fee->setRegionalFee('TOHOKU', 1010);
$yamato_fee->setRegionalFee('KANTO', 910);
$yamato_fee->setRegionalFee('SHINETSU', 910);
$yamato_fee->setRegionalFee('TOKAI', 910);
$yamato_fee->setRegionalFee('HOKURIKU', 910);
$yamato_fee->setRegionalFee('KANSAI', 1010);
$yamato_fee->setRegionalFee('CYUGOKU', 1110);
$yamato_fee->setRegionalFee('SHIKOKU', 1110);
$yamato_fee->setRegionalFee('KYUSYU', 1310);
$yamato_fee->setRegionalFee('OKINAWA', 2800);
$fee = yamato_fee->calculate();
Testing
$ vendor/bin/phpunit --debug
Contributing
Please send a pull request.
Support
Please send an email to yumaeda@gmail.com.
Author
Yukitaka Maeda
Software License
MIT
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-29