misterbrownrsa/laravel-dhl-tas 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

misterbrownrsa/laravel-dhl-tas

Composer 安装命令:

composer require misterbrownrsa/laravel-dhl-tas

包简介

A basic API to easily generate the necessary requests for Trade Automation Service for Laravel

README 文档

README

I needed a laravel-esque wrapper to make calls to the DHL XML service, but couldn't find any. So I created one. It was specifically designed for my own personal use, but you are welcome to submit issues, and I'll look into refactoring it so that it can be used in a more general purpose fashion.

Getting Started

Prerequisites

This was built and tested ONLY on Laravel 5.5, although I'm sure it'll work on previous versions as well.

Installing

composer require misterbrownrsa/laravel-dhl-tas

Since Laravel 5.5 automatically includes the service provider, it won't be necessary to register it. However, if you really want to, run the following command


##Usage Examples

Trade Automation Services provides duties and tax details when trying to calculate total landed cost for a shipment

$products = [];
foreach ($cart->items as $cartItem) {
    $products[] = [
        'name'     => $cartItem->warehouse->product->name,
        'price'    => $cartItem->price,
        'quantity' => $cartItem->quantity,
        'weight'   => $cartItem->warehouse->product->weight,
        'hscode'   => "6404.1900", //retrieved from their HSCode systems
    ];
}

$TAS = new \MisterBrownRSA\DHL\TAS\DHLTAS();
$TAS->addProduct($products);
$TAS->total($cart->subtotal);
$TAS->reference('A1AQV');
$TAS->toCountry('ZW');
$results = $TAS->doCurlPost();

Dump the request

dump($TAS->toXMML());

Dump the response

dump($TAS->doCurlPost());

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks David for your help during the implementation process

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固