emmanuelonyo/basqet-php

php library for basqet recieve payments in cryptocurency

v1.0.0 2022-09-02 09:47 UTC

This package is auto-updated.

Last update: 2024-12-05 01:59:18 UTC


README

The Official PHP library for the Basqet API.

Installation

Initialize the Project With Composer and clone the repo

  composer require emmanuelonyo/basqet-php

Usage/Examples

Instantiate class

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

Fetch Available currency

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

Initialize transaction

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

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

Initiate transaction

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

Verify transaction

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

Mock webhook events

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

Documentation/API reference

Documentation

Buy me a coffee

I need Employment you can contact me via +2348102937785 emmanuelonyo34@gmail.com