承接 dwolla/omnipay-dwolla 相关项目开发

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

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

dwolla/omnipay-dwolla

最新稳定版本:1.1.1

Composer 安装命令:

composer require dwolla/omnipay-dwolla

包简介

Dwolla support for the Omnipay payment library

README 文档

README

Dwolla off-site gateway support for the Omnipay PHP payment processing library

Build Status

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

Installation

Omnipay is installed via Composer. omnipay-dwolla is currently not a part of the official Omnipay branch; we are working on this.

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:

  • Dwolla (off-site gateway)

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

Dwolla API documentation is available here.

In order to get started, first obtain Dwolla API credentials

Initiating a Checkout

Off-site gateway checkouts are initiated by calling the purchase() method.

use Omnipay\Omnipay;

$gateway = Omnipay::create('Dwolla');

$gateway->setKey('An API key!');
$gateway->setSecret('Shh!');
$gateway->setDestinationId('812-111-1234');
$gateway->setReturnUrl('http://your-sweet-app.net/handle_redirect');

// Want sandbox mode?
// $gateway->setSandbox(true);

$response = $gateway->purchase(['amount' => '10.00'])->send();

if ($response->isRedirect()) {
    // Redirect to Dwolla
    $response->redirect();
} else {
    // Something went wrong!
    echo $response->getMessage();
}

Retrieving an already created checkout

If your application would like to retrieve old checkouts, omnipay-dwolla allows you to do so via the capture() method. This somewhat falls ambiguously under OmniPay convention as we also return checkouts which have failed, i.e, which have not been successfully authorized by the user redirected to the off-site gateway.

use Omnipay\Omnipay;

$gateway = Omnipay::create('Dwolla');

$gateway->setKey('An API key!');
$gateway->setSecret('Shh!');

// Want sandbox mode?
// $gateway->setSandbox(true);

$checkout = $gateway->capture(['transactionReference' => 'c271d65c-7b71-421f-a80f-8682bb2ce2c4'])->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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-04