PHP code example of guilhermewop / rv-sdk-php

1. Go to this page and download the library: Download guilhermewop/rv-sdk-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

guilhermewop / rv-sdk-php example snippets


try {
    // All transactions ;
    $request->setUri('api host')
            ->setUsername('your primary username')
            ->setStore('your primary store')
            ->setPassword('your primary password');

    // All operations  => '1488',
        'ddd'     => '11',
        'fone'    => '987654321',
    ]); // returns Rv\Response object
} catch (\Exception $e) {
    // ... 
}

try {
    // All transactions ;
    $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) {
    // ... 
}
bash
php composer.phar