asanzred/ideal

Laravel 5 的 iDeal PSP 提供商包装器

该软件包的官方仓库似乎已不存在,因此该软件包已被冻结。

v1.0.0 2020-08-10 14:40 UTC

This package is auto-updated.

Last update: 2022-06-16 22:48:29 UTC


README

Latest Version on Packagist Software License Total Downloads

安装

通过 Composer

$ composer require smallworldfs/ideal

在您的 app.php 配置文件中添加 ServiceProvider。

// config/app.php
'providers' => [
    ...
    Smallworldfs\Ideal\IdealServiceProvider::class,
]

配置

运行以下命令以发布配置

    php artisan config:publish smallworldfs/ideal

使用方法

您可以在 IdealController.php 和 routes.php 中找到基本路由和调用

use Smallworldfs\Ideal\Libraries\Bs\IDeal\IDeal;

$ideal = new IDeal(Config::get('ideal.provider_url'));

// The full path to the acquirer certificate. This certificate is provided by your iDeal provider and
// must be downloaded from the merchant environment. Testing and production have different certificates.
$ideal->setAcquirerCertificate(Config::get('ideal.acquirer_cert'), true);

// Your merchant ID as specified in the merchant environment.
// Testing and production each have a different merchant ID.
$ideal->setMerchant(Config::get('ideal.merchant_id'));

// The full path to your merchant certificate.
$ideal->setMerchantCertificate(Config::get('ideal.merchant_cert'), true);

// The full path to your private key.
$ideal->setMerchantPrivateKey(Config::get('ideal.merchant_priv_key'), Config::get('ideal.merchant_priv_key_passwd'), true);

// Start a transaction request, amount in cents.
$transactionRequest = $ideal->createTransactionRequest(Config::get('ideal.merchant_issuer'), 
                                                       Config::get('ideal.merchant_return_url'), 
                                                       'purchaseId', 
                                                       1999, 
                                                       'Description');

$transactionResponse = $transactionRequest->send();

变更日志

有关最近变更的更多信息,请参阅 CHANGELOG

测试

$ composer test

贡献

请参阅 CONTRIBUTINGCONDUCT 以获取详细信息。

安全

如果您发现任何与安全相关的问题,请通过电子邮件 smallworldfs@gmail.com 联系,而不是使用问题跟踪器。

致谢

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件