thanhvo-cse/worldpay
Composer 安装命令:
composer require thanhvo-cse/worldpay
包简介
PHP Library for Worldpay API
README 文档
README
Connect to the Worldpay API.
Installation
Composer
composer require thanhvo-cse/worldpay
Event
- Define your observer:
use ThanhVo\Worldpay\WPG\Client; class BeforeRequestListener implements ThanhVo\Worldpay\Event\ObserverInterface { /** * @return string */ public function getSubject(): string { return Client::EVENT_BEFORE_REQUEST; } /** * @param $data * @return mixed */ public function onEvent($data) { // Handle your Observer here var_dump($data); } }
- Add your observer
$hosted = new \ThanhVo\Worldpay\WPG\Service\Hosted(); $beforeObserver = new BeforeRequestListener(); $hosted->addEventObserver($beforeObserver); ...
Event list
- before_request
- after_response
Documentation
https://developer.worldpay.com/docs/wpg
Sample
The sample is located in sample directory. Please find the readme file in there.
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-24