定制 andylibrian/omnipay-veritrans 二次开发

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

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

andylibrian/omnipay-veritrans

最新稳定版本:v1.0.0

Composer 安装命令:

composer require andylibrian/omnipay-veritrans

包简介

Veritrans driver for the Omnipay PHP payment processing library

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version

Veritrans driver for the Omnipay PHP payment processing library

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

This is a third party package maintained by the author and community. If you want to use Veritrans Payment API without Omnipay, we suggest you check out The official PHP wrapper for Veritrans Payment API.

Installation

Omnipay is installed via Composer. To install, simply run:

$ php composer.phar require andylibrian/omnipay-veritrans

Basic Usage

The following gateways are provided by this package:

  • VT-Web
<?php

require_once __DIR__ . '/vendor/autoload.php';

use Omnipay\Omnipay;
use Omnipay\Common\CreditCard;

$gateway = Omnipay::create('Veritrans_VTWeb');
$gateway->setServerKey('server-key-replace-with-yours');
$gateway->setEnvironment('sandbox'); // [production|sandbox] default to production

$data = array(
    'transactionId' => '123456',
    'amount'        => '145000.00',
    'card'          => new CreditCard(),
    'vtwebConfiguration' => array(
        'credit_card_3d_secure' => true,
    ),  
    'currency'      => 'IDR',
);

$response = $gateway->purchase($data)->send();

if ($response->isSuccessful()) {
    // payment success, update database
    // using VT-Web, you will always get redirected to offsite (veritrans page)
    // so here won't be reached.
} elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
} else {
    echo $response->getMessage();
}

For general usage instructions, please see the main Omnipay repository. And for more information about Veritrans features, please see Veritrans Documentation

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-18