承接 ttimot24/teya-payment-client 相关项目开发

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

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

ttimot24/teya-payment-client

最新稳定版本:v0.0.7

Composer 安装命令:

composer require ttimot24/teya-payment-client

包简介

PHP Teya Payment Client Library

README 文档

README

teya logo

Teya Payment PHP Client Library

Teya PHP Client Library is a PHP package designed to interact with the Teya API, enabling seamless integration of Teya's services into PHP applications. It provides a structured and easy-to-use interface for making API requests, handling authentication, and managing data exchanges. The library simplifies complex API interactions by offering pre-built methods for common operations, ensuring developers can efficiently integrate Teya's features with minimal effort. Ideal for businesses and developers looking to incorporate Teya's payment and transactional services into their PHP-based systems.

https://teya.com

Install

composer require ttimot24/teya-payment-client

RPG Payment Gateway

Official documentation

$client = new Ttimot24\TeyaPayment\TeyaPaymentGatewayClient([
    'PrivateKey' => '856293_pr0lxnW8PG1SeCwVJ3WPH0lXCeU0/sYLtX'
    ]);

$client->payment([
        'Amount' => 100,
        'Currency' => 352,
        'OrderId' => 'ORDER1230001',
        'PaymentMethod' => [
            'PaymentType' => 'Card',
            'PAN' => '4176669999000104',
            'ExpYear' => 2031,
            'ExpMonth' => 12
        ]
    ]);

SecurePay

Official documentation

        $client = new Ttimot24\TeyaPayment\TeyaSecurePayClient([
            'MerchantId' => '9256684', 
            'PaymentGatewayId' => 7, 
            'SecretKey' => 'cdedfbb6ecab4a4994ac880144dd92dc',
            'RedirectSuccess' => '/SecurePay/SuccessPage.aspx',
            'RedirectSuccessServer' => 'SUCCESS_SERVER',
            "Currency" => "HUF"
        ]);

        $this->client->addItems([
            new \Ttimot24\TeyaPayment\Model\TeyaItem('Test Item', 1, 10000)
        ]);

        //prepare transaction and redirect user
        $response = $this->client->start([
            "reference" => "TEST00000001",
        ]);

        header('Location: '.$response['paymentUrl']);
      
        //or a shortcut:
        $this->client->open([
            "reference" => "TEST00000001",
        ]);

Logging

 $logger = new Logger('TeyaSecurePayClient');
 $logger->pushHandler(new StreamHandler('teya_secure_pay_client.log'), \Monolog\Level::Debug);

 $client = new Ttimot24\TeyaPayment\TeyaPaymentGatewayClient([
            'PrivateKey' => '856293_pr0lxnW8PG1SeCwVJ3WPH0lXCeU0/sYLtX'
            'logger' => $logger
        ]);

SecurePay Playground

playground.php

Contribution

Contributions are welcome! If you'd like to improve this project, fork the repository, create a new branch, and submit a pull request. Please follow best practices and ensure your code is clean and well-documented.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-17