revo_technology / revo_sdk_php
This package is abandoned and no longer maintained.
No replacement package was suggested.
SDK for Revo API
dev-master
2017-09-05 12:48 UTC
Requires
- php: >=5.4.0
- rmccue/requests: >=1.0
Requires (Dev)
- phpunit/phpunit: ^5.0 || ^4.8.10
This package is not auto-updated.
Last update: 2024-03-28 03:55:43 UTC
README
PHP Library to access Revo API
Basic usage
Revo API implements four methods:
- check client's limit by phone number
- getting form link for preorder
- getting form link for full order process
- performing partial of full order return
API client must be configured as follows:
<?php $config = new RevoSDK\Config( [ 'testMode'=>true, 'redirectUrl'=>'http://example.com/', 'callbackUrl'=>'http://example.com/', 'storeId'=>1, 'secret'=>'secret' ] );
testMode
indicates whether production or demo mode to use (by default settrue
)redirectUrl
must be URL to which user will be redirected after form submitcallbackUrl
must be URL to which Revo will send callback datastoreId
- store id in Revo systemsecret
- hash-like string for creating signature from Revo (must be stored privately)
After setting up RevoSDK\Config
you may access API methods in RevoSDK\API
.
Example
<?php $client = new RevoSDK\API($config); $response = $client->limitByPhone('9031234567');
See also the examples.
Usage
To run this library, you first need to clone this repo and then install all dependencies through Composer:
$ composer install
To run examples
, set proper credentials in config data and run:
$ php examples/revo_api_usage.php