genuka/pay-sdk
Composer 安装命令:
composer require genuka/pay-sdk
包简介
Server-side PHP SDK for the Genuka Pay API.
README 文档
README
Server-side PHP SDK for the Genuka Pay API.
Do not use this SDK in frontend code. It signs requests with your application secretKey.
Install
composer require genuka/pay-sdk
Usage
use Genuka\Pay\GenukaClient; $genuka = new GenukaClient( publicKey: getenv('GENUKA_PUBLIC_KEY'), secretKey: getenv('GENUKA_SECRET_KEY'), ); $payin = $genuka->payins()->create([ 'amount' => 2000, 'currency' => 'XAF', 'payer_phone' => '+237694010263', 'operator_code' => 'ORANGE_MONEY', 'metadata' => [ 'order_id' => 'ORD-1001', ], ]);
By default, the SDK targets https://staging-api-pay.genuka.com. Pass baseUrl to use another environment.
API
$genuka->payins()->create($payload, idempotencyKey: 'order-1001'); $genuka->payins()->list(['per_page' => 20]); $genuka->payins()->checkStatus('track-xxx'); $genuka->payouts()->create($payload, idempotencyKey: 'payout-1001'); $genuka->payouts()->list(['per_page' => 20]); $genuka->payouts()->get('payout-id'); $genuka->payouts()->cancel('payout-id'); $genuka->checkout()->create($payload); $genuka->checkout()->get('checkout-token');
Phone numbers must be international E.164 style, for example +237694010263, +241..., +235....
Authentication
The SDK signs every request with:
timestamp + HTTP_METHOD + path_with_query + raw_body
Headers sent:
X-Public-Key: pk_live_xxx X-Timestamp: 1778353137 X-Signature: hmac_sha256_hex Content-Type: application/json
Development
composer install
composer test
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-05-10