yumaeda/veritrans
Composer 安装命令:
composer require yumaeda/veritrans
包简介
Make a credit card payment via Veritrans Air-Direct API
README 文档
README
This is PHP wrapper/library for veritrans Air-Direct API.
- This Component is not an official one and only supports Tokens API and Charges API.
- This API is experimental and may be removed anytime without any notice.
- Please do not ask any questions about this API to veritrans.
- The author shall not be held responsible or liable, under any circumstances, for any damages resulting from using this component.
Installation
- Add this require line to your
composer.json:
{
"require": {
"yumaeda/veritrans": "1.0.*"
}
}
composer installon your terminal.
How to Use
<?php
use Yumaeda\Payment\Veritrans\Veritrans;
use Yumaeda\Payment\Veritrans\CreditCard;
$order_id = <Order ID>; // Unique order ID for your veritrans
$client_key = <ClientKey>; // Your veritrans client key
$server_key = <ServerKey>; // Your veritrans server key
$total = <Total in JPY>; // e.g. 9999
$card_number = <CardNumber>; // e.g. '111111111111111'
$cvv = <CVV>; // e.g. '1234'
$expire_month = <Exp Month>; // e.g. 9
$expire_year = <Exp Year>; // e.g. 2022
$veritrans = new Veritrans($client_key, $server_key);
$credit_card = new CreditCard($card_number, $expire_month, $expire_year, $cvv);
$veritrans->setCreditCard($credit_card);
$veritrans->charge($order_id, $total, true);
Testing
Not available
Contributing
Please send a pull request.
Support
Please send an email to yumaeda@gmail.com.
Author
Yukitaka Maeda
Software License
MIT
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-28