credibility / laravel-cybersource by credibility

14,250
1
12
Package Data
Maintainer Username: credibility
Maintainer Contact: credibility@dandb.com (Credibility)
Package Create Date: 2014-04-10
Package Last Update: 2017-09-14
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-26 03:00:43
Package Statistics
Total Downloads: 14,250
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 12
Total Forks: 5
Total Open Issues: 2

laravel-cybersource

Build Status Coverage Status Packagist

This package wraps the Cybersource SOAP API in a convenient, easy to use package for Laravel.

Installation

Install using composer:

"require": {
  "credibility/laravel-cybersource": "3.0.*" 
}

See Packagist for latest version

Then, in config/app.php, add the following to the service providers array.

array(
   ...
  'Credibility\LaravelCybersource\Providers\LaravelCybersourceServiceProvider',
)

Finally, in config/app.php, add the following to the facades array.

array(
    ...
    'Cybersource'     => 'Credibility\LaravelCybersource\Facades\Cybersource',
)

Usage

Example usage using Facade:

$response = Cybersource::createSubscription(
    $paymentToken,
    $productId,
    $productTotal,
    $frequency
);

if($response->isValid()) {
    $responseDetails = $response->getDetails();
    echo $responseDetails['paySubscriptionCreateReply']['subscriptionID'];
} else {
    echo $response->error();
}