承接 pointybeard/omnipay-nabtransact 相关项目开发

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

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

pointybeard/omnipay-nabtransact

最新稳定版本:0.1.1

Composer 安装命令:

composer require pointybeard/omnipay-nabtransact

包简介

NAB Transact XML API gateway for the Omnipay payment processing library

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

NAB Transact API 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 NAB Transact support for Omnipay.

IMPORTANT: This is a very early alpha release, so it's pretty rough, and is likely to be buggy. Please do not use this in production environments. If anyone wants to help me out, that would be awesome.

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:

{
    "require": {
        "pointybeard/omnipay-nabtransact": "~0.1"
    }
}

And run composer to update your dependencies:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Basic Usage

    include(__DIR__ . '/../vendor/autoload.php');
    use Omnipay\Omnipay;
    use Omnipay\Common as OmnipayCommon;

    $g = Omnipay::create('NABTransact_Periodic');
    $g->initialize([
        'merchantID' => 'XYZ0010',
        'password' => 'abcd1234',
        'testMode' => true,
    ]);

    // Add a customer
    $request = $g->createCard(['card' => [
            'number' => '4111111111111111',
            'expiryMonth' => '02',
            'expiryYear' => '18',
            'cvv' => '123',
        ]
    ]);
    $response = $request->send();

    // Update a customer
    $request = $g->updateCard([
        'customerReference' => $response->getCustomerReference(),
        'card' => [
            'number' => '4444333322221111',
            'expiryMonth' => '03',
            'expiryYear' => '16'
        ]
    ]);
    $response = $request->send();

    // Trigger a payment
    $request = $g->purchase([
        'customerReference' => $response->getCustomerReference(),
        'transactionReference' => 'Test Trigger of CC Payment',
        'amount' => '1234',
        'currency' => 'AUD',
    ]);

    $response = $request->send();

    // Delete a customer
    $request = $g->deleteCard(['customerReference' => $response->getCustomerReference()]);
    $response = $request->send();

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

Out Of Scope

This currently supports the 'addcrn', 'editcrn', 'deletecrn' and 'trigger' actions of NAB's "Customer Management and Payment scheduling" XML API. Eventually it will support scheduling and triggering a DD payment.

It does not support the "XML API for Payments" API, however will eventually.

Support

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.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-14