定制 artmin96/omnipay-telcell 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

artmin96/omnipay-telcell

最新稳定版本:1.1

Composer 安装命令:

composer require artmin96/omnipay-telcell

包简介

TelCell gateway for Omnipay payment processing library

README 文档

README

TelCell driver for the Omnipay Laravel payment processing library

Latest Stable Version Total Downloads

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

Basic Usage

  1. Use Omnipay gateway class:
    use Omnipay\Omnipay;
  1. Initialize TelCell gateway:
    $gateway = Omnipay::create('Telcell');
    $gateway->setShopId(env('SHOP_ID'));
    $gateway->setShopKey(env('SHOP_KEY'));
    $gateway->setSum(10); // Amount to charge
    $gateway->setInfo([]); // Additional information
    $gateway->setTransactionId(XXXX); // Transaction ID from your system
  1. Call purchase, it will automatically redirect to TelCell's hosted page
    $purchase = $gateway->purchase()->send();
    $purchase->redirect();
  1. Create a webhook controller to handle the callback request at your RETURN_URL and catch the webhook as follows
    $gateway = Omnipay::create('Telcell');
    $gateway->setShopId(env('SHOP_ID'));
    $gateway->setShopKey(env('SHOP_KEY'));
    
    $purchase = $gateway->completePurchase()->send();
    
    // Do the rest with $purchase and response with 'OK'
    if ($purchase->isSuccessful()) {
        
        // Your logic
        
    }
    
    return new Response('OK');

For general usage instructions, please see the main Omnipay repository.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-31