2017 © Pedro Peláez
 

library bluesnap-php

A PHP Library for the Bluesnap api

image

tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  • Saturday, March 24, 2018
  • by tdanielcox
  • Repository
  • 3 Watchers
  • 2 Stars
  • 316 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 10 Versions
  • 42 % Grown

The README.md

Bluesnap PHP Library

NOTE this library is not production ready as my company decided against using bluesnap shortly after starting this project. Please feel free to fork it and make it fit your needs, all endpoints are working as of June 2017, however the library is missing several features that bluesnap offers. Development and maintence on this project has been discontinued., (*1)


This (unofficial) library standardizes and simplifies working with the bluesnap api., (*2)

All the standard api documentation is applicable to this library., (*3)

View the bluesnap documentation here: https://developers.bluesnap.com/v8976-JSON/docs, (*4)

This library currently supports:, (*5)

  • CardTransactions
  • VaultedShoppers
  • Vendors
  • Subscriptions
  • Plans (Subscriptions)
  • Refunds
  • Reports

Installation

Install this package with composer, (*6)

composer require tdanielcox/bluesnap-php

Usage

Initialize the library in your class constructor, (*7)

public function __construct()
{
    $environment = 'sandbox'; // or 'production'
    \tdanielcox\Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
}

Create a New Transaction, (*8)

public function createTransaction()
{
    $response = \tdanielcox\Bluesnap\CardTransaction::create([
        'creditCard' => [
            'cardNumber' => '4263982640269299',
            'expirationMonth' => '02',
            'expirationYear' => '2018',
            'securityCode' => '837'
        ],
        'amount' => 10.00,
        'currency' => 'USD',
        'recurringTransaction' => 'ECOMMERCE',
        'cardTransactionType' => 'AUTH_CAPTURE',
    ]);

    if ($response->failed())
    {
        $error = $response->data;

        // handle error
    }

    $transaction = $response->data;

    return $transaction;
}

See examples for further details on using the library

License

This package is licensed under the MIT License, (*9)

The Versions

24/03 2018

dev-master

9999999-dev https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

05/07 2017

v0.2.2

0.2.2.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

05/07 2017

v0.2.1

0.2.1.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

03/07 2017

v0.2

0.2.0.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

03/07 2017

v0.1.05

0.1.05.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

03/07 2017

v0.1.04

0.1.04.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

03/07 2017

v0.1.03

0.1.03.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

21/06 2017

v0.1.02

0.1.02.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

21/06 2017

v0.1.01

0.1.01.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires

 

21/06 2017

v0.1.0

0.1.0.0 https://github.com/tdanielcox/bluesnap-php

A PHP Library for the Bluesnap api

  Sources   Download

MIT

The Requires