stojankukrika/paxum-payment
Composer 安装命令:
composer require stojankukrika/paxum-payment
包简介
A paxum payment package to integrate into application
README 文档
README
You can support me to this project and make some donation.
Installation
You can install the package via composer:
composer require stojankukrika/paxum-payment
If you are using Laravel in a version < 5.5, the service provider must be registered as a next step:
// config/app.php 'providers' => [ ... stojankukrika\PaxumPayment\PaxumPaymentServiceProvider ];
and add in aliases
// config/app.php 'aliases' => [ ... 'Paxum' => \stojankukrika\PaxumPayment\Facades\PaxumPayment::class ];
After that run migration to make payment table to log payments
$ php artisan migrate
Configuration
Add in your .env file variables:
- PAXUM_EMAIL
- PAXUM_SHARED_SECRET
- PAXUM_SANDBOX
set it values from paxum.com and publish this provider using:
$ php artisan vendor:publish --provider=stojankukrika\PaxumPayment\PaxumPaymentServiceProvider
Important note
Before testing Payment API Code Sample do not forget to do the following from Merchant Services >> API Settings:
- Enable API
- Enable API methods you want to use
- Add your IP address to "Allowed IPs" list
- "Generate New Shared Secret", if you didn't already received it by email during API activation
- PAXUM_SANDBOX is true if it's test and if is production then set it to false
###Usage Firstable you initialize PaxumPayment class then call some method, like this:
$paxum = new PaxumPayment();
$response = $paxum->transferFunds('email@example.com',50,'USD');
Here you can find all function list and how to call each of them Paxum apiFunctionList.
All requests returns string xml which you can easy parse using:
$xml = simplexml_load_string($response);
Then you will get SimpleXMLElement which is Object and you can get his properties and work with them.
Changelog
- 2.1 - version who work with CURL
- 2.0 - version with tracking response code and return string xml as response
- 1.0 - initial version
License
The MIT License (MIT). Please see License File for more information.
stojankukrika/paxum-payment 适用场景与选型建议
stojankukrika/paxum-payment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 291 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 11 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stojankukrika/paxum-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stojankukrika/paxum-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 291
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-27