towallet / towallet-php
Towallet API PHP Library
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/towallet/towallet-php
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-12-21 09:15:45 UTC
README
Installation
Using Composer
You can install the library via Composer. If you don't already have Composer installed, first install it by following one of these instructions depends on your OS of choice:
- Composer installation instruction for Windows
- Composer installation instruction for Mac OS X and Linux
-
After composer is installed, you can declare ToWallet-PHP as a project dependency by creating a
composer.jsonat the root of your project directory with the following content:{ "require": { "towallet/towallet-php": "dev-master" } } -
Then run the following command to install the ToWallet-PHP library:
composer install -
Once you run the
composer installcommand, the Composer will generate avendorfolder at the same directory ascomposer.json. Now you can then add the following line to PHP script to load the library:require_once dirname(__FILE__).'/vendor/autoload.php';
Manually
If you're not using Composer, you can also download ToWallet-PHP. Then, follows the instruction below to install ToWallet-PHP to the project.
-
Extract the library to your project.
-
Then, include the following line into your PHP file,
require_once dirname(__FILE__).'/towallet-php/lib/Towallet.php';
-
Now you are ready to start using the library
Quick Start
Now from the above sections, your code will looks similar like the below.
require_once dirname(__FILE__).'/vendor/autoload.php'; define('TOWALLET_PUBLIC_KEY', 'pkey-xxxxxxxxxx'); define('TOWALLET_SECRET_KEY', 'skey-xxxxxxxxxx');
$transaction = TowalletTransaction::get(array( 'invoice_id' => 'M12345678' ));