Download the PHP package nidux/cybersource-soap-client without Composer
On this page you can find all versions of the php package nidux/cybersource-soap-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nidux/cybersource-soap-client
More information about nidux/cybersource-soap-client
Files in nidux/cybersource-soap-client
Package cybersource-soap-client
Short Description CyberSource SOAP client by Nidux
License GPL-3.0-or-later
Homepage https://github.com/Nidux/cybersource-soap-client
Informations about the package cybersource-soap-client
Nidux SOAP Client for Cybersource SOAP
This is an Unofficial SOAP client for the CyberSource SOAP Toolkit API but with some adjustments made by Nidux.
Packagist
The nidux/cybersource-soap-client is available at Packagist. If you want to install SDK from Packagist,add the following dependency to your application's 'composer.json'.
Prerequisites
- PHP 7.0 or above
- A CyberSource account. You can create an evaluation account here.
- A CyberSource transaction key.
Installation
You can install the client either via Composer 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 ` (the latest when this package was updated). Here are the latest WSDL available, you can use SOAPUI if you want to manually test it:
Installing with Composer
You'll first need to make sure you have Composer installed. You can follow the instructions on the official web site. Once Composer is installed, you can enter the project root and run:
Then, to use the client, you'll need to include the Composer-generated autoload file:
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 `. 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 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.
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. Here's how to run a transaction from an XML file:
Or, you can create your own XML string and use that instead:
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 . Then use the
as so:
How to obtain the CardType
A helper class is available with the method `. 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.
All versions of cybersource-soap-client with dependencies
ext-curl Version *
ext-openssl Version *
ext-soap Version *
ext-simplexml Version *
myclabs/php-enum Version ^1.7