Skip to content

dandb/laravel-cybersource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();
}

About

Laravel Wrapper for Cybersource's SOAP API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages