revo_technology / revo_sdk_php
SDK for Revo API
Installs: 244
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 0
Open Issues: 0
pkg:composer/revo_technology/revo_sdk_php
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' ] );
testModeindicates whether production or demo mode to use (by default settrue)redirectUrlmust be URL to which user will be redirected after form submitcallbackUrlmust 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