cardflow/cardflow-php
最新稳定版本:v1.0.2
Composer 安装命令:
composer require cardflow/cardflow-php
包简介
PHP library for interacting with the Cardflow API.
关键字:
README 文档
README
PHP library for interacting with the Cardflow API. This SDK is using the public Cardflow API and enables you to:
- Accept gift cards in your webshop
- Redeem and issue gift cards in your POS-system
Requirements
- PHP 7.4.0 and later
- A valid API Key, that can be generated in your Cardflow dashboard
Installation
The SDK is published on Packagist and can be installed using Composer.
composer require cardflow/cardflow-php
Getting Started
Before starting, it is recommended to read the documentation of the underlying Cardflow API where all possible options to include are described.
Initializing the client and performing an API call is done as follows.
$cardflow = new \Cardflow\Client\CardflowClient('eyJ0eXAi....'); $giftCard = $cardflow->giftCards->get('ABCDABCDABCDABCD');
Retrieve a Gift Card
$giftCard = $cardflow->giftCards->get('ABCDABCDABCDABCD');
Redeem a Gift Card
$transaction = $cardflow->giftCards->redeem( 'ABCDABCDABCDABCD', [ "amount" => 1250, "currency" => "EUR", "capture" => false ] );
Development
Clone the Git repository, so you have a local working copy.
git clone https://github.com/cardflow/cardflow-php
Install required (developing) dependencies using Composer.
composer install
Make sure you follow the PSR12 coding standards.
composer phpstan & composer phpcs
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-31