mvestil/omnipay-rocketgate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mvestil/omnipay-rocketgate

Composer 安装命令:

composer require mvestil/omnipay-rocketgate

包简介

RocketGate driver for the Omnipay payment processing library

README 文档

README

Omnipay driver for RocketGate Gateway

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

RocketGate is an industry leader in transaction processing. RocketGate's secure, fault-tolerant and reliable payment processing platform includes a suite of sophisticated features including chargeback processing, risk management, advanced processing and merchant support tools. RocketGate's platform is engineered to be fast, customizable and profitable for our business partners.

Installation

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

{
    "require": {
        "mvestil/omnipay-rocketgate": "~1.1"
    }
}

And run composer to update your dependencies:

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

Basic Usage

The following transactions are provided by this package via the REST API:

  • Card Payment
  • Token Payment
  • Refund
  • Void
  • 3DSecure

For general usage instructions, please see the main Omnipay repository. There are also examples in the class API documentation.

Test modes

You must pass testMode=true to this package in order to make test payments

Authentication

To call RocketGate Payments API, merchant id and merchant password is required and will be passed via RocketGate's PHP SDK. You can get these values from RocketGate itself can be seen in their admin portal.

Usage

// Initialize the gateway
$gateway = Omnipay::create('RocketGate');
$gateway->initialize(array(
  'merchantID'       => 'XXXXXXXXXXXX',
  'merchantPassword' => 'XXXXXXXXXXXX',
  'testMode'         => true,
));

// Create a credit card object
$card = new CreditCard(array(
  'firstName'       => 'Example',
  'lastName'        => 'Customer',
  'number'          => '4242424242424242',
  'expiryMonth'     => '01',
  'expiryYear'      => '2032',
  'cvv'             => '123',
  'email'           => 'customer@example.com',
  'billingAddress1' => 'Consolacion, Cebu',
  'billingCountry'  => 'PH',
  'billingCity'     => 'Philippines',
  'billingPostcode' => '567278',
  'billingState'    => 'Philippines',
));

// Do a purchase transaction on the gateway
$transactorId = random_int(0, 1000000000);
$transaction = $gateway->purchase(array(
  'amount'        => '50.00',
  'currency'      => 'USD',
  'card'          => $card,
  'transactorId'  => $transactorId,
  'transactionId' => random_int(0, 1000000000),
));

$response = $transaction->send();
if ($response->isSuccessful()) {
  echo "Purchase transaction was successful!\n";
  $token = $response->getCardReference();
  echo "Card reference = " . $token . "\n";
}

// Do a token transaction on the gateway
$transaction = $gateway->purchase(array(
    'amount'        => '50.0',
    'currency'      => 'USD',
    'transactorId'  => $transactorId,
    'transactionId' => random_int(0, 1000000000),
    'cardReference' => $response->getCardReference(),
));

TODO

  • Unit Testing

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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固