cloudcogsio / omnipay-powertranz-3ds2-gateway
Powertranz 3DS2 Payment Gateway Driver for Omnipay
Requires
- php: 8.*
- ext-json: *
- alcohol/iso4217: ^4.2
- brick/math: ^0.10.2
- league/iso3166: ^4.3
- nyholm/psr7: ^1.8
- omnipay/common: ^3.4
- php-http/httplug: ^2.4
- ramsey/uuid: ^4.9
- symfony/http-client: ^5.4
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-09-06 04:35:06 UTC
README
A PHP library that provides a PowerTranz 3DS2 Payment Gateway Driver for the Omnipay payment processing library.
Overview
This package implements the PowerTranz payment gateway for the Omnipay payment processing library, with support for 3D Secure 2.0 (3DS2) transactions.
Requirements
- PHP 8.x
- ext-json
Installation
Install the package via Composer:
composer require cloudcogsio/omnipay-powertranz-3ds2-gateway
Usage
The package follows the Omnipay standard usage pattern:
use Omnipay\PowerTranz\Gateway; // Initialize the gateway $gateway = new Gateway(); $gateway->setMerchantId('your-merchant-id'); $gateway->setApiKey('your-api-key'); $gateway->setTestMode(true); // Set to false for production // Process a payment $response = $gateway->purchase([ 'amount' => '10.00', 'currency' => 'USD', 'card' => $cardDetails, // Additional parameters... ])->send(); if ($response->isSuccessful()) { // Payment was successful $transactionReference = $response->getTransactionReference(); // Process the successful payment... } elseif ($response->isRedirect()) { // Redirect to 3D Secure $response->redirect(); } else { // Payment failed $errorMessage = $response->getMessage(); // Handle the error... }
Supported Methods
The gateway supports the following transaction types:
authorize()
- Authorize a paymentcapture()
- Capture a previously authorized paymentpurchase()
- Authorize and capture a payment in one steprefund()
- Refund a previously captured paymentvoid()
- Void a previously authorized paymentcompletePurchase()
- Complete a 3D Secure purchase
Project Structure
Main Components
Gateway.php
- The main gateway class that handles transaction requestsMessage/
- Request and response message handlingRequest/
- Transaction request implementationsResponse/
- Transaction response implementations
Schema/
- Data models and validation- Various schema classes for different data structures
- 3D Secure related schemas
Support/
- Helper classes and utilities
Testing
The package includes a basic test suite. See the tests/README.md file for more information on running tests.
composer install vendor/bin/phpunit
Versioning
This package follows Semantic Versioning.
- MAJOR version for incompatible API changes
- MINOR version for new functionality in a backward compatible manner
- PATCH version for backward compatible bug fixes
For a full list of changes, see the CHANGELOG.md file.
License
This package is released under the MIT License. See the LICENSE.md file for details.