PHPackages                             redhotmagma-es/cybersource-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. redhotmagma-es/cybersource-sdk-php

ActiveLibrary[API Development](/categories/api)

redhotmagma-es/cybersource-sdk-php
==================================

CyberSource PHP SOAP client

1.0.4(10y ago)021ProprietaryPHPPHP &gt;=5.3

Since Dec 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/redhotmagma-es/cybersource-sdk-php)[ Packagist](https://packagist.org/packages/redhotmagma-es/cybersource-sdk-php)[ Docs](https://github.com/CyberSource/cybersource-sdk-php)[ RSS](/packages/redhotmagma-es-cybersource-sdk-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (6)Used By (0)

\#CyberSource PHP Client

This is the PHP client for the [CyberSource SOAP Toolkit API](http://www.cybersource.com/developers/getting_started/integration_methods/soap_toolkit_api).

\[[![Build Status](https://camo.githubusercontent.com/a16e9eeec22faab3110b627c8da46cf15f32f0746b0d23e5a755b3edc12e7641/68747470733a2f2f7472617669732d63692e6f72672f4379626572536f757263652f6379626572736f757263652d73646b2d7068702e706e673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/a16e9eeec22faab3110b627c8da46cf15f32f0746b0d23e5a755b3edc12e7641/68747470733a2f2f7472617669732d63692e6f72672f4379626572536f757263652f6379626572736f757263652d73646b2d7068702e706e673f6272616e63683d6d6173746572)\] ()

\##Packagist The cybersource/sdk-php is available at [Packagist](https://packagist.org/packages/cybersource/sdk-php). If you want to install SDK from Packagist,add the following dependency to your application's 'composer.json'.

```
"require": {
"cybersource/sdk-php": "*"
 },

```

\##Prerequisites

- PHP 5.3 or above
    - [curl](http://php.net/manual/en/book.curl.php), [openssl](http://php.net/manual/en/book.openssl.php), [soap](http://php.net/manual/en/book.soap.php) extensions must be enabled
- A CyberSource account. You can create an evaluation account [here](http://www.cybersource.com/register/).
- A CyberSource transaction key. You will need to set your merchant ID and transaction key in the `cybs.ini` file in `lib/conf`. Instructions on obtaining a transaction key can be found [here](http://www.cybersource.com/developers/integration_methods/simple_order_and_soap_toolkit_api/soap_api/html/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Intro.04.3.html).

\##Installation

You can install the client either via [Composer](https://getcomposer.org/) or manually. Before installing, make sure to configure the merchant ID, transaction key, and the appropriate WSDL file URL in `cybs.ini`. By default, the WSDL file for the client is for API version 1.120 (the latest when this package was updated). Available WSDL file URLs can be browsed at the following locations:

- [test](https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/)
- [live](https://ics2ws.ic3.com/commerce/1.x/transactionProcessor/)

\###Installing with Composer You'll first need to make sure you have Composer installed. You can follow the instructions on the [official web site](https://getcomposer.org/download/). Once Composer is installed, you can enter the project root and run:

```
composer.phar install

```

Then, to use the client, you'll need to include the Composer-generated autoload file:

```
require_once('/path/to/project/vendor/autoload.php');
```

\###Manual installation To use the client manually, include the CyberSource client in your project:

```
require_once('/path/to/project/lib/CybsSoapClient.php');
```

\##Getting Started The PHP client will generate the request message headers for you, and will contain the methods specified by the WSDL file.

\###Creating a simple request The main method you'll use is `runTransaction()`. To run a transaction, you'll first need to construct a client to generate a request object, which you can populate with the necessary fields (see [documentation](http://www.cybersource.com/developers/integration_methods/simple_order_and_soap_toolkit_api/soap_api/html/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Intro.04.4.html) for sample requests). The object will be converted into XML, so the properties of the object will need to correspond to the correct XML format.

```
$client = new CybsSoapClient();
$request = $client->createRequest();

$card = new stdClass();
$card->accountNumber = '4111111111111111';
$card->expirationMonth = '12';
$card->expirationYear = '2020';
$request->card = $card;

// Populate $request here with other necessary properties

$reply = $client->runTransaction($request);
```

\###Creating a request from XML You can create a request from XML either in a file or from an XML string. The XML request format is described in the **Using XML** section [here](http://apps.cybersource.com/library/documentation/dev_guides/Simple_Order_API_Clients/Client_SDK_SO_API.pdf). Here's how to run a transaction from an XML file:

```
$referenceCode = 'your_merchant_reference_code';
$client = new CybsSoapClient();
$reply = $client->runTransactionFromFile('path/to/my.xml', $referenceCode);
```

Or, you can create your own XML string and use that instead:

```
$xml = "";
// Populate $xml
$client = new CybsSoapClient();
$client->runTransactionFromXml($xml);
```

\###Using name-value pairs In order to run transactions using name-value pairs, make sure to set the value for the WSDL for the NVP transaction processor in `cybs.ini`. Then use the `CybsNameValuePairClient` as so:

```
$client = new CybsNameValuePairClient();
$request = array();
$request['ccAuthService_run'] = 'true';
$request['merchantID'] = 'my_merchant_id';
$request['merchantReferenceCode'] = $'my_reference_code';
// Populate $request
$reply = $client->runTransaction($request);
```

\##Running the Samples After configuring your merchant ID and transaction key in `cybs.ini`, the samples in the `samples` directory can be run from the project root. For example:

```
php samples/Sale.php

```

The samples will output the response object for each request if successful. Note that the samples contain test data and should not be run in a live environment.

\##Tests

In order to run tests, you'll need [PHPUnit](https://phpunit.de). You'll also need to use [Composer](https://getcomposer.org/) for autoloading. If you used Composer to install the client, this should already be set up. Otherwise, to use Composer for autoloading only, from the project root run

```
composer.phar dump-autoload

```

If you installed PHPUnit with Composer, run the tests from the project root with the command `vendor/bin/phpunit`.

\##Documentation

For more information about CyberSource services, see

For all other support needs, see

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 61.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~119 days

Total

5

Last Release

3722d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18595910?v=4)[redhotmagma-es](/maintainers/redhotmagma-es)[@redhotmagma-es](https://github.com/redhotmagma-es)

---

Top Contributors

[![djvaldez](https://avatars.githubusercontent.com/u/1976701?v=4)](https://github.com/djvaldez "djvaldez (29 commits)")[![brianmc](https://avatars.githubusercontent.com/u/1022976?v=4)](https://github.com/brianmc "brianmc (10 commits)")[![redhotmagma-es](https://avatars.githubusercontent.com/u/18595910?v=4)](https://github.com/redhotmagma-es "redhotmagma-es (4 commits)")[![senagant](https://avatars.githubusercontent.com/u/9449919?v=4)](https://github.com/senagant "senagant (3 commits)")[![dhimandeepak](https://avatars.githubusercontent.com/u/3957626?v=4)](https://github.com/dhimandeepak "dhimandeepak (1 commits)")

---

Tags

apipaymentscybersource

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/redhotmagma-es-cybersource-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/redhotmagma-es-cybersource-sdk-php/health.svg)](https://phpackages.com/packages/redhotmagma-es-cybersource-sdk-php)
```

###  Alternatives

[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60315.4M74](/packages/mollie-mollie-api-php)[cybersource/sdk-php

CyberSource PHP SOAP client

602.5M1](/packages/cybersource-sdk-php)[transbank/transbank-sdk

Transbank SDK

62658.8k14](/packages/transbank-transbank-sdk)[openbuildings/paypal

PayPal SDK for ExpressCheckout and AdaptivePayments. Supports recurring payments, simple payments, parallel payments and chained payments.

29176.3k](/packages/openbuildings-paypal)[maksekeskus/maksekeskus-php

Maksekeskus PHP SDK

13191.7k](/packages/maksekeskus-maksekeskus-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
