payrexx/omnipay-payrexx
最新稳定版本:v1.2
Composer 安装命令:
composer require payrexx/omnipay-payrexx
包简介
Payrexx driver for the Omnipay payment processing library
README 文档
README
Payrexx driver for the Omnipay PHP payment processing library
Payrexx is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Payrexx support for Omnipay.
Maintenance Notice This repository is currently not actively maintained. However, community contributions such as bug reports, feature requests, and pull requests are very welcome!
Installation
Payrexx is installed via Composer. To install, simply require league/omnipay and payrexx/omnipay with Composer:
composer require league/omnipay payrexx/omnipay-payrexx
Basic Usage
The following gateways are provided by this package:
- Payrexx
For general usage instructions, please see the main Omnipay repository.
Basic purchase and refund example
require __DIR__ . '/vendor/autoload.php'; use Omnipay\Omnipay; $gateway = Omnipay::create('Payrexx'); $gateway->setApiKey('API_KEY'); // You find the API key in your Payrexx merchant backend $gateway->setInstance('INSTANCE'); // That's your Payrexx instance name (INSTANCE.payrexx.com) // Let's create a Payrexx gateway $response = $gateway->purchase([ 'amount' => '100', // CHF 100.00 'currency' => 'CHF', 'psp' => 36, // Payrexx Direct 'skipResultPage' => true, 'successRedirectUrl' => 'https://www.merchant-website.com/success', 'failedRedirectUrl' => 'https://www.merchant-website.com/failed', ])->send(); // A Payrexx gateway is always a redirect if ($response->isRedirect()) { // Redirect URL to Payrexx gateway var_dump($response->getRedirectUrl()); $response->redirect(); } // That will be the Payrexx gateway ID var_dump($response->getTransactionReference()); // Check if Payrexx gateway has been paid $response = $gateway->completePurchase([ 'transactionReference' => $response->getTransactionReference(), ])->send(); // If Payrexx gateway has been paid, we will get a transaction reference (Payrexx transaction ID) if ($response->getTransactionReference()) { // Optional: Fetch the corresponding transaction data => $response->getData() $response = $gateway->fetchTransaction([ 'transactionReference' => $response->getTransactionReference(), ])->send(); // Let's refund CHF 50.00 (PSP has to support refunds => Payrexx Direct supports refunds) $response = $gateway->refund([ 'transactionReference' => $response->getTransactionReference(), // That's the Payrexx transaction ID as well 'amount' => 50, // CHF 50.00 ])->send(); if ($response->isSuccessful()) { echo 'Refund was successful'; } }
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it to integration@payrexx.com, or better yet, fork the library and submit a pull request.
payrexx/omnipay-payrexx 适用场景与选型建议
payrexx/omnipay-payrexx 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 790 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 07 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payment」 「pay」 「gateway」 「merchant」 「omnipay」 「payrexx」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 payrexx/omnipay-payrexx 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 payrexx/omnipay-payrexx 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 payrexx/omnipay-payrexx 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
Payyo Gateway for the Omnipay payment processing library
Библиотека для приема платежей через Альфабанк.
Some pre-defined rules for validation in Omnipay payment processing library.
BluePay gateway for the Omnipay payment processing library
支付宝接口扩展包
统计信息
- 总下载量: 790
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 15
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-10