paynamicx/paygate-php
Composer 安装命令:
composer require paynamicx/paygate-php
包简介
Paynamics Paygate SDK for PHP
README 文档
README
A PHP library for Paynamics PayGate API
Usage
Initialize Client
Vanilla PHP:
$client = new \CoreProc\Paynamics\Paygate\Client([
'merchant_id' => 'YOUR MERCHANT ID,
'merchant_key' => 'YOUR MERCHANT KEY',
'sandbox' => (true|false),
'sandbox_url' => 'TESTING URL',
'production_url' => 'PRODUCTION URL',
]);
Create Request Body
Please refer to the API Documentation for the request body parameters.
$requestBody = new \CoreProc\Paynamics\Paygate\RequestBody([
'request_id' => substr(uniqid(), 1, 13),
'fname' => 'Paynamics',
'lname' => 'Buyer',
'address1' => '101 Oval St.',
'city' => 'Pasig City',
'state' => 'Metro Manila',
'country' => 'PH',
'zip' => '1600',
'email' => 'buyer@example.com',
'phone' => '+63 123 4567',
'mobile' => '+63 999 123 4567',
'currency' => 'PHP',
'descriptor_note' => 'PayGate Sample Merchant',
'notification_url' => 'http://example.com/notify',
'response_url' => 'http://example.com/success',
'cancel_url' => 'http://example.com/cancel',
'mtac_url' => 'http://example.com/tnc',
'mlogo_url' => 'http://example.com/assets/logo.png',
]);
Create Item Group and add Item
Add item details (name,quantity,amount) one by one using the addItem method.
$items = new \CoreProc\Paynamics\Paygate\ItemGroup;
$items->addItem([
'name' => 'Sample Item',
'quantity' => 1,
'amount' => 100,
]);
Set Item Group to the request body
This will bind the items accordingly to the request body and computes its total amount.
$requestBody->setItemGroup($items);
Execute
All request by the Client will return an auto-submit form in string.
$client->responsivePayment($requestBody);
Laravel Support
- Add Provider to
config/app.php.
CoreProc\Paynamics\Paygate\Laravel\ServiceProvider::class
- Add Facade to
config/app.php.
'Paygate' => CoreProc\Paynamics\Paygate\Laravel\Facades\Paygate::class
-
Execute
php artisan vendor:publish --provider="\CoreProc\Paynamics\Paygate\Laravel\ServiceProvider". -
Add the following to your
.envfile
PAYGATE_MERCHANT_ID=<YOUR MERCHANT ID>
PAYGATE_MERCHANT_KEY=<YOUR MERCHANT KEY>
PAYGATE_SANDBOX=<TRUE|FALSE>
PAYGATE_SANDBOX_URL=<PAYNAMICS_TESTING_URL>
PAYGATE_PRODUCTION_URL=<PAYNAMICS_PRODUCTION_URL>
paynamicx/paygate-php 适用场景与选型建议
paynamicx/paygate-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 08 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「payment」 「laravel」 「paygate」 「paynamics」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 paynamicx/paygate-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 paynamicx/paygate-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 paynamicx/paygate-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
Laravel package for Accurate Online API integration.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
TrinkPOS Sanal POS (Virtual POS) API client for PHP
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-08-14