Download the PHP package globalpayments/php-sdk without Composer
On this page you can find all versions of the php package globalpayments/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download globalpayments/php-sdk
More information about globalpayments/php-sdk
Files in globalpayments/php-sdk
Package php-sdk
Short Description PHP SDK for processing payments with Global Payments, including Heartland Payment Systems and Realex Payments
License GPL-2.0-or-later
Homepage https://developer.heartlandpaymentsystems.com/documentation
Informations about the package php-sdk
GlobalPayments PHP SDK
This SDK makes it easy to integrate your PHP application with our Card Not Present and Card Present APIs.
Solutions
General / Omnichannel
- API Payment Processing
- Apple Pay & Google Pay
- Secure Card Storage & Customer Management
- Subscriptions / Recurring Billing Solutions
- Credit, Debit, Gift & Loyalty, and eCheck/ACH
Card Not Present (Ecommerce & MOTO) Specific
- Minimize PCI compliance requirements with Hosted Payment Solutions
- 140+ Authorization Currencies & 16 Settlement Currencies
- 150+ Local Payment Methods Worldwide
- Account Updater
- Inbuilt Fraud Prevention Rules
- 3D Secure, AVS and CVV Checks
- 260+ Global Enterprise Fraud Rules
Card Present (Terminal & POS) Specific
- Secure End-To-End Encryption
Requirements
- PHP 8.0.0+
- OpenSSL 1.0.1+
- PHP Curl extension
- PHP DOM extension
- PHP OpenSSL extension
Installation
Installing the SDK into your solution is usually be done by either using Composer/Packagist, or by adding the project to your solution and referencing it directly.
To install via Composer/Packagist:
To install via a direct download:
Download and unzip or, using Git, clone the repository from GitHub. See more on how to clone repositories.
Documentation and Examples
You can find the latest SDK documentation along with code examples and test cards on the GlobalPayments and GlobalPayments Developer Hubs.
In addition you can find working examples in the our example code repository.
Quick Tip: The included test suite can be a great source of code samples for using the SDK!
Process a Payment Example
GP-API Access Token
The SDK supports creating GP-API access tokens with full control over token configuration and complete response field mapping.
Generate an Access Token
GP-API 3DS Authentication Flow
The SDK supports the GP-API authentication /ucp/authentications.
Endpoint Sequence Covered
Flow 1 (create + initiate):
POST /ucp/authenticationsPOST /ucp/authentications/{id}/initiate
Flow 2 (list + result + single):
GET /ucp/authenticationsGET /ucp/authentications/{id}/resultGET /ucp/authentications/{id}
Account and Permission Notes
- Use an account with authentication permissions (for example account name
transaction_processing). - Required permissions typically include
AUT_GET_List,AUT_GET_Single,AUT_POST_Initiate, andAUT_POST_Results. - If permissions are missing, sandbox may return authorization errors such as
ACTION_NOT_AUTHORIZED.
Integration Test Coverage
Authentication endpoint coverage is validated in integration tests:
test/Integration/Gateways/GpApiConnector/GpApi3DSecureTest.phptest/Integration/Gateways/GpApiConnector/GpApi3DS2Test.php
Run focused authentication tests:
Available Request Fields
| Field | Type | Description |
|---|---|---|
appId |
string | Application identifier (required) |
appKey |
string | Application key (required) |
secondsToExpire |
int | Token TTL in seconds (60–604800) |
intervalToExpire |
string | Token TTL as interval (WEEK, DAY, 1_HOUR, etc.) |
permissions |
array | Permission strings to scope the token |
restrictedToken |
bool | When true, masks account info in the response |
Available Response Fields
GP-API Account Sync
The GP-API account reporting and edit flows now surface the full account list/detail envelope, including merchant context, paging metadata, and action metadata.
Supported account flows covered by this story:
GET /accountsGET /accounts/{id}PATCH /accounts/{id}GET /merchants/{MER_id}/accounts/{FMA_id}
Newly surfaced request and response fields include:
card_replacement_reasonnotifications.status_urlprocessing_limitscapabilitiesstatus_change_reasonmerchant_idmerchant_nametime_createdtime_last_updatedemail_idaction
Implementation and coverage references:
- test/Integration/Gateways/GpApiConnector/GpApiMerchantAccountsTest.php
- gpapi-accounts-sync-report.html
Test Card Data
| Name | Number | Exp Month | Exp Year | CVN |
|---|---|---|---|---|
| Visa | 4263970000005262 | 12 | 2025 | 123 |
| MasterCard | 2223000010005780 | 12 | 2019 | 900 |
| MasterCard | 5425230000004415 | 12 | 2025 | 123 |
| Discover | 6011000000000087 | 12 | 2025 | 123 |
| Amex | 374101000000608 | 12 | 2025 | 1234 |
| JCB | 3566000000000000 | 12 | 2025 | 123 |
| Diners Club | 36256000000725 | 12 | 2025 | 123 |
Testing Exceptions
During your integration you will want to test for specific issuer responses such as 'Card Declined'. Because our sandbox environments do not actually reach out to issuing banks for authorizations, there are specific transaction amounts and/or card numbers that will trigger gateway and issuing bank responses. Please contact your support representative for a complete listing of values used to simulate transaction AVS/CVV results, declines, errors, and other responses that can be caught in your code. Example error handling code:
GP-API Actions Reporting Example
Contributing
All our code is open sourced and we encourage fellow developers to contribute and help improve it!
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Ensure SDK tests are passing
- Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
License
This project is licensed under the GNU General Public License v2.0. Please see LICENSE.md located at the project's root for more details.
All versions of php-sdk with dependencies
ext-curl Version *
ext-dom Version *
ext-openssl Version *
ext-json Version *
ext-zlib Version *
ext-intl Version *
ext-mbstring Version *
ext-fileinfo Version *