定制 passworks/passworks-php 二次开发

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

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

passworks/passworks-php

最新稳定版本:v2.0.1

Composer 安装命令:

composer require passworks/passworks-php

包简介

Client for Passworks API allowing the creating of Apple Passbook/Wallet content

README 文档

README

Passworks PHP API client can be installed via Composer or PHAR file. (Composer is the recommended method for using Passworks API client).

Installing using Composer

The API client can be installed through Composer. It's been made available as a Packagist package, available here. In order to use it, first add a file named composer.json in your project root:

{
    "require": {
        "passworks/passworks-php": "2.0.0"
    }
}

Once the composer.json file is created, you need to download the composer.phar executable. To do so, run the following curl command on your console of choice:

curl -sS https://getcomposer.org/installer | php

Now you can run the composer install for the initial package install and composer update to update to the latest version of the API client, which is linked to the master branch.

php composer.phar install

Now you're set to go! Just include the following file and you're good to go.

require 'vendor/autoload.php';

Installation using the PHAR file

Download the lastest version of Passworks.phar and require it as usual.

include 'Passworks.phar';

Example

<?php

require 'vendor/autoload.php';

use Passworks\Client;

// Instantiate the Passworks client
$api = new Passworks\Client('your api username', 'your api key');

// upload a asset (background image)
$api->createAsset('background', '/local-path-to-a-image/image.png');

// Fetch the asset list
$assets = $api->getAssets();

// Iterate through asset list
foreach($assets as $asset)
{
  print_r($asset);
}

More Examples:

Creating and Listing assets

Listing certificates

Creating, Listing and Editing Coupons

Creating, Listing and Editing Event Tickets

Creating, Listing and Editing Boarding Passes

Creating, Listing and Editing Store Cards

Creating, Listing and Editing Generic Passes

Documentation

For more information about the API please please refere to https://github.com/passworks/passworks-api

For more examples about the PHP client try browsing the wiki

Help us make it better

Please tell us how we can make the PHP client better. If you have a specific feature request or if you found a bug, please use GitHub issues. Fork these docs and send a pull request with improvements.

To talk with us and other developers about the API open a support ticket or mail us at api at passworks.io if you need to talk to us.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固