Skip to content

Commit 5486413

Browse files
authored
Merge pull request #221 from adavidw/readme
Cleanup Readme
2 parents 0d7d32e + f7b25d7 commit 5486413

1 file changed

Lines changed: 10 additions & 20 deletions

File tree

README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Authorize.Net PHP SDK
22
======================
33

4-
[![Travis](https://img.shields.io/travis/AuthorizeNet/sdk-php/master.svg)]
5-
(https://travis-ci.org/AuthorizeNet/sdk-php)
4+
[![Travis](https://img.shields.io/travis/AuthorizeNet/sdk-php/master.svg)](https://travis-ci.org/AuthorizeNet/sdk-php)
65
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-php/?branch=master)
76
[![Packagist](https://img.shields.io/packagist/v/authorizenet/authorizenet.svg)](https://packagist.org/packages/authorizenet/authorizenet)
87

@@ -44,37 +43,28 @@ Alternatively, we provide a custom `SPL` autoloader:
4443
require 'path/to/anet_php_sdk/autoload.php';
4544
```
4645

47-
**Issue with PHP 7:** *You may get below error when run the composer update with PHP 7. To get rid of this error, use `composer update --ignore-platform-reqs`*
48-
```php
49-
Problem 1
50-
- Installation request for authorizenet/authorizenet 1.8.6.2 -> satisfiable
51-
by authorizenet/authorizenet[1.8.6.2].
52-
- authorizenet/authorizenet 1.8.6.2 requires php ~5.3 -> your PHP version (7
53-
.0.3RC1) or value of "config.platform.php" in composer.json does not satisfy that requirement.
54-
```
55-
5646
## Authentication
5747
To authenticate with the Authorize.Net API you will need to retrieve your API Login ID and Transaction Key from the [`Merchant Interface`](https://account.authorize.net/). You can find these details in the Settings section.
5848
If you need a sandbox account you can sign up for one really easily [`here`](https://developer.authorize.net/sandbox/).
5949

6050
Once you have your keys simply plug them into the appropriate variables, as per the below code dealing with the authentication part of the flow.
6151

6252
...
63-
````php
53+
```php
6454
use net\authorize\api\contract\v1 as AnetAPI;
65-
````
55+
```
6656
...
67-
````php
57+
```php
6858
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
6959
$merchantAuthentication->setName("YOURLOGIN");
7060
$merchantAuthentication->setTransactionKey("YOURKEY");
71-
````
61+
```
7262
...
7363

74-
````php
64+
```php
7565
$request = new AnetAPI\CreateTransactionRequest();
7666
$request->setMerchantAuthentication($merchantAuthentication);
77-
````
67+
```
7868
...
7969

8070
## Usage Examples
@@ -87,7 +77,7 @@ Apart from this README, you can find details and examples of using the SDK in th
8777
### Quick Usage Example (with Charge Credit Card - Authorize and Capture)
8878
Note: The following is a php console application. Ensure that you can invoke the php command from command line.
8979
- Save the below code to a php file named, say, `charge-credit-card.php`
90-
- Open command prompt and navigate to your sdk folder ( if want to run from a different folder, modify the `require` statement to have the full path to the sdk e.g. `require 'c:/anet-sdk-php/vendor/autoload.php'` in place of `require 'vendor/autoload.php'` )
80+
- Open command prompt and navigate to your SDK folder ( if want to run from a different folder, modify the `require` statement to have the full path to the SDK e.g. `require 'c:/anet-sdk-php/vendor/autoload.php'` in place of `require 'vendor/autoload.php'` )
9181
- Update dependecies - e.g., With composer, type `composer update`
9282
- Type `php [<path to folder containing the php file>\]charge-credit-card.php`
9383

@@ -148,7 +138,7 @@ $response = $controller->executeWithApiResponse( \net\authorize\api\constants\AN
148138

149139
## Logging
150140

151-
SDK generates log with masking for sensitive data like credit card, expiration dates. The provided levels for logging are
141+
The SDK generates a log with masking for sensitive data like credit card, expiration dates. The provided levels for logging are
152142
`debug`, `info`, `warn`, `error`. Add ````use \net\authorize\util\LogFactory;````. Logger can be initialized using `$logger = LogFactory::getLog(get_class($this));`
153143
The default log file `phplog` gets generated in the current folder. The subsequent logs are appended to the same file, unless the execution folder is changed, and a new log file is generated.
154144

@@ -158,7 +148,7 @@ The default log file `phplog` gets generated in the current folder. The subseque
158148
- Logging using formatting `$logger->debugFormat("Integer: %d, Float: %f, Xml-Request: %s\n", array(100, 1.29f, $xmlRequest));`
159149

160150
### Customizing Sensitive Tags
161-
A local copy of [AuthorizedNetSensitiveTagsConfig.json](/lib/net/authorize/util/ANetSensitiveFields.php) gets generated when code invoking the logger first gets executed. The local file can later be edited by developer to re-configure what is masked and what is visible (*Do not edit the json in sdk*).
151+
A local copy of [AuthorizedNetSensitiveTagsConfig.json](/lib/net/authorize/util/ANetSensitiveFields.php) gets generated when code invoking the logger first gets executed. The local file can later be edited by developer to re-configure what is masked and what is visible. (*Do not edit the JSON in the SDK*).
162152
- For each element of the `sensitiveTags` array,
163153
- `tagName` field corresponds to the name of the property in object, or xml-tag that should be hidden entirely ( *XXXX* shown if no replacement specified ) or masked (e.g. showing the last 4 digits of credit card number).
164154
- `pattern`[<sup>[Note]</sup>](#regex-note) and `replacement`[<sup>[Note]</sup>](#regex-note) can be left `""`, if the default is to be used (as defined in [Log.php](/lib/net/authorize/util/Log.php)). `pattern` gives the regex to identify, while `replacement` defines the visible part.

0 commit comments

Comments
 (0)