mohsen-nurisa/perfectmoney-laravel
Composer 安装命令:
composer require mohsen-nurisa/perfectmoney-laravel
包简介
perfectmoney api wrapper for Laravel
关键字:
README 文档
README
A wrapper on perfect-money's API
Installation:
composer require mohsen-nurisa/perfectmoney-laravel
Usage: After installaion, execute the line below to publish the ServiceProvider and create necessary tables:
php artisan vendor:publish
php artisan migrate
After publishing the provider, you will need to except the following route in your VerifyCsrfToken middleware:
'/pm/status',
'/pm/payment',
'/pm/nopayment',
'/redeem'
In order to use perfectmoney payment gateway, put following lines in .env file and fill them with the informations from your own account:
PM_PAYEE_ACCOUNT=
ALTERNATIVE_PASSPHRASE=
And to use perfectmoney e-voucher redeem, put following lines in .env file and fill them with the informations from your own account:
PM_ACCOUNT_ID=
PM_ACCOUNT_PASSWORD=
To start perfectmoney payment, add following to you code:
use Package\Perfectmoney\Facades\Perfectmoney;
Then you can initiate transfere using line below:
Perfectmoney::sell($params);
The $params variable must contain the following parameters:
'payment_amount' => the amount of payment,
'payment_units' => The fiat that you want to use, ex:USD
Then attach the form inside 'data' index of the response into your then submit the form. Two callback functions are required to be set in perfectmoney.php file inside config directory. Follow the example below:
'pm_success_callback' => 'App\Http\Controllers\PerfectmoneyController::success', // callback function for successfull transfer
'pm_fail_callback' => 'App\Http\Controllers\PerfectmoneyController::fail', // callback function unsuccessfull transfer
'pm_fail_status' => 'App\Http\Controllers\PerfectmoneyController::status', // callback function to handle order status after successfull transfer
the 'success' and 'fail' methods must be static.
To redeem e-voucher use following line:
Perfectmoney::redeemVoucher($params);
$params variable must contain following argumants:
'vpm_voucher' => the voucher
'vpm_activation_code' => The activation code
Note: To use this wrapper, you first need to enable API in your perfectmoney account. Also you will need to set an Alternative Passphrase.
License The MIT License (MIT). Please see License File for more information.
mohsen-nurisa/perfectmoney-laravel 适用场景与选型建议
mohsen-nurisa/perfectmoney-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 52 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 10 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「perfectmoney」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mohsen-nurisa/perfectmoney-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mohsen-nurisa/perfectmoney-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mohsen-nurisa/perfectmoney-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Package for Perfect Money Payments
PerfectMoney component for Yii2
The Payum extension. It provides Perfectmoney payment integration.
Perfect Money gateway for Omnipay payment processing library
PHP PerfectMoney integration for Laravel
Perfect Money gateway for Omnipay payment processing library
统计信息
- 总下载量: 52
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-04