Download the PHP package gluwa/gluwa-php without Composer
On this page you can find all versions of the php package gluwa/gluwa-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package gluwa-php
Gluwa SDK for PHP
Dear users, Sandbox environment has been deprecated, please update your code to avoid any further errors
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.1.0 - Add support sNGNG (20/05/2021) 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.
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. You can use credentials from sandbox dashboard and a Goerli wallet if you want to test in the sandbox environment.
If you are using PHP 5.6, you need to enable php-bcmath because 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 extention on your server. Please visit this site to find a solution.
Function gmp_init is unavailable. Please make sure php_gmp extension is available
Now you are ready to use the Gluwa API.
Method Examples
Create a New Transaction
Create a Payment QR Code
getPaymentQRCode
API returns a QR code png image as a Base64 string. You can display the image on your website as below:
List Transaction History for an Address
Retrieve Transaction Details by Hash
Retrieve a Balance for an Address
Webhook Validation
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:
Verify the requested Signature and Payload as follows:
Type | Description |
---|---|
boolean | This will return true if it is a valid webhook. If it returns false , you either set an incorrect secret or the webhook did not originate from Gluwa. |