dataplans / dataplans-php
A PHP library designed specifically to connect with DataPlans API.
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: ^5
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2025-05-25 17:26:26 UTC
README
dataplans-php
is a library designed specifically to connect with DataPlans API written in PHP. API document here
Please pop onto our community forum or contact support@dataplans.io if you have any question regarding this library and the functionality it provides.
Requirements
- PHP v5.6 and above.
- Built-in libcurl support.
Configuration
• Config your token and environment
This API allows you to buy travel eSIM data plans in QR code format. Sign up and receive your api-key to test the API. (these can be found at the DataPlans Dashboard.).
Place the following code next to a line where DataPlans-PHP library is loaded.
define('DATAPLANS_TOKEN', '***'); // Access token define('DATAPLANS_API_MODE', 'sandbox'); // Allow sandbox or esim define('DATAPLANS_API_VERSION', 1); // API version
Reference: https://app.dataplans.io/docs/v1#/.
ー
Development and Testing
To run an automated test suite, make sure you already have a PHPUnit in your local machine. Then run the PHPUnit:
phpunit tests
License
DataPlans-PHP is open-sourced software released under the Apache-2.0 License.