2017 © Pedro Peláez
 

library omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

image

vimeo/omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

  • Wednesday, April 25, 2018
  • by nickyr
  • Repository
  • 14 Watchers
  • 0 Stars
  • 982 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 32 % Grown

The README.md

Omnipay: BlueSnap

BlueSnap driver for the Omnipay PHP payment processing library, (*1)

NOTE: At this time, this driver only provides full support for BlueSnap's BuyNow Hosted Checkout product. But you can add support for more parts of the API!, (*2)

Build Status Latest Stable Version Total Downloads, (*3)

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements BlueSnap support for Omnipay., (*4)

BlueSnap is a payment services provider based in Waltham, Massachusetts. In addition to traditional payment gateway services, they provide hosted solutions and a range of global payment methods., (*5)

Installation

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

{
    "require": {
        "vimeo/omnipay-bluesnap": "2.0.*"
    }
}

And run composer to update your dependencies:, (*7)

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

(Note that we recommend pinning the minor version. While v2.* will remain fully compatible with Omnipay 2, features added in addition to the base Omnipay features, such as subscriptions, may have breaking changes in a minor version bump.), (*8)

Basic Usage

The following gateways are provided by this package:, (*9)

Some features of the following gateways are provided, but not enough to use them on their own. Feel free to contribute!, (*10)

  • BlueSnap, for BlueSnap's traditional Payment API. This gateway is almost entirely unimplemented at this time, except for parts of the Reporting API.
  • BlueSnap_Extended, for the BlueSnap Extended Payment API. This is the API you should use if you're hosting your product catalog with BlueSnap. It powers the BuyNow Hosted Checkout, as well as other products. Enough of this API is implemented in this driver to power the BlueSnap_HostedCheckout gateway.

Simple Example

// Set up the gateway
$gateway = \Omnipay\Omnipay::create('BlueSnap_HostedCheckout');
$gateway->setUsername('your_username');
$gateway->setPassword('y0ur_p4ssw0rd');
$gateway->setTestMode(false);

// Start the purchase process
$purchaseResponse = $gateway->purchase(array(
    'storeReference' => '12345',
    'planReference' => '1234567',
    'currency' => 'USD'
))->send();

if ($purchaseResponse->isSuccessful()) {
    $purchaseResponse->redirect();
} else {
    // error handling
}

// Now the user is filling out info on BlueSnap's hosted checkout page. Then they get
// redirected back to your site. If you set parameters in the return/callback URL, you
// can access those here.

// Once the transaction has been captured, you'll receive an IPN callback, which you can
// handle like so:

$ipnCallback = $gateway->parseIPNCallback($_SERVER['REQUEST_URI']);
if ($ipnCallback->isCharge()) {
    echo 'Transaction reference: ' . $ipnCallback->getTransactionReference() . PHP_EOL;
    echo 'Amount: ' . $ipnCallback->getAmount() . PHP_EOL;
    echo 'Currency: ' . $ipnCallback->getCurrency() . PHP_EOL;
} elseif ($ipnCallback->isCancellation()) {
    // etc.
}

More documentation and examples are provided in the Gateway source files., (*11)

For general usage instructions, please see the main Omnipay repository., (*12)

Test Mode

BlueSnap accounts have a separate username and password for test mode. There is also a separate test mode endpoint, which this library will use when set to test mode., (*13)

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., (*14)

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., (*15)

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

The Versions

25/04 2018

dev-master

9999999-dev https://github.com/vimeo/omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicky Robinson

payment pay gateway merchant omnipay bluesnap

11/12 2017

v2.0.2

2.0.2.0 https://github.com/vimeo/omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicky Robinson

payment pay gateway merchant omnipay bluesnap

10/08 2017

v2.0.1

2.0.1.0 https://github.com/vimeo/omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicky Robinson

payment pay gateway merchant omnipay bluesnap

10/08 2017

v2.0.0

2.0.0.0 https://github.com/vimeo/omnipay-bluesnap

BlueSnap driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicky Robinson

payment pay gateway merchant omnipay bluesnap