modulargaming/payment
Composer 安装命令:
composer require modulargaming/payment
包简介
Payment module for Modular Gaming
关键字:
README 文档
README
Payment is a module for Modular Gaming, a modular persistent browser based game framework.
It adds support for processing payments within Modular Gaming, using the Omnipay Library.
Supported Gateways
- PayPal Express Checkout
- PayPal Recurring Payments (Express Checkout)
Requirements
- PHP 5.3.3+
- MySQL
- Composer (Dependency Manager)
Installation
Payment is installed using composer, simply add it as a dependency to your composer.json file:
{ "require": { "modulargaming/payment": "~0.1.0" } }
Rewards
Note: Rewards are only for regular payments NOT Recurring.
The reward system is driver based, this allows you to define multiple rewards for a single package. Currently only Points are supported, however it is quite easy to implement your own driver.
class Payment_Reward_Type extends Payment_Reward { private $_reward; public function __construct($reward) { $this->_reward = $reward; } public function reward(Model_User $user) { // TODO: Write the reward code. } }
Example structure for rewards row in payment_packages table
{ "Points": 200 }
This will give the buyer 200 points.
For examples, check the current drivers, Payment/Reward.
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2013-07-25