ventepos/bluesnap-php is a Laravel package for a php library for the bluesnap api.
It currently has 3 GitHub stars and 14.673 downloads on Packagist (latest version v0.3.5).
Install it with composer require ventepos/bluesnap-php.
Discover more Laravel packages by ventepos
or browse all Laravel packages to compare alternatives.
Last updated
This (unofficial) library standardizes and simplifies working with the bluesnap api.
All the standard api documentation is applicable to this library.
View the bluesnap documentation here: https://developers.bluesnap.com/v8976-JSON/docs
This library currently supports:
Install this package with composer
composer require tdanielcox/bluesnap-php
Initialize the library in your class constructor
public function __construct()
{
$environment = 'sandbox'; // or 'production'
\tdanielcox\Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
}
Create a New Transaction
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;
}
This package is licensed under the MIT License