Download the PHP package academe/elavon-epg-psr7 without Composer
On this page you can find all versions of the php package academe/elavon-epg-psr7. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package elavon-epg-psr7
Elavon EPG PSR-7
PSR-7 HTTP messages and Data Transfer Object (DTO) classes for the Elavon Payment Gateway (EPG) API.
The API is described here and the OpenAPI description is here
Table of Contents
- Overview
- Get an Elavon Merchant Account
- Requirements
- Installation
- Quick Start
- Using DTOs (fromData)
- Using Value Objects (Type-Safe)
- Paginated Lists with QueryParams
- Features
- API Endpoints
- Development
- License
- Contributing
- Namespace
Overview
This package provides strongly-typed PHP classes for interacting with the Elavon Payment Gateway API. It includes:
- PSR-7 compliant HTTP message implementations
- DTO classes for request and response data structures
- Type-safe value objects for payment data
- Support for all EPG API resources and operations
This package handles message construction and serialization. A separate HTTP client package will handle the actual sending of requests.
Get an Elavon Merchant Account
[!TIP] Don't have an Elavon merchant account yet? Sign up here to get started. Elavon's team will contact you within 24-48 hours to discuss your payment processing needs.
Requirements
- PHP 8.1 or higher
- An Elavon merchant account with API credentials
- PSR-7 HTTP Message implementation (or use built-in message factory)
- PSR-17 HTTP Factory implementation (or user built-in factory)
Installation
Quick Start
Here's a complete example creating a credit card payment using Guzzle:
Using DTOs (fromData)
You can create DTOs explicitly from array data using fromData():
Using Value Objects (Type-Safe)
For full type safety, construct DTOs with typed value objects:
Paginated Lists with QueryParams
Many API endpoints return paginated lists of resources. The QueryParams class provides a fluent interface for pagination and filtering:
QueryParams Methods
| Method | Description |
|---|---|
QueryParams::create() |
Create an empty QueryParams instance |
withPageToken(?string $token) |
Set the pagination token for the next page |
withLimit(?int $limit) |
Set page size (1-200, throws exception if out of range) |
withFilter(string $field, QueryFilterOperator $operator, string $value) |
Add a filter condition |
isEmpty() |
Check if any parameters are set |
apply(UriInterface $uri) |
Apply parameters to a PSR-7 URI |
Filtering
The Elavon API supports filtering on list endpoints. Use withFilter() with the QueryFilterOperator enum to add filter conditions:
Available filter operators (QueryFilterOperator enum):
| Enum Case | Value | Description |
|---|---|---|
EQ |
eq |
Equals |
NE |
ne |
Not equals |
GT |
gt |
Greater than |
GE |
ge |
Greater than or equal |
LT |
lt |
Less than |
LE |
le |
Less than or equal |
LIKE |
like |
Like pattern |
IN |
in |
In list |
CONTAINS |
contains |
Contains |
IS |
is |
Is (for null checks) |
IS_NOT |
isnot |
Is not (for null checks) |
Note: Available filters vary by endpoint. See the Elavon API documentation for endpoint-specific filters.
Response Pagination Properties
| Property | Description |
|---|---|
$response->nextPageToken |
Token for the next page (use with withPageToken()) |
$response->nextPage |
Full URL for the next page |
$response->firstPage |
Full URL to return to the first page |
$response->hasMorePages() |
Returns true if more pages are available |
List Requests Supporting QueryParams
The following request classes accept a QueryParams parameter:
Top-level resources:
RetrieveAccountListRequest→ GET /accountsRetrieveBatchListRequest→ GET /batchesRetrieveHostedCardListRequest→ GET /hosted-cardsRetrieveManualBatchListRequest→ GET /manual-batchesRetrieveMerchantListRequest→ GET /merchantsRetrieveNotificationListRequest→ GET /notificationsRetrieveOrderListRequest→ GET /ordersRetrievePaymentLinkEventListRequest→ GET /payment-link-eventsRetrievePaymentLinkListRequest→ GET /payment-linksRetrievePaymentMethodLinkListRequest→ GET /payment-method-linksRetrievePlanListListRequest→ GET /plan-listsRetrieveProcessorAccountListRequest→ GET /processor-accountsRetrieveShopperListRequest→ GET /shoppersRetrieveStoredAchPaymentListRequest→ GET /stored-ach-paymentsRetrieveStoredCardListRequest→ GET /stored-cardsRetrieveTerminalListRequest→ GET /terminalsRetrieveTransactionListRequest→ GET /transactions
Nested resources (require parent ID + QueryParams):
RetrieveEmvKeyListRequest→ GET /terminals/{id}/emv-keysRetrievePaymentLinkEventListRequest→ GET /payment-links/{id}/eventsRetrieveProvisioningCodeListRequest→ GET /terminals/{id}/provisioning-codesRetrieveShopperStoredCardsRequest→ GET /shoppers/{id}/stored-cardsRetrieveTotalAdjustmentListRequest→ GET /transactions/{id}/total-adjustments
See docs/examples/ for more examples.
Features
Based on the Elavon Payment Gateway API version 2025-10-01, this package supports:
Resources
- Merchants
- Processor Accounts
- Terminals
- Accounts
- Orders
- Payment Links & Payment Link Events
- Payment Sessions
- Payment Method Links & Payment Method Sessions
- Apple Pay Payment Sessions
- Hosted Cards & Hosted ACH Payments
- HSM Cards
- Forex Advices
- Transactions
- Apple Pay, Google Pay, and Paze Payments
- Surcharge & Refund Surcharge Advices
- Batches & Manual Batches
- Shoppers
- Stored Cards & Stored ACH Payments
- Plans & Subscriptions
- Notifications
- Total Adjustments
API Endpoints
The Elavon Payment Gateway API base URLs:
- EU Sandbox:
https://uat.api.converge.eu.elavonaws.com - EU Production:
https://api.eu.convergepay.com - US Sandbox:
https://uat.api.convergepay.com - US Production:
https://api.convergepay.com
Development
Testing
Code Quality
License
MIT License. See LICENSE file for details.
Contributing
Contributions are welcome. Please ensure all tests pass and code follows PSR-12 coding standards.
Namespace
All classes are under the Academe\Elavon\Epg\Psr7\ namespace.
All versions of elavon-epg-psr7 with dependencies
league/iso3166 Version ^4.3
moneyphp/money Version ^4.8
psr/http-factory Version ^1.0
psr/http-message Version ^1.0|^2.0