If your service is developed in PHP, the features we provide are available through the SDK. The Gluwa SDK for PHP is a library with powerful features that enable PHP developers to easily make requests to the Gluwa APIs.
Update
v1.0.9 - Add support sUSDCG (01/06/2021)
Getting started
Download the PHP Package below and upload it to your server. The SDK requires PHP 5.6 or greater.
$composerrequiregluwa/gluwa-php
Create and initialize a Gluwa object. Then, enter the APIKey, APISecret and WebookSecret generated from the Gluwa Dashboard, and an Ethereum wallet to manage your funds. Please note that the sandbox environment is deprecated and will be replaced with an alternative solution in the future.
<?php// Specify your vendor path.require_once('vendor/autoload.php');// If you want to run test on the sandbox mode, change below to values obtained from Gluwa Dashboard's sandbox mode.$Configuration_DEV =false; // "true" if you want to use the sandbox mode$Configuration_APIKey ='{Your API Key}';$Configuration_APISecret ='{Your API Secret}';$Configuration_WebhookSecret ='{Your Webhook Secret}';$Configuration_MasterEthereumPrivateKey ='{Your Ethereum Private Key}';$Configuration_MasterEthereumAddress ='{Your Ethereum Address}';$Gluwa =newGluwa\Gluwa(['__DEV__'=> $Configuration_DEV,'APIKey'=> $Configuration_APIKey,'APISecret'=> $Configuration_APISecret,'WebhookSecret'=> $Configuration_WebhookSecret,'MasterEthereumPrivateKey'=> $Configuration_MasterEthereumPrivateKey,'MasterEthereumAddress'=> $Configuration_MasterEthereumAddress,]);
If you are using PHP 5.6, you need to enable php-bcmathbecause it is not enabled by default prior PHP 7. If it is not installed yet, just install it. Please visit here for more information.
If you receive the following message, you should install gmp extentionon your server. Please visit this site to find a solution.
Function gmp_init is unavailable. Please make sure php_gmp extension is available
When user completes transfer via the QR code, the Gluwa API sends a webhook to your webhook endpoint. Verify that the values actually sent by the Gluwa server are correct.
Payload and Signature of webhook can be obtained as follows: