PHPackages                             nidux/cybersource-soap-client - 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. [Payment Processing](/categories/payments)
4. /
5. nidux/cybersource-soap-client

ActiveLibrary[Payment Processing](/categories/payments)

nidux/cybersource-soap-client
=============================

CyberSource SOAP client by Nidux

1.0.5(6y ago)14.6k↓50%GPL-3.0-or-laterPHPPHP &gt;= 7.0

Since Mar 21Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Nidux/cybersource-soap-client)[ Packagist](https://packagist.org/packages/nidux/cybersource-soap-client)[ Docs](https://github.com/Nidux/cybersource-soap-client)[ RSS](/packages/nidux-cybersource-soap-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Nidux SOAP Client for Cybersource SOAP
======================================

[](#nidux-soap-client-for-cybersource-soap)

This is an Unofficial SOAP client for the [CyberSource SOAP Toolkit API](http://www.cybersource.com/developers/getting_started/integration_methods/soap_toolkit_api) but with some adjustments made by Nidux.

Packagist
---------

[](#packagist)

The nidux/cybersource-soap-client 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": {
  "nidux/cybersource-soap-client": "*"
  },
```

Prerequisites
-------------

[](#prerequisites)

- PHP 7.0 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)
    - [simplexml](http://php.net/manual/en/book.simplexml.php)
    - These extensions must be enabled
- A CyberSource account. You can create an evaluation account [here](http://www.cybersource.com/register/).
- A CyberSource transaction key.

Installation
------------

[](#installation)

You can install the client either via [Composer](https://getcomposer.org/) or manually. You can provide either a the location of a file with the merchant ID, transaction key, and the appropriate WSDL file URL in `cybs.ini` (the latest when this package was updated). Here are the latest WSDL available, you can use SOAPUI if you want to manually test it:

- [test](https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.153.wsdl)
- [live](https://ics2ws.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.153.wsdl)

### Installing with Composer

[](#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');
```

Getting Started
---------------

[](#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

[](#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 CybersourceSoapClient();
$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

[](#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 CybersourceSoapClient();
$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 CybersourceSoapClient();
$client->runTransactionFromXml($xml);
```

### Using name-value pairs

[](#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 CybersourceNVPClient();
$request = array();
$request['ccAuthService_run'] = 'true';
$request['merchantID'] = 'my_merchant_id';
$request['merchantReferenceCode'] = $'my_reference_code';
// Populate $request
$reply = $client->runTransaction($request);
```

### How to obtain the CardType

[](#how-to-obtain-the-cardtype)

A helper class is available with the method `getCardType($cardNumber)`. You need to provide card number and you will obtain the right CardType value to use in the XML/Object, it will return Null when cannot detect the brand of the card.

```
$cardTypeValue = CybersourceHelper::getCardType('4111111111111111'); //it will return 001
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~104 days

Total

2

Last Release

2511d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dcb6081414e7332bce5ff0b984d45814923a4ffa519a4afea599a773c141e997?d=identicon)[cumanzorx07](/maintainers/cumanzorx07)

---

Top Contributors

[![cumanzorx07](https://avatars.githubusercontent.com/u/5851958?v=4)](https://github.com/cumanzorx07 "cumanzorx07 (1 commits)")

---

Tags

bettercybersourcephp7soap-clientsoappaymentscybersourceNidux

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nidux-cybersource-soap-client/health.svg)

```
[![Health](https://phpackages.com/badges/nidux-cybersource-soap-client/health.svg)](https://phpackages.com/packages/nidux-cybersource-soap-client)
```

###  Alternatives

[amzn/amazon-pay-sdk-php

Amazon Pay SDK (PHP)

20512.1M3](/packages/amzn-amazon-pay-sdk-php)[unicodeveloper/laravel-paystack

A Laravel Package for Paystack

650975.6k11](/packages/unicodeveloper-laravel-paystack)[ignited/laravel-omnipay

Integrates Omnipay with Laravel and provides an easy configuration.

5211.1M12](/packages/ignited-laravel-omnipay)[recurly/recurly-client

The PHP client library for the Recurly API

1736.3M7](/packages/recurly-recurly-client)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)

PHPackages © 2026

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