2017 © Pedro Peláez
 

library rv-sdk-php

API Client for RV Tecnologia API

image

guilhermewop/rv-sdk-php

API Client for RV Tecnologia API

  • Wednesday, December 14, 2016
  • by guilhermewop
  • Repository
  • 1 Watchers
  • 1 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SDK for RV Tecnologia XML API

Software License, (*1)

A simple SDK to access RV Tecnologia XML API., (*2)

Requirements

  • PHP 5.4.x
  • Zend Framework HTTP Module >= 2.5

Installation

php composer.phar require guilhermewop/rv-sdk-php:dev-master

Package information on Packagist, (*3)

Usage

Example using the generic transaction class:, (*4)

try {
    // All transactions require a request (put it in your config files)
    $request = new Rv\Request;
    $request->setUri('api host')
            ->setUsername('your primary username')
            ->setStore('your primary store')
            ->setPassword('your primary password');

    // All operations require a transaction code
    $transactionCode = 5; // online recharge code
    $transaction = new Rv\Transaction($transactionCode);
    $transaction->setRequest($request);
    $response = $transaction->send([
        'compra'  => '100000000',
        'produto' => '1488',
        'ddd'     => '11',
        'fone'    => '987654321',
    ]); // returns Rv\Response object
} catch (\Exception $e) {
    // ... 
}

Example using specific transaction implementation:, (*5)

try {
    // All transactions require a request (put it in your config files)
    $request = new Rv\Request;
    $request->setUri('api host')
            ->setUsername('your primary username')
            ->setStore('your primary store')
            ->setPassword('your primary password');

    // A online mobile recharge
    $recharge = new Rv\Transaction\Recharge\Online($request);
    $recharge->setOperator('oi')
             ->setMsisdn('11987654321')
             ->setAmount('10.00')

    $response = $recharge->send(); // returns Rv\Response object
} catch (\Exception $e) {
    // ... 
}

The Versions

14/12 2016

dev-master

9999999-dev https://github.com/guilhermewop/rv-sdk-php

API Client for RV Tecnologia API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Guilherme W. O. Pereira

api xml client rv tecnologia

14/12 2016

v1.1.0

1.1.0.0 https://github.com/guilhermewop/rv-sdk-php

API Client for RV Tecnologia API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Guilherme W. O. Pereira

api xml client rv tecnologia

14/12 2016

dev-develop

dev-develop https://github.com/guilhermewop/rv-sdk-php

API Client for RV Tecnologia API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Guilherme W. O. Pereira

api xml client rv tecnologia

04/12 2016

v1.0.0

1.0.0.0 https://github.com/guilhermewop/rv-sdk-php

API Client for RV Tecnologia API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Guilherme W. O. Pereira

api xml client rv tecnologia