digipay-payment/paylink
最新稳定版本:v1.0.0
Composer 安装命令:
composer require digipay-payment/paylink
包简介
A package to handle payments via Digipay Africa API
README 文档
README
This package provides a simple way to handle payments via the Digipay Africa API.
Installation
composer require digipay-payment/paylink:^1.0
Exemple de code
<?php
require __DIR__ . '/vendor/autoload.php';
use PayLink\DigipayPayment\DigipayPayment;
use PayLink\DigipayPayment\Exceptions\PaymentException;
$merchant = '************';
$basicAuth = base64_encode("**********************************");
$secretKey = "vomFB0EdVbdgf4Q";
$cbkUrl = "https://www.your_website.xxx/url-callback";
$webCbkUrl = "https://www.your_website.xxx/page_show_notification";
$currency = 'XOF';
$country = 225;
$amount = 1000;
try {
$payment = new DigipayPayment($merchant, $basicAuth, $secretKey, $country, $currency, $cbkUrl, $webCbkUrl);
$redirectUrl = $payment->createPaymentLink($amount, 'John Doe');
header('Location: ' . $redirectUrl);
} catch (PaymentException $e) {
echo "Erreur de paiement : " . $e->getMessage();
}
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-11