collizo4sky/omnipay-wepay 问题修复 & 功能扩展

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

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

collizo4sky/omnipay-wepay

最新稳定版本:1.3.2

Composer 安装命令:

composer require collizo4sky/omnipay-wepay

包简介

WePay driver for the Omnipay payment processing library

README 文档

README

WePay driver for the Omnipay PHP payment processing library

Build Status Coverage Status Code Climate Dependency Status

Latest Stable Version Total Downloads License

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

Installation

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

{
    "require": {
        "collizo4sky/omnipay-wepay": "~1.0"
    }
}

And run composer to update your dependencies:

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

Basic Usage

The following gateways are provided by this package:

  • WePay

You need to set your accountId and accessToken. Setting testMode to true will use the sandbox environment.

This gateway supports WePay off-site and on-site purchase. The on-site purchase is possible through a credit card ID. You can generate the ID through the JavaScript SDK:

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

On-site Payment Setup with Credit Card ID

$gateway = Omnipay::create('WePay');
$gateway->setAccountId('583276666');
$gateway->setAccessToken('STAGE_ca4cf9c5d209343d18dae0fc47b908f2d17b47654eecb1fc55bc8652946kdirl');
$gateway->setTestMode(true);

$formData = array('firstName' => 'Foo', 'lastName' => 'Baz', 'email' => 'hello@mailinator.com');

$response = $gateway->purchase(
    array(
        'token' => '3843295557',
        'transactionId' => '12345678',
        'amount'        => '25.50',
        'currency'      => 'USD',
        'description'   => 'A vacation home rental',
        'returnUrl'     => 'http://localhost.dev/wepay/complete.php',
        'card'          => $formData
    )
)->send();

Off-site Payment Setup without Credit Card ID

$gateway = Omnipay::create('WePay');
$gateway->setAccountId('583276666');
$gateway->setAccessToken('STAGE_ca4cf9c5d209343d18dae0fc47b908f2d17b47654eecb1fc55bc8652946kdirl');
$gateway->setTestMode(true);

$formData = array('firstName' => 'Foo', 'lastName' => 'Baz', 'email' => 'hello@mailinator.com');

$response = $gateway->purchase(
    array(
        'transactionId' => '12345678',
        'amount'        => '25.50',
        'currency'      => 'USD',
        'description'   => 'A vacation home rental',
        'returnUrl'     => 'http://localhost.dev/wepay/complete.php',
        'card'          => $formData
    )
)->send();

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.

统计信息

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

GitHub 信息

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

其他信息

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