crabstudio/baokim
Composer 安装命令:
composer require crabstudio/baokim
包简介
BaoKim payment gateway plugin for CakePHP 3.x
README 文档
README
CakePHP 3.x: BaoKim payment gateway plugin
[Donate] Buy me a cup of coffee
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require crabstudio/baokim
Or add the following lines to your application's composer.json:
"require": {
"crabstudio/baokim": "^1.0"
}
followed by the command:
composer update
Load plugin
Add this line to Your_project\config\bootstrap.php
Plugin::load('Crabstudio/BaoKim', ['bootstrap' => true]);
Or from command line:
bin/cake plugin load crabstudio/baokim
Configure
Write to your configure:
$baokim = [
'BaoKim' => [
'merchant_id' => 'your_merchant_id',
'secure_pass' => 'your_secret',
'business' => 'your_business_email@example.com'
]
];
Cake\Core\Configure::write($baokim);
Usage
Apply in your controller
public function checkout() {
$this->loadComponent('Crabstudio/BaoKim.BaoKim');
//your checkout logic here
//$url_success route to checkoutSuccessfull function
//$url_cancel route to checkoutCancel function
$redirect_url = $this->BaoKim->createRequestUrl($order_id, $total_amount, $shipping_fee, $tax_fee, $order_description, $url_success, $url_cancel, $url_detail);
return $this->redirect($redirect_url);
}
public function checkoutSuccessfull() {
$this->request->allowMethod('get');
$this->loadComponent('Crabstudio/BaoKim.BaoKim');
$isValid = $this->BaoKim->verifyResponseUrl($this->request);
if($isValid) {
//Valid logic here
}
//Invalid logic here
}
public function checkoutCancel() {
//Cancel logic here
}
crabstudio/baokim 适用场景与选型建议
crabstudio/baokim 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「search」 「payment gateway」 「cakephp3」 「cake3」 「crabstudio」 「anhtuank7c」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 crabstudio/baokim 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crabstudio/baokim 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 crabstudio/baokim 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
A Laravel package to retrieve data from Google Search Console
Payyo Gateway for the Omnipay payment processing library
Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.
Abstraction Layer to index and search entities
Pimcore 10.x Website Indexer (powered by Zend Search Lucene)
统计信息
- 总下载量: 51
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-22