<commit_before># PayMaya-PHP-SDK

PayMaya PHP SDK allows your web applications to accept payments from your customers using any MasterCard and Visa enabled card (credit, debit, or prepaid).

[![Code Climate](https://codeclimate.com/github/PayMaya/PayMaya-PHP-SDK/badges/gpa.svg)](https://codeclimate.com/github/PayMaya/PayMaya-PHP-SDK)

## Prerequisites

* PHP 5.3 or above
* [curl](http://php.net/manual/en/book.curl.php), [json](http://php.net/manual/en/book.json.php) & [openssl](http://php.net/manual/en/book.openssl.php) extensions must be enabled

Tests
* phpunit/phpunit: 4.8.*


## Installation

* Via Composer
```sh
composer require PayMaya/PayMaya-SDK:*
```

* Direct download

Integrate the SDK by cloning this repo (https://github.com/PayMaya/PayMaya-PHP-SDK) and manually integrating it to you project. You can look at the sample directory to guide you on using the SDK

## Prerequisites

#### _API Keys_
To use PayMaya PHP SDK, you need to have a different API key for Sandbox and Production environment.
 
##### _Sandbox Environment_
 
Sandbox credentials are useful for testing application integration. All transactions and money flow made in this environment are only simulated and does not reflect your production records. The following sandbox API key can be used for testing purposes:

 ```
Public-facing API Key: <KEY>

Secret API Key: <KEY>
```
 
##### _Production Environment_
 
Upon successful integration testing, you can then request for production credentials. Upon receipt, just change your SDK initialization to use production environment to start accepting live transactions.

## Usage

#### 1. Autoload the SDK. This will include all the files and classes to your autoloader. If you downloaded the SDK using composer, replace PayMaya-PHP-SDK with vendor.
```php
// Used for composer based installation<commit_msg>Update README installation<commit_after># PayMaya-PHP-SDK

PayMaya PHP SDK allows your web applications to accept payments from your customers using any MasterCard and Visa enabled card (credit, debit, or prepaid).

[![Code Climate](https://codeclimate.com/github/PayMaya/PayMaya-PHP-SDK/badges/gpa.svg)](https://codeclimate.com/github/PayMaya/PayMaya-PHP-SDK)

## Prerequisites

* PHP 5.3 or above
* [curl](http://php.net/manual/en/book.curl.php), [json](http://php.net/manual/en/book.json.php) & [openssl](http://php.net/manual/en/book.openssl.php) extensions must be enabled

Tests
* phpunit/phpunit: 4.8.*


## Installation

* Via Composer
```sh
composer require "paymaya/paymaya-sdk:*
```

* Direct download

Integrate the SDK by cloning this repo (https://github.com/PayMaya/PayMaya-PHP-SDK) and manually integrating it to you project. You can look at the sample directory to guide you on using the SDK

## Prerequisites

#### _API Keys_
To use PayMaya PHP SDK, you need to have a different API key for Sandbox and Production environment.
 
##### _Sandbox Environment_
 
Sandbox credentials are useful for testing application integration. All transactions and money flow made in this environment are only simulated and does not reflect your production records. The following sandbox API key can be used for testing purposes:

 ```
Public-facing API Key: <KEY>

Secret API Key: <KEY>
```
 
##### _Production Environment_
 
Upon successful integration testing, you can then request for production credentials. Upon receipt, just change your SDK initialization to use production environment to start accepting live transactions.

## Usage

#### 1. Autoload the SDK. This will include all the files and classes to your autoloader. If you downloaded the SDK using composer, replace PayMaya-PHP-SDK with vendor.
```php
// Used for composer based installation
{'fraction_non_alphanumeric': 0.09427336574824419, 'fraction_numerical': 0.002701242571582928, 'mean_word_length': 4.619119878603946, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2689599', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1010, 'n_words': 425}