ravols/everifin-sdk-php
Composer 安装命令:
composer require ravols/everifin-sdk-php
包简介
PHP sdk for Everifin payment gateway.
README 文档
README
This package is a clean SDK for PHP implementation of Everifin Payment Gateway. By using this package you can create new payments, redirects to gateway and process payments in no time.
Installation
You can install the package via composer:
composer require ravols/everifin-sdk-php
Usage
There are multiple modules each representing a domain of services that everifin provides. Let's say you want the most wanted things, which is to create a new order and get a redirect url which will take your customer to Everifin payment gateway, so that you customer can pay for your order.
First of all we need to setup a Config object.
Config::getInstance()->setClientId('your-client-id')->setClientSecret('your-client-secret')->setClientIban('your-recipient-iban');
This config needs to be setup only once, as it is accessible as a singleton throughout your application lifecycle.
Lets create new everifin order in order to get our payment redirect url.
$everifinOrderModule = new EverifinOrders; //Represents Everifin Order domain $createOrderRequest = new CreatePaymentRequest( instructionId: '',//if not filled, auto generated by everifin amount: 120.99, //float or int currency: 'EUR', //Need to be standard currency code redirectUrl: 'your-redirect-url', //where customer will land after payment / cancelling the payment on everifin recipientIban: Config::getInstance()->getClientIban(), senderBankId: 'fkbaredn', recipientBankBic: 'uncrskbx', variableSymbol: 'variable-symbol', //order number for example, there is a lenght limitation though constantSymbol: '0308', specificSymbol: '0000000003', paymentMessage: 'message-if-you-want', externalId: 'ext4123', senderEmail:'customer-email', ); //This response data contain much more than just the link, for this example we are just interested in the redirect link $createOrderPaymentResponseData = $everifinOrderModule->createOrderPaymentResponse(createPaymentRequest:$createOrderRequest); $url = $createOrderPaymentResponseData->link; //Your logic follows with the link - redirect, send via email etc.
Great! So now we have our link and let's simulate that we want to process this payment once your customer pays or cancels the payment.
//Depending how you build your Config class you may or may not build it again, for this example we start from scratch Config::getInstance()->setClientId('your-client-id')->setClientSecret('your-client-secret')->setClientIban('your-recipient-iban'); //Lets get details about the payment $everifinPayment = new EverifinPayments; //The order id is send to you as a request GET paramter to the redirect url specified in the redirectUrl parameter when creating an order $responseData = $everifinPayment->getPayment(paymentId: 'f459c0b7-949e-4266-854d-8f451d5e3c68'); //returns GetPaymentResponse object $statusOfPayment = $responseData->status; //BOOKED, or other status which can be found in the official everifin docs //Your logic depending on the status follows here - process order, cancel order etc.
List of statuses and more information about everifin API can be found in their documentation
Credits
License
The MIT License (MIT). Please see License File for more information.
ravols/everifin-sdk-php 适用场景与选型建议
ravols/everifin-sdk-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 155 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「Ravols」 「everifin-sdk-php」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ravols/everifin-sdk-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ravols/everifin-sdk-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ravols/everifin-sdk-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This is my package socialite-seznam-driver
Alfabank REST API integration
This is my package laravel-everifin
This is my package elastic-insight
LaraLogsToolkit is a package that allows you to analyze your logs and get the count of errors, info and warnings.
Laravel package for Accurate Online API integration.
统计信息
- 总下载量: 155
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 7
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-17