Skip to content

jkamiphi/enzona-sdk-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial PHP SDK for EnZona

Build Status

This is a work in progress, there are rough corners and the API can change witouth previuos warnings. Not recommended for production usage.

This is a PHP library that allows interaction with EnZona's API.

Requeriments

PHP 5.5 and later but using the latest version of PHP is highly recommended and must be installed the following PHP extensions:

  • curl
  • json
  • mbstring

Installation & Usage

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/daxslab/enzona-sdk-php.git"
    }
  ],
  "require": {
    "daxslab/enzona-sdk": "*@dev"
  }
}

Then run composer install

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Creates an API instance
$paymentsAPI = new daxslab\enzona\PaymentAPI();

// Get access token
$accessToken = $paymentsAPI->requestAccessToken('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET');

// Configure OAuth2 access token for authorization: default
$paymentsAPI->setAccessToken($accessToken);

// creates an api endpoint object
$apiObject = $paymentsAPI->listRefundsPayment();

// define parameters
$transaction_uuid = "transaction_uuid_example"; // string | 
$limit = "limit_example"; // string | 
$offset = "offset_example"; // string | 
$status_filter = "status_filter_example"; // string | 
$start_date_filter = "start_date_filter_example"; // string | 
$end_date_filter = "end_date_filter_example"; // string | 
$order_filter = "order_filter_example"; // string | 

// call endpoint
try {
    $result = $apiObject->paymentsTransactionUuidRefundsGet($transaction_uuid, $limit, $offset, $status_filter, $start_date_filter, $end_date_filter, $order_filter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling $apiObject->paymentsTransactionUuidRefundsGet: ', $e->getMessage(), PHP_EOL;
}

?>

About

Unofficial PHP SDK for EnZona

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%