Skip to content

Commit 730219c

Browse files
authored
Merge pull request #29 from gauravmokhasi/patch-1
formatting fix
2 parents 0f19074 + 19d456b commit 730219c

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

README.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
1-
#CyberSource PHP Client
2-
1+
# CyberSource PHP Client
32
This is the PHP client for the [CyberSource SOAP Toolkit API](http://www.cybersource.com/developers/getting_started/integration_methods/soap_toolkit_api).
43

5-
[![Build Status](https://travis-ci.org/CyberSource/cybersource-sdk-php.png?branch=master)]
6-
(https://travis-ci.org/CyberSource/cybersource-sdk-php)
4+
[![Build Status](https://travis-ci.org/CyberSource/cybersource-sdk-php.png?branch=master)](https://travis-ci.org/CyberSource/cybersource-sdk-php)
75

8-
##Packagist
6+
## Packagist
97
The cybersource/sdk-php is available at [Packagist](https://packagist.org/packages/cybersource/sdk-php).
108
If you want to install SDK from Packagist,add the following dependency to your application's 'composer.json'.
11-
12-
"require": {
13-
"cybersource/sdk-php": "*"
14-
},
15-
16-
##Prerequisites
9+
```json
10+
"require": {
11+
"cybersource/sdk-php": "*"
12+
},
13+
```
14+
## Prerequisites
1715

1816
- PHP 5.3 or above
1917
- [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
2018
- A CyberSource account. You can create an evaluation account [here](http://www.cybersource.com/register/).
2119
- 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).
2220

23-
24-
##Installation
25-
21+
## Installation
2622
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:
2723

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

31-
###Installing with Composer
27+
### Installing with Composer
3228
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:
3329
```
3430
composer.phar install
@@ -39,18 +35,17 @@ Then, to use the client, you'll need to include the Composer-generated autoload
3935
require_once('/path/to/project/vendor/autoload.php');
4036
```
4137

42-
###Manual installation
38+
### Manual installation
4339
To use the client manually, include the CyberSource client in your project:
4440

4541
```php
4642
require_once('/path/to/project/lib/CybsSoapClient.php');
4743
```
4844

49-
50-
##Getting Started
45+
## Getting Started
5146
The PHP client will generate the request message headers for you, and will contain the methods specified by the WSDL file.
5247

53-
###Creating a simple request
48+
### Creating a simple request
5449
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.
5550

5651
```php
@@ -68,7 +63,7 @@ $request->card = $card;
6863
$reply = $client->runTransaction($request);
6964
```
7065

71-
###Creating a request from XML
66+
### Creating a request from XML
7267
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:
7368

7469
```php
@@ -86,7 +81,7 @@ $client = new CybsSoapClient();
8681
$client->runTransactionFromXml($xml);
8782
```
8883

89-
###Using name-value pairs
84+
### Using name-value pairs
9085
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:
9186

9287
```php
@@ -99,7 +94,7 @@ $request['merchantReferenceCode'] = $'my_reference_code';
9994
$reply = $client->runTransaction($request);
10095
```
10196

102-
##Running the Samples
97+
## Running the Samples
10398
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:
10499

105100
```
@@ -108,7 +103,7 @@ php samples/Sale.php
108103

109104
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.
110105

111-
##Tests
106+
## Tests
112107

113108
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
114109
```
@@ -117,7 +112,7 @@ composer.phar dump-autoload
117112

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

120-
##Documentation
115+
## Documentation
121116

122117
For more information about CyberSource services, see <http://www.cybersource.com/developers/documentation>
123118

0 commit comments

Comments
 (0)