realexpayments/rxp-hpp-php
最新稳定版本:v1.1.3
Composer 安装命令:
composer require realexpayments/rxp-hpp-php
包简介
SDK to send requests and parse responses from Realex Payments using HPP
README 文档
README
We've moved. We highly recommend you use the Global Payments PHP SDK which supports all the features of this SDK and will benefit from all future releases: https://github.com/globalpayments/php-sdk
With the latest update (1.1.3) this SDK supports the mandatory and recommended HPP fields for 3D Secure 2. Going forward it will only receive critical security updates, no further feature updates will be released beyond 3D Secure 2.
Realex Payments HPP PHP SDK
You can sign up for a Global Payments (formerly Realex Payments) account at https://developer.globalpay.com
Requirements
- PHP >= 5.3.9
- For security and support we highly recommend you use PHP 7
- Composer (https://getcomposer.org/)
Instructions
-
Add the following to your 'composer.json' file
{ "require": { "realexpayments/rxp-hpp-php": "1.1.3" } } -
Inside the application directory run composer:
composer updateOR (depending on your server configuration)
php composer.phar update -
Add a reference to the autoloader class anywhere you need to use the sdk
require_once ('vendor/autoload.php');
-
Use the sdk
$hppRequest = new HppRequest(); $hppRequest->addMerchantId("MerchantId"); $hppRequest->addAccount("internet"); ....
Usage
Creating HPP Request JSON for Realex Payments JS Library
<?php require_once ('vendor/autoload.php'); use com\realexpayments\hpp\sdk\domain\HppRequest; use com\realexpayments\hpp\sdk\RealexHpp; use com\realexpayments\hpp\sdk\RealexValidationException; use com\realexpayments\hpp\sdk\RealexException; $hppRequest = new HppRequest(); $hppRequest->addMerchantId("MerchantId"); $hppRequest->addAccount("internet"); $hppRequest->addAmount("1001"); $hppRequest->addCurrency("EUR"); $hppRequest->addAutoSettleFlag(TRUE); $hppRequest->addHppVersion("2"); // 3D Secure 2 Mandatory and Recommended Fields $hppRequest->addCustomerEmailAddress("james.mason@example.com"); $hppRequest->addCustomerMobilePhoneNumber("44|07123456789"); $hppRequest->addBillingAddressLine1("Flat 123"); $hppRequest->addBillingAddressLine2("House 456"); $hppRequest->addBillingAddressLine3("Unit 4"); $hppRequest->addBillingCity("Halifax"); $hppRequest->addBillingPostalCode("W5 9HR"); $hppRequest->addBillingCountryCode("826"); $hppRequest->addShippingAddressLine1("Apartment 825"); $hppRequest->addShippingAddressLine2("Complex 741"); $hppRequest->addShippingAddressLine3("House 963"); $hppRequest->addShippingCity("Chicago"); $hppRequest->addShippingState("IL"); $hppRequest->addShippingPostalCode("50001"); $hppRequest->addShippingCountryCode("840"); $realexHpp = new RealexHpp("Shared Secret"); try { $requestJson = $realexHpp->requestToJson($hppRequest, false); // TODO: pass the HPP request JSON to the JavaScript, iOS or Android Library } catch (RealexValidationException $e) { // TODO: Add your error handling here } catch (RealexException $e) { // TODO: Add your error handling here }
Consuming Response JSON from Realex Payments JS Library
<?php require_once ('vendor/autoload.php'); use com\realexpayments\hpp\sdk\domain\HppResponse; use com\realexpayments\hpp\sdk\RealexHpp; $realexHpp = new RealexHpp("mySecret"); $hppResponse = $realexHpp->responseFromJson(responseJson);
License
See the LICENSE file.
realexpayments/rxp-hpp-php 适用场景与选型建议
realexpayments/rxp-hpp-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 112.81k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payments」 「realex」 「HPP」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 realexpayments/rxp-hpp-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 realexpayments/rxp-hpp-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 realexpayments/rxp-hpp-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
SDK to send requests and parse responses from Realex Payments using Remote
Realex driver with 3D Secure & refund support for Omnipay payment processing library
Aktive-Merchant provides a common interface to process payments using multiple gateways.
Realex driver with 3D Secure & refund support for Omnipay payment processing library
Realex driver with 3D Secure & refund support for Omnipay payment processing library
Dealing with payments through the Egyptian payment gateway PayMob
统计信息
- 总下载量: 112.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04