cloudcogsio/omnipay-powertranz-3ds2-gateway 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cloudcogsio/omnipay-powertranz-3ds2-gateway

最新稳定版本:v1.0.0

Composer 安装命令:

composer require cloudcogsio/omnipay-powertranz-3ds2-gateway

包简介

Powertranz 3DS2 Payment Gateway Driver for Omnipay

README 文档

README

A PHP library that provides a PowerTranz 3DS2 Payment Gateway Driver for the Omnipay payment processing library.

Latest Version License

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 payment
  • capture() - Capture a previously authorized payment
  • purchase() - Authorize and capture a payment in one step
  • refund() - Refund a previously captured payment
  • void() - Void a previously authorized payment
  • completePurchase() - Complete a 3D Secure purchase

Project Structure

Main Components

  • Gateway.php - The main gateway class that handles transaction requests
  • Message/ - Request and response message handling
    • Request/ - Transaction request implementations
    • Response/ - 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.

统计信息

  • 总下载量: 44
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-18