/enzona-qr-php

PHP library for interacting with EnZona QR API

Primary LanguagePHP

enzona-qr-php

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

PHP Client library for interacting with EnZona's QR API.

This client was generated by the Swagger Codegen project.

  • API version: v1.0.0
  • Package version: 1.0.0

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/enzona-qr-php/vendor/autoload.php');

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');

// Configure OAuth2 access token for authorization: default
$config = daxslab\enzona\qr\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new daxslab\enzona\qr\Api\ObtieneLaInformacinDeUnQRApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$qr_code = "qr_code_example"; // string | Código del QR a buscar

try {
    $result = $apiInstance->qrQrCodeGet($qr_code);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ObtieneLaInformacinDeUnQRApi->qrQrCodeGet: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://apisandbox.enzona.net/qr/v1.0.0

Class Method HTTP request Description
ObtieneLaInformacinDeUnQRApi qrQrCodeGet GET /qr/{qr_code}
PermiteCrearUnQRDePagoAUnComercioApi qrMerchantPost POST /qr/merchant
PermiteCrearUnQRParaHacerUnPagoEntrePersonas_Api qrAccountPost POST /qr/account

Documentation For Models

Documentation For Authorization

default