uala-bis / ualabis-php
Ualá Bis PHP SDK for API Checkout
Installs: 3 080
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- ext-curl: *
Requires (Dev)
- mockery/mockery: ^1.5
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.*
README
Official PHP SDK for Ualá Bis API Checkout
SDK PHP oficial de Ualá Bis API Checkout
Content
Installation
Install the package with:
composer require uala-bis/ualabis-php
Functions
List of all functions:
- createOrder
- getOrder
- getFailedNotifications
Usage
Instantiate the Ualá Bis SDK class:
<?php require_once('../vendor/autoload.php'); use Uala\SDK; //if you want to test the sdk, set isDev w/ true value. FALSE by default if not specified $sdk = new SDK('your_username', 'your_client_id', 'your_client_secret_id', true); $order = $sdk->createOrder(11, 'test', 'https://www.google.com/', 'https://www.google.com/'); $generatedOrder = $sdk->getOrder($order->uuid); ?>
Test
We use PHPUnit and Mockoon to run internal mock API:
Install all dependencies from composer.json
:
composer install
Start mock API server:
npx mockoon-cli start --data ./tests/dataMockTest.json
or if you want to install it globally:
npm install -g @mockoon/cli mockoon-cli start --data ./tests/dataMockTest.json
Run coverage:
composer coverage
We use XDebug
for coverage report, is necessary to install it: how to install Xdebug
Español
Instalación
Instale el paquete con el siguiente comando:
composer require uala-bis/ualabis-php
Funciones
Listado de todas las funciones:
- createOrder
- getOrder
- getFailedNotifications
Uso
Instancia la clase de Ualá Bis SDK:
<?php require_once('../vendor/autoload.php'); use Uala\SDK; //si queres probar el SDK, configura el valor isDev con valor true. Es false por defecto si no es especificado $sdk = new SDK('your_username', 'your_client_id', 'your_client_secret_id', true); $order = $sdk->createOrder(11, 'test', 'https://www.google.com/', 'https://www.google.com/'); $generatedOrder = $sdk->getOrder($order->uuid); ?>
Test
Usamos PHPUnit y Mockoon para correr un mock interno de una API:
Instala todas las dependencias de composer.json
:
composer install
Inicia la API mockeada:
npx mockoon-cli start --data ./tests/dataMockTest.json
o si queres instalarlo de forma global:
npm install -g @mockoon/cli mockoon-cli start --data ./tests/dataMockTest.json
Ejecuta el coverage:
composer coverage
Usamos XDebug
para los reportes de coverage, es necesario que lo instales: cómo instalar Xdebug
API Checkout Docs
Also, you can show Api Checkout Documentation in https://developers.ualabis.com.ar