PHP code example of emmanuelonyo / basqet-php

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

    

emmanuelonyo / basqet-php example snippets


use Basqet\Basqet;
$Basqet = new Basqet($_ENV['BASQET_SECRET_KEY'],$_ENV['BASQET_PUBLIC_KEY']);



// Fetch all fiat currency
$currencies = $basqet::fetchAllCurrency("FIAT")



$paymentData = [
     "customer": [
          "name"=> "tunde",
          "email"=> "[email protected]"
     ],
     "amount"=> "1000",
     "currency"=> "NGN",
     "meta"=> [
          "reference": "bghggbbvv"
     ]
];

$transactionObj = $Basqet::initializeTransaction(paymentData);



$transactionObj = $Basqet::initiateTransaction(<transactionId>, ['currency_id'=> <currency_id>])




$transactionObj = $Basqet::verifyTransaction(<transactionId>)




$transactionObj = $Basqet.triggerWebhook(<transactionId>, [ status=> 'SUCCESSFUL' ])

bash
  composer