2017 © Pedro Peláez
 

library pikpay-php

Payment Processing Library for PikPay

image

selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  • Sunday, September 4, 2016
  • by SelimSalihovic
  • Repository
  • 4 Watchers
  • 16 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

PikPay-php

SensioLabsInsight, (*1)

Latest Stable Version Minimum PHP Version Build Status StyleCI, (*2)

Install

Via Composer, (*3)

``` bash $ composer require selimsalihovic/pikpay-php, (*4)


## Usage To use the package first grab your credentials from your PikPay account. You will need your **Authenticity Token** (API_KEY) and **Key** (SECRET_KEY). Before any request, an instance of Gateway has to be constructed. ``` php $gateway = new Gateway(getenv('ENDPOINT'), getenv('API_KEY'), getenv('SECRET_KEY'));

Input Data

For each Request, a data array is needed. See the PikPay Docs to see which values need to be included for which request. Note: you do not need to include the 'digest' parameter as it is calculated for you on each request based on the data array., (*5)

Here is an example of a valid data array. ``` php $data = [ 'amount' => 5500, 'expiration-date' => 1707, 'cvv' => 286, 'pan' => 5464000000000008, 'ip' => '128.93.108.112', 'order-info' => 'Test Order', 'ch-address' => '1419 Westwood Blvd', 'ch-city' => 'Los Angeles', 'ch-country' => 'USA', 'ch-email' => 'john.doe@gmail.com', 'ch-full-name' => 'John Doe', 'ch-phone' => '636-48018', 'ch-zip' => '90024', 'currency' => 'USD', //EUR, BAM, HRK 'order-number' => 'order-d234djflq0wz', 'language' => 'en', ];, (*6)

### Sending an Authorization Request
``` php
$response = $gateway->authorize($data);
if ($response->isSuccessfull()) {
    //handle success case
} else {
    //display error
}

Sending a Capture Request

Capture requests are sent only for previously authorized transactions. ``` php $gateway->authorize($data); $response = $gateway->capture($data);, (*7)


### Sending a Purchase Request The purchase request does both. ``` php $response = $gateway->purchase($data);

Sending a Refund Request

``` php $response = $gateway->refund($data);, (*8)


### Sending a Void Request ``` php $response = $gateway->void($data);

Testing

To run the tests be sure to have all the dev dependencies from composer.json installed. bash $ cd pikpay-php && cp example.phpunit.xml.dist phpunit.xml.dist $ nano phpunit.xml.dist #update your credentials and save them $ vendor/bin/phpunit, (*9)

The Versions

04/09 2016

dev-master

9999999-dev https://github.com/selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  Sources   Download

MIT

The Requires

 

The Development Requires

selimsalihovic pikpay-php

04/09 2016

v1.0

1.0.0.0 https://github.com/selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  Sources   Download

MIT

The Requires

 

The Development Requires

selimsalihovic pikpay-php

25/03 2016

0.3

0.3.0.0 https://github.com/selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  Sources   Download

MIT

The Requires

 

The Development Requires

selimsalihovic pikpay-php

23/03 2016

0.1

0.1.0.0 https://github.com/selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  Sources   Download

MIT

The Requires

 

The Development Requires

selimsalihovic pikpay-php

23/03 2016

0.2

0.2.0.0 https://github.com/selimsalihovic/pikpay-php

Payment Processing Library for PikPay

  Sources   Download

MIT

The Requires

 

The Development Requires

selimsalihovic pikpay-php