hoya/masterpass-bundle
Composer 安装命令:
composer require hoya/masterpass-bundle
包简介
Masterpass Bundle
README 文档
README
This Symfony 2 bundle implements the backend calls for Masterpass V7 checkout - Standard and Express flows. For complete Masterpass docs, refer https://developer.mastercard.com/product/masterpass
Install
Add HoyaMasterpassBundle in your composer.json:
{ "require": { "hoya/masterpass-bundle": "~3.0.0" } }
Register the bundle in your appkernel.php file
return array( // ... new Hoya\MasterpassBundle\HoyaMasterpassBundle(), // ... );
Setup your config.yml file
# app/config/config.yml hoya_masterpass: production_mode: false checkoutidentifier: checkout_id keys: consumerkey: consumer_key_value keystorepath: "%kernel.root_dir%/cert/csr_file.p12" keystorepassword: changeit
Usage
You may follow some sample code here
Handling Errors
Any error which may happen while calling Masterpass APIs throws an Exception. Hence, it is highly recommended to use try / catch block In addition, you can check further details on symfony logs.
try { $payment = $this->get('hoya_masterpass_service')->getPaymentData($callback, '1234'); } catch (\Exception $e) { $this->get('session')->getFlashBag()->add('error', $e->getMessage()); }
Running the Tests
Install the Composer dev dependencies:
php composer.phar install --dev
Then, run the test suite using PHPUnit:
./phpunit
hoya/masterpass-bundle 适用场景与选型建议
hoya/masterpass-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.96k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 08 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「mastercard」 「masterpass」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hoya/masterpass-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hoya/masterpass-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hoya/masterpass-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel >=5.6 integration for the PHP Credit Cards package that allows to perform operations on debit and credit cards like format, validate brand, number and Luhn algorithm.
The bundle for easy using json-rpc api on your project
Mastercard Payment Gateway Service (MPGS) driver for the Omnipay payment processing library
Bundle Symfony DaplosBundle
Mastercard Simplify driver for the Omnipay PHP library
Laravel Blade components for SVG credit card and payment icons
统计信息
- 总下载量: 1.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-07