1. Go to this page and download the library: Download gluwa/gluwa-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gluwa / gluwa-php example snippets
// Specify your vendor path.
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 = new Gluwa\Gluwa([
'__DEV__' => $Configuration_DEV,
'APIKey' => $Configuration_APIKey,
'APISecret' => $Configuration_APISecret,
'WebhookSecret' => $Configuration_WebhookSecret,
'MasterEthereumPrivateKey' => $Configuration_MasterEthereumPrivateKey,
'MasterEthereumAddress' => $Configuration_MasterEthereumAddress,
]);
$PostTransaction_Currency = '{USDG or sUSDCG or KRWG or sNGNG}';
$PostTransaction_Amount = '{Sending Amount}';
$PostTransaction_Target = '{Receiver\'s Address}';
$PostTransaction_MerchantOrderID = '{Merchant\'s Order ID. Optional}';
$PostTransaction_Note = '{Custom Note. Optional}';
$PostTransaction_Expiry = {Expiry of the Transfer Request. Optional};
$Response = $Gluwa->postTransaction([
'Currency' => $PostTransaction_Currency,
'Amount' => $PostTransaction_Amount,
'Target' => $PostTransaction_Target,
'MerchantOrderID' => $PostTransaction_MerchantOrderID, // optional
'Note' => $PostTransaction_Note, // optional
'Expiry' => $PostTransaction_Expiry, // optional
]);