承接 fraktjakt/library 相关项目开发

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

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

fraktjakt/library

Composer 安装命令:

composer require fraktjakt/library

包简介

PHP integration library for Fraktjakt API.

关键字:

README 文档

README

This is a PHP library for machine-to-machine communication with Fraktjakt.

Use With Composer

(We will just assume you have composer installed for your project)

  1. Open a command-line interface and navigate to your project folder.

  2. Run the following command in your command-line interface:

    composer require fraktjakt/library:dev-master

Composer will now autoload Client.php when you create the class object:

    $fraktjakt = new \Fraktjakt\Client();

Use Without Composer

Manually include Client.php in your script before initiating the client.

    require_once 'path/to/Client.php';

    $fraktjakt = new \Fraktjakt\Client();

Example Code (More examples in the examples/ folder)

  require_once 'path/to/Client.php';

  try {

    $fraktjakt = new \Fraktjakt\Client();

    $fraktjakt->setConsignorId(12345)
              ->setConsignorKey('0123456789abcdef0123456789abcdef')
              ->setTestMode(true);

    $request = array(
      // ...
    );

    $result = $fraktjakt->Query($request);

  } catch(Exception $e) {
    die('An error occured: '. $e->getMessage() . PHP_EOL . PHP_EOL
      . $fraktjakt->getLastLog());
  }

Testing

  1. Make sure you have PHP installed on your machine.

  2. Open a command-line interface and navigate to the examples/ folder.

  3. Run the following command in your command-line interface:

    php ExampleFile.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-10-03