PHP code example of bitocredit / php-gateway

1. Go to this page and download the library: Download bitocredit/php-gateway 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/ */

    

bitocredit / php-gateway example snippets


     
    use Bitocredit\PhpGateway\ApiPhp;
    
    // if you set variables inside config file . you don't have to pass constructor values 
    $api = new ApiPhp("base_url" , "your_token");
    $result = $api->createWallet("wallet_id" , "network"); // replace wallet_id with your wallet id and set network type

    $result = $api->createWallet("wallet_id" , "network"); // replace wallet_id with your wallet id and set network type

    $result = $api->transactionCheck("transaction_hash" , "wallet_address"); // replace transaction_hash and wallet_address with your transaction hash and wallet address

    $result = $api->transactionRecovery("transaction_hash"); // replace transaction_hash with your transaction hash

    $result = $api->transactionFee(); 

    $result = $api->transactionExample("transaction_hash"); // replace transaction_hash with your transaction hash