承接 tcgunel/omnipay-sipay 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tcgunel/omnipay-sipay

Composer 安装命令:

composer require tcgunel/omnipay-sipay

包简介

Omnipay extension for Sipay (CCPayment)

README 文档

README

Sipay (CCPayment) driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Sipay support for Omnipay.

Installation

composer require tcgunel/omnipay-sipay

Requirements

  • PHP >= 8.0
  • ext-json
  • ext-openssl

Configuration

use Omnipay\Omnipay;

$gateway = Omnipay::create('Sipay');

$gateway->setAppId('your_app_id');           // app_id from provider
$gateway->setAppSecret('your_app_secret');   // app_secret from provider
$gateway->setMerchantKey('your_merchant_key'); // merchant_key from provider
$gateway->setTestMode(true);                 // Use test endpoint

Provider Selection

This package supports multiple CCPayment providers that share the same API protocol. By default, the provider is set to sipay. You can switch to any supported provider:

$gateway->setProvider('paybull');   // Use Paybull endpoints
$gateway->setProvider('qnbpay');   // Use QNBPay endpoints
$gateway->setProvider('halkode');  // Use Halkode endpoints

Supported Providers

Provider Test Endpoint Live Endpoint
sipay (default) https://provisioning.sipay.com.tr/ccpayment https://app.sipay.com.tr/ccpayment
halkode https://testapp.halkode.com.tr/ccpayment https://app.halkode.com.tr/ccpayment
iqmoney https://provisioning.iqmoneytr.com/ccpayment https://app.iqmoneytr.com/ccpayment
parolapara https://testccpayment.parolapara.com/ccpayment https://ccpayment.parolapara.com/ccpayment
paybull https://test.paybull.com/ccpayment https://app.paybull.com/ccpayment
qnbpay https://test.qnbpay.com.tr/ccpayment https://portal.qnbpay.com.tr/ccpayment
vepara https://test.vepara.com.tr/ccpayment https://app.vepara.com.tr/ccpayment

The provider name is case-insensitive. All providers use the same API methods (purchase, refund, void, etc.).

Supported Methods

Purchase (Non-3D)

$response = $gateway->purchase([
    'amount'       => '100.00',
    'currency'     => 'TRY',
    'card'         => $cardData,
    'installment'  => 1,
    'transactionId' => 'INV-001',
    'items'        => [
        ['name' => 'Product', 'price' => 100, 'quantity' => 1, 'description' => 'Desc'],
    ],
])->send();

if ($response->isSuccessful()) {
    echo $response->getTransactionId(); // auth_code
}

Purchase (3D Secure)

$response = $gateway->purchase([
    'amount'       => '100.00',
    'currency'     => 'TRY',
    'card'         => $cardData,
    'installment'  => 1,
    'transactionId' => 'INV-001',
    'secure'       => true,
    'returnUrl'    => 'https://example.com/success',
    'cancelUrl'    => 'https://example.com/cancel',
    'clientIp'     => '127.0.0.1',
    'items'        => [
        ['name' => 'Product', 'price' => 100, 'quantity' => 1, 'description' => 'Desc'],
    ],
])->send();

if ($response->isRedirect()) {
    echo $response->getRedirectHtml(); // Render this HTML
}

Complete Purchase (3D Callback)

$response = $gateway->completePurchase()->send();

if ($response->isSuccessful()) {
    echo $response->getTransactionId();
}

Void (Cancel)

$response = $gateway->void([
    'transactionId' => 'INV-001',
    'currency'      => 'TRY',
])->send();

if ($response->isSuccessful()) {
    echo 'Transaction cancelled.';
}

Refund

$response = $gateway->refund([
    'transactionId' => 'INV-001',
    'amount'        => '50.00',
    'currency'      => 'TRY',
])->send();

if ($response->isSuccessful()) {
    echo 'Refund successful.';
}

BIN Lookup (Installment Query)

$response = $gateway->binLookup([
    'card'     => ['number' => '979203XXXXXXXXXX'],
    'amount'   => '100.00',
    'currency' => 'TRY',
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData();
    // $data['data'] contains POS and installment info
}

Installment Rates (All Commissions)

$response = $gateway->installmentRates([
    'currency' => 'TRY',
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData();
    // $data['data'] contains all commission rates
}

Endpoints

Endpoints are automatically resolved based on the selected provider and test mode. See the Provider Selection section above for the full list of endpoints.

Authentication

The gateway uses token-based authentication. A Bearer token is automatically obtained before each API request using your app_id and app_secret.

Hash Key

For purchase, refund, and void operations, a hash key is generated using AES-256-CBC encryption with the following data:

data = total|installment|currencyCode|merchantKey|invoiceId

The hash key is automatically generated and validated by the library.

Running Tests

vendor/bin/phpunit

License

MIT

tcgunel/omnipay-sipay 适用场景与选型建议

tcgunel/omnipay-sipay 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「payment」 「gateway」 「omnipay」 「3d secure」 「sanal pos」 「sipay」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tcgunel/omnipay-sipay 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tcgunel/omnipay-sipay 我们能提供哪些服务?
定制开发 / 二次开发

基于 tcgunel/omnipay-sipay 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-23