定制 cognito/auspost_pac 二次开发

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

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

cognito/auspost_pac

最新稳定版本:1.0.0

Composer 安装命令:

composer require cognito/auspost_pac

包简介

Australia Post PAC API

README 文档

README

Interact with the AusPost PAC API

Installation

Installation is very easy with composer:

composer require cognito/auspost_pac

Setup

Create a developer account at Australia Post at https://developers.auspost.com.au/apis/pacpcs-registration

Usage

<?php
	$auspost = new \Cognito\AuspostPAC\AuspostPAC('Your API Key');

	// Get list of Parcel Sizes
	$parcelSizes = $auspost->getParcelSizes();

	// Get a quote for delivery options using known weight and box dimensions
	$quotes = $auspost->startQuote()
		->setFromPostcode(4500)
		->setToPostcode(4127)
		->setParcelDimensions(10, 8, 22)
		->setParcelWeight(2.3)
		->getServices();

	// Get a quote for delivery options using known weight and approximate box dimensions from cubic weight
	$quotes = $auspost->startQuote()
		->setFromPostcode(4500)
		->setToPostcode(4127)
		->setParcelWeight(2.3)
		->setParcelCubicWeight(4)
		->getServices();

	// Get a quote for delivery options using cubic weight
	$quotes = $auspost->startQuote()
		->setFromPostcode(4500)
		->setToPostcode(4127)
		->setParcelCubicWeight(4)
		->getServices();

	// Get a total price for a delivery of a certain type
	$price = $auspost->startQuote()
		->setFromPostcode(4500)
		->setToPostcode(4127)
		->setParcelCubicWeight(4)
		->getTotalPrice('AUS_PARCEL_REGULAR');

统计信息

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

GitHub 信息

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

其他信息

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