asaadabdo / laravel-cybersource
v4.0.5
2017-09-14 17:37 UTC
Requires
- php: >=5.5.9
- besimple/soap-client: 0.2.6
- illuminate/support: 5.5.*
Requires (Dev)
- mockery/mockery: dev-master
- phpunit/phpunit: 4.0.*
- satooshi/php-coveralls: dev-master
README
This package wraps the Cybersource SOAP API in a convenient, easy to use package for Laravel.
Installation
Install using composer:
"require": {
"asaadabdo/laravel-cybersource": "4.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();
}